The following program
type A = (a :: Integer)
x = (a=2) :: Rec A
produces the error message
ERROR "Junk.hs" (line 2): Type error in type annotation
*** Term : (a=2)
*** Type : Rec (a :: a)
*** Does not match : Rec A
*** Because : rows are not compatible
which is strange to say the least!
It seems that synonym definitions for rows are accepted, but are not unfolded
during type checking.
John Hughes
- RE: Type synonyms and Trex John Hughes
- RE: Type synonyms and Trex Mark P Jones
- Re: Type synonyms and Trex Ross Paterson
