Treatment of unknown pragmas

Ben Gamari 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
> standpoint.
>
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.

Cheers,

- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20181016/0835c631/attachment.sig>


More information about the ghc-devs mailing list