maybe a bug in hugs version February 2001
20 Apr
2001
20 Apr
'01
5:25 p.m.
Prelude says: data Either a b = Left a | Right b deriving (Eq, Ord, Read, Show) ^^^^ Interactive session: Prelude> Left 3 ERROR - Cannot find "show" function for: *** Expression : Left 3 *** Of type : Either Integer a Test script:
data Foo a b = Bar a | Baz b showFoo (Bar x) = "Bar: " ++ show x showFoo (Baz x) = "Baz: " ++ show x
Interactive session: Main> showFoo (Bar 3) ERROR - Unresolved overloading *** Type : Show a => [Char] *** Expression : showFoo (Bar 3)
9174
Age (days ago)
9174
Last active (days ago)
0 comments
1 participants
participants (1)
-
paul.stoeber@in.stud.tu-ilmenau.de