[Haskell-cafe] YAHT: Ex 9.2

2006-10-29 Thread Magnus Therning
I've been slowly making my way through Yet Another Haskell Tutorial. As a first introduction to the language it doesn't seem bad at all. However, I'm wondering about the proposed solution to exercise 9.2. The text itself suggests using instance Monad (Either String) where, so I arrived at

Re: [Haskell-cafe] YAHT: Ex 9.2

2006-10-29 Thread Nicolas Frisby
Quick fix: add this line to the top of your file {-# OPTIONS -fglasgow-exts #-} Having String instead of a free type variable is beyond the basic limitations of Haskell's type classses. However, enabling the very common Glasgow extensions expands the rules to admit your definition. If you for