3 ms·
Is it really so hard to add a flag -safe that rejects or warns on garbage like what's in Prelude (lazy IO, partial functions)?
by alisonkisk 6y ago
Is it really so hard to add a flag -safe that rejects or warns on garbage like what's in Prelude (lazy IO, partial functions)?
- whateveracct 6y agoWell kind of yes and no. As far as GHC is concerned, `Prelude` is just a module like any other, within `base`, a package like any other. We could special-case it, but on the other hand, there are already multiple other solutions in this space that are more generally useful. Alternate Preludes (and compiler support of -XNoImplicitPrelude) `hlint` can also be customized to do exactly what you're asking for as well.