if(edo)
context.pushEffectUpperBound(location, blockType == BlockType.Monad ? Types.NO_EFFECTS : Types.metaVar(Kinds.EFFECT));
in = in.checkType(context, requiredType);
- if(edo)
+ if(edo) {
effect = context.popEffectUpperBound();
+ context.declareEffect(location, effect);
+ }
else
effect = Types.NO_EFFECTS;
Type inType = in.getType();
@Test public void MonadSyntax3() { test(); }
@Test public void MonadSyntax4() { test(); }
@Test public void MonadSyntax5() { test(); }
+ @Test public void MonadSyntax6() { test(); }
@Test public void NoDefinitionErrorMessage() { test(); }
@Test public void NoInstance() { test(); }
@Test public void NoInstance2() { test(); }
--- /dev/null
+module {
+ features = [edo]
+}
+
+import "StandardLibrary"
+
+example :: () -> Maybe Integer
+example _ = edo
+ str <- Just "a"
+ let print str in Nothing
+
+main = example ()
+--
+10:9-10:18: Side-effect Proc is forbidden here.
\ No newline at end of file