[Haskell-cafe] Impossible class instance?

2011-05-16 Thread Emil Axelsson
Hello! At the end of this message is a program with a simple expression type, and a class `ToExpr` that generalizes expressions to arbitrary Haskell types. Every node in `Expr` is annotated with some abstract information. The program raises the following type error: test.hs:13:5:

Re: [Haskell-cafe] Impossible class instance?

2011-05-16 Thread Emil Axelsson
Ahh, never mind... I just realized there's no way to relate the `info` in the instance to the `info` in the class definition. Alright, I'll keep trying to make this work. Sorry for the noise! / Emil 2011-05-16 12:19, Emil Axelsson skrev: Hello! At the end of this message is a program with