[1 of 1] Compiling Main ( prog.hs, prog.o )
prog.hs:8:3:
No instance for (Show a0) arising from a use of `print'
The type variable `a0' is ambiguous
Possible fix: add a type signature that fixes these type variable(s)
Note: there are several potential instances:
instance (Show a, Show b) => Show (DataOrError a b)
-- Defined at prog.hs:1:50
instance Show Double -- Defined in `GHC.Float'
instance Show Float -- Defined in `GHC.Float'
...plus 24 others
In a stmt of a 'do' block: print (apply (+) x1 x2)
In the expression:
do { print (apply (+) x1 x2);
print (apply (+) x1 e2);
print (apply (+) e1 x2);
print (apply (+) e1 e2) }
In an equation for `main':
main
= do { print (apply (+) x1 x2);
print (apply (+) x1 e2);
print (apply (+) e1 x2);
.... }
where
x1 = Data (2 :: Int)
x2 = Data (3 :: Int)
e1 = Error ("First thing failed")
e2 = Error ("Second thing failed")