[Haskell-cafe] Documenting extensions

Doug McIlroy doug at cs.dartmouth.edu
Thu Apr 21 15:40:57 UTC 2016


>>> Later I discovered
>>> that by default GHC rejected almost all my report-conforming (H98
>>> and H2010) code.
>>
>> Do you mean that GHC can't compile Haskell2010 conformant code?
>> Can you please post (or point to) some examples?
>
> This page [1] lists the ways in which GHC diverges from the standard.
> 
> Erik
> 
> [1] https://downloads.haskell.org/~ghc/master/users-guide/bugs.html

The main problem was that my code relied on constraint (Num a)
implying (Eq a) per the standard. I also had context clauses in 
data declarations. Thus I had to make pervasive, albeit trivial, 
changes to get past GHC's nonconformance.

(Presumably option -XHaskell2010 would have papered over the
trouble, but I prefer to maximize code portability.)

Doug McIlroy


More information about the Haskell-Cafe mailing list