Treatment of unknown pragmas
ben at smart-cactus.org
Tue Oct 16 22:00:16 UTC 2018
Brandon Allbery <allbery.b at gmail.com> writes:
> The problem with ANN is it's part of the plugins API, and as such does
> things like compiling the expression into the program in case a plugin
> generates code using its value, plus things like recompilation
> checking end up assuming plugins are in use and doing extra checking.
> Using it as a compile-time pragma is actually fairly weird from that
True. That being said, I wonder if we solve most of these issues by
simply type-checking ANNs lazily. That is, just forkM ANNs during
typechecking. This would mean that the user wouldn't see an error if the
expression contained inside is invalid. On the other hand, the cost of
ANNs would decrease significantly and plugins which use them would
continue to work unmodified. Strict typechecking behavior could be
enabled via a flag.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 487 bytes
Desc: not available
More information about the ghc-devs