Package conflicts using cabal-dev

Hello, I am running into a strange issue that reminds me of Java's classloader black magic havoc :-) My code compiles fine using cabal-dev install, but when I try to compile an individual file with ghc, I got the following error: $ ghc -package-conf cabal-dev/packages-7.4.1.conf YakGraph.hs [1 of 1] Compiling YakGraph ( YakGraph.hs, YakGraph.o ) YakGraph.hs:13:30: Couldn't match expected type `Data.Text.Lazy.Internal.Text' with actual type `text-0.11.2.0:Data.Text.Lazy.Internal.Text' In the first argument of `unpack', namely `s' In the expression: unpack s In an equation for `fromGraphId': fromGraphId (Str s) = unpack s YakGraph.hs:24:57: Couldn't match expected type `Data.Text.Lazy.Internal.Text' with actual type `text-0.11.2.0:Data.Text.Lazy.Internal.Text' In the first argument of `unpack', namely `name' In the expression: unpack name In a case alternative: (Just (Str name)) : _ -> unpack name The code leading to this error is here: https://gist.github.com/4677191 Any insights on this would be appreciated. Arnaud

On Wednesday 30 January 2013, 22:29:23, Arnaud Bailly wrote: YakGraph.hs:13:30: Couldn't match expected type `Data.Text.Lazy.Internal.Text' with actual type `text-0.11.2.0:Data.Text.Lazy.Internal.Text' one package (at least) you use - probably graphviz - was compiled with a version of `text` that is not the newest you have installed. GHC selects the newest installed version of a package by default, cabal and cabal-dev select the version that the other used packages require. Add a -package text-0.11.2.0 flag to the command line.
participants (2)
-
Arnaud Bailly
-
Daniel Fischer