Hello,
The following code:
-----
data Tree a = Leaf | Node a Tree Tree
double :: Tree Int -> Tree Int
double Leaf
= Node 1 Leaf Leaf
double (Node myKey leftTree rightTree)
= Node myKey (double leftTree) (double rightTree)
-----
caused an error message:
-----
ghc-6.4: panic! (the `impossible' happened, GHC version 6.4):
Unify.unifyTauTyLists: mismatched type lists!
Please report it as a compiler bug to glasgow-haskell-bugs@haskell.org,
or http://sourceforge.net/projects/ghc/.
-----
The desired code (without polymorphic types) can be achieved without
error using:
-----
data Tree = Leaf | Node Int Tree Tree
double :: Tree -> Tree
double Leaf
= Node 1 Leaf Leaf
double (Node myKey leftTree rightTree)
= Node myKey (double leftTree) (double rightTree)
-----
Regards,
Thurston
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs