Hacker News new | ask | show | jobs
by DanWaterworth 3592 days ago
I don't think this is a flaw, in fact I think it neatly solves the problem of how to extend the language without committing to a design too eagerly and provides a platform for experimentation.

There are pragmas that GHC implements that are now widely held to be problematic, but we wouldn't know this without an implementation, and using pragmas, we are realistically able to deprecate and remove these extensions.

1 comments

Very few extensions have been deprecated: http://hackage.haskell.org/package/Cabal-1.24.0.0/docs/src/L...

Convenient, widely-used extensions that have been around for a long time aren't yet part of the language standard: https://prime.haskell.org/ticket/67

That's not anywhere near a complete list of deprecated extensions and there are others that have been completely removed from the language [1]. It's unfortunate that ScopedTypeVariables hasn't been standardised, but there hasn't been a new standard since 2010, so it's not hugely surprising.

https://ghc.haskell.org/trac/ghc/wiki/LanguagePragmaHistory

Thanks for that link! I haven't seen that wiki page before. Even so, only 4 extensions have been removed. I know others are de facto deprecated, like Rank2Types.

I picked scoped type variables as an example because it's been in GHC since version 6.4. That was released in March 2005, so it had plenty of time to make it into the Haskell2010 language standard.

I'd expect either Rank2Types or RankNTypes to be included in Haskell', you may be thinking of ImpredicativeTypes.

Wow, I did not realize ScopedTypeVariables had been around for so long.

Sorry, I meant that you pretty much always want RankNTypes instead of Rank2Types. My fault for not specifying.