[Haskell-cafe] Making the encoding Haskell package compile with ghc-7.8.2

José Romildo Malaquias j.romildo at gmail.com
Tue May 20 01:18:01 UTC 2014


On Mon, May 19, 2014 at 06:51:35AM -0300, José Romildo Malaquias wrote:
> Hello.
> 
> I use encodign in a Haskell application and I would like to have it
> working with ghc-7.8.2.
> 
> So I am kindly asking to, if possible, update the encoding package[1] to
> be compilable with ghc-7.8.2.
> 
> Currently it fails with the messages:
> 
> [...]
>  * Prepending /usr/lib64/ghc-7.8.2 to LD_LIBRARY_PATH
> /usr/bin/ghc -package Cabal-1.20.0.0 --make /tmp/portage/dev-haskell/encoding-0.7/work/encoding-0.7/Setup.hs -dynamic -o setup
> [1 of 8] Compiling Data.Static      ( Data/Static.hs, Data/Static.o )
> Data/Static.hs:39:28:
>     Couldn't match expected type ‘Bool’ with actual type ‘Int#’
>     In the expression: eqWord# v (int2Word# 4294967295#)
>     In the expression:
>       if eqWord# v (int2Word# 4294967295#) then
>           Nothing
>       else
>           (if (I# (word2Int# v)) > 1114111 then
>                error
>                  (show (I# (word2Int# v))
>                   ++ " is not a valid char (" ++ show (I# i) ++ ")")
>            else
>                Just (chr (I# (word2Int# v))))
> /usr/bin/ghc -package Cabal-1.20.0.0 --make /tmp/portage/dev-haskell/encoding-0.7/work/encoding-0.7/Setup.hs -o setup
> [1 of 8] Compiling Data.Static      ( Data/Static.hs, Data/Static.o )
> 
> Data/Static.hs:39:28:
>     Couldn't match expected type ‘Bool’ with actual type ‘Int#’
>     In the expression: eqWord# v (int2Word# 4294967295#)
>     In the expression:
>       if eqWord# v (int2Word# 4294967295#) then
>           Nothing
>       else
>           (if (I# (word2Int# v)) > 1114111 then
>                error
>                  (show (I# (word2Int# v))
>                   ++ " is not a valid char (" ++ show (I# i) ++ ")")
>            else
>                Just (chr (I# (word2Int# v))))

With the attached patch I am able to compile encoding-0.7 with ghc-7.8.2
on my gentoo system.

Maybe it can be integrated into the source code in the darcs repository.

Romildo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: encoding-0.7.ghc782.patch
Type: text/x-diff
Size: 1573 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140519/48f0dca6/attachment.patch>


More information about the Haskell-Cafe mailing list