Hacker News new | ask | show | jobs
by anyfoo 1579 days ago
The problem with that is in large parts that Haskell 98 is very outdated, and so relatively basic and absolutely useful extensions are in the same pot as all the experimental stuff.

Haskell Prime, essentially the Haskell 98 successor, is supposed to fix that. The first thing I do in almost any Haskell project is enable a bunch of extensions that I consider absolutely essential[1]. Most or all of those should likely be incorporated into the new standard, and then the truly experimental stuff stands out as experimental again.

Unfortunately it seems that Haskell Prime efforts have slowed down, despite a very active Haskell community in total. I have not looked into details there, though.

[1] For example ScopedTypeVariables, where it's hard to imagine for me at least why this would not be the default.

2 comments

I think the GHC2021 group of blessed extensions provides what you want.

https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/cont...

That's indeed useful and something that I didn't know about, thank you!
ScopedTypeVariables by default! Excellent.
Out of curiosity, why do you find ScopedTypeVariables essential? I've written a fair amount of Haskell code and never once needed it.
Here's some explanation (not by me, found through search): https://blog.ocharles.org.uk/guest-posts/2014-12-20-scoped-t...

And among other things, it also enables pattern signatures.

The official docs at https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/scop... are generally worth a read, they start out with an example of what lexically scoped type variables allow, and follow with the design principles for the extension.

They’re useful on occasion, but don’t seem anywhere close to essential.