Making the encoding Haskell package compile with ghc-7.8.2

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)))) Regards, Romildo

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
participants (1)
-
José Romildo Malaquias