Re: [Haskell-cafe] [Haskell-beginners] No instance for (Show a)

2011-07-31 Thread Ovidiu Deac
It worked. Initially I didn't understand what you mean but after some googleing I figured it out what I had to do so I did this instance Show a ⇒ Show (Stack a) where show s = ... Now, thinking about this, it totally makes sense because Stack cannot be an instance of Show if the type a is no

Re: [Haskell-cafe] [Haskell-beginners] No instance for (Show a)

2011-07-31 Thread Mark Spezzano
Hi, You might need a class constraint. instance (Show a) => Show (Stack a) where This basically lets Haskell know that if your "a" type is Showable then "Stack a" is also Showable. Let me know if this works. Cheers, Mark Spezzano On 31/07/2011, at 6:49 PM, Ovidiu Deac wrote: > For some re