[Haskell-cafe] Extensions to Haskell 98 in the GHC Prelude?

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Thu Feb 23 23:31:02 UTC 2017


On 24 February 2017 at 02:59, Dylan Thurston <dpt at bostoncoop.net> wrote:
> Pardon me if this is a stupid/frequently asked question...
>
> The GHC Prelude has some extensions to the Prelude in Haskell 98 or
> Haskell 2010. For instance, it has the Applicative type class, whose
> bindings overlap with some old code of mine. Where are these
> non-standard extensions documented? The Applicative class is
> documented at
>
>   https://downloads.haskell.org/~ghc/latest/docs/html/libraries/base-4.9.0.0/Prelude.html
>
> but it's not picked out as something non-standard.

Do you mean that it's now in the Prelude as opposed to being in a
different module?  If so, that came through from the Applicative =>
Monad Proposal (aka AMP):
https://wiki.haskell.org/Functor-Applicative-Monad_Proposal

There's also the GHC migration guide that might be helpful:
https://ghc.haskell.org/trac/ghc/wiki/Migration

>
> I didn't find it documented where I would have expected in the GHC docs at
>
>   https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/bugs.html#haskell-standards-vs-glasgow-haskell-language-non-compliance

Yes, that's a little odd.

> nor did I see a way to get a standards-compliant prelude?

There's the haskell2010 (and also a haskell98) package:
http://hackage.haskell.org/package/haskell2010

I'm not sure how well it works now though; AMP appears to have broken
it: https://ghc.haskell.org/trac/ghc/ticket/9590

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list