[Haskell-cafe] Cabal dependencies
shumovichy at gmail.com
Sat Oct 6 19:08:41 CEST 2012
On Sat, 2012-10-06 at 18:25 +0200, José Lopes wrote:
> But, wouldn't it be possible for xmobar to use mtl-188.8.131.52 and for
> parsec to use mtl-2.1.1, while xmobar would use this parsec version?
> In this case, I am assuming that mtl-184.108.40.206 and mtl-2.1.1 are
> considered two different libraries.
Usually it leads to "strange" compilation errors.
data AA = AA String
func0 :: Int -> AA
func0 n = AA $ replicate n "A"
func1 :: AA -> Int
func1 (AA str) = length str
func2 :: AA -> Int
func2 aa = func1 + 1
func3 :: Int -> Int
func3 n = func2 $ func0 n
If C and B are compiled with different versions of C,
then func3 will not compile. Compiler will say that
AA returned by func0 doesn't match AA expected by func2
More real examples:
More information about the Haskell-Cafe