[Haskell-cafe] Compiling stringable with GHC 7.0.4

Ketil Malde ketil at malde.org
Tue Aug 20 18:44:14 CEST 2013


I took the liberty of implementing this fix and uploading
stringable-0.1.1.1 to HackageDB.  I tested it on GHC 7.0.4 (you know,
shipped with the cutting-edge Fedora distribution one year ago, but
ancient and no longer to be bothered with by Haskell standards :-) and
on 7.6.2.

-k

Ketil Malde <ketil at malde.org> writes:

> Hi,
>
> -------------------------------------------------------
> I don't think FlexibleInstances works with this GHC, I get:
>
> % cabal install --prefix=$G stringable
> Resolving dependencies...
> Configuring stringable-0.1.1...
> Building stringable-0.1.1...
> Preprocessing library stringable-0.1.1...
> [1 of 1] Compiling Data.Stringable  ( Data/Stringable.hs, dist/build/Data/Stringable.o )
>
> Data/Stringable.hs:54:10:
>     Illegal instance declaration for `Stringable String'
>       (All instance types must be of the form (T t1 ... tn)
>        where T is not a synonym.
>        Use -XTypeSynonymInstances if you want to disable this.)
>     In the instance declaration for `Stringable String'
> -------------------------------------------------------
>
> I changed the first line of Data/Stringable.hs to:
>
> {-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
>
> and then it compiled.  Is there any reason not to retain the TSI pragma?
>
> -k


-- 
If I haven't seen further, it is by standing in the footprints of giants




More information about the Haskell-Cafe mailing list