Hi,
I met some problems while deriving Text instances.
Firstly, I build the following module:
module A(Poly(Glue)) where
data (Num a) => Poly a = Glue a (Poly a) deriving (Eq, Text)
Then, I try to evaluate 'zero' in module Test.
module Test(p1) where
import A(Poly(Glue))
zero = Glue 0 zero
I got the error message:
Evaluating (in file hw4.hs): zero
Glue
>>Error: The symbol #:|sel-Num/showsPrec6428| has no global value
LISP:SYMBOL-VALUE:
Required arg 0 (S): #:|sel-Num/showsPrec6428|
:C 0: Try evaluating #:|sel-Num/showsPrec6428| again
1: Restart Haskell.
Is there anything wrong with my code? Or 'zero' can't be output even it's
Text instance has been derived?
Thank you!