[Haskell-cafe] New type of ($) operator in GHC 8.0 is problematic

Marcin Mrotek marcin.jan.mrotek at gmail.com
Tue Feb 9 22:07:13 UTC 2016

> I feel that this is similar to expressing value constraints in the type
> system, e.g. ranges or squareness of matrixes. Yes it can be done in
> Haskell's type system, yes it does typecheck beautifully, but the type
> declarations behind these kinds of feats will just make any ordinary
> programmer go MEGO. Even the bright ones.
> I conclude that the type system isn't the right place for that kind of
> checking. To be understandable, such constraints need to be expressed as
> boolean assertions, not as some inductive construct. YMMV

Two words: refinement types.

Best regards,
Marcin Mrotek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160209/2dc23b6f/attachment.html>

More information about the Haskell-Cafe mailing list