Lazy Vals get an effect annotation #2

lrytz opened this Issue May 9, 2013 · 1 comment


None yet
1 participant

lrytz commented May 9, 2013

It's probably a bad idea to put the effect on the lazy val type - it's the only place where a value has an effect annotation, and this is exactly what we try to avoid (in pluginsTyped we remove all effect annotations from terms).

Having effect annotations on values leads to all random interactions with the typer, because terms suddenly have effects, which triggers the annotationChecker.

Alternative to putting the effect on the lazy val type: put it as an attachment in the symbol. That might not work across separate compilation though.

Maybe we can put it inside another annotation which is not a TypeConstraint (@lazyValEffect(...)).


lrytz commented Jun 24, 2013

however, for override checking it might be good to have them on the return type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment