generic type information still contains synonyms
The following program:
module test
import StdEnv, StdGeneric
generic g a :: a -> String
g{|Int|} _ = "Int"
g{|RECORD of grd|} f (RECORD a) = grd.grd_name +++ " " +++ f a +++ " (" +++ toString grd.grd_type +++ ")"
g{|FIELD|} f (FIELD a) = f a
instance toString GenType
where
toString (GenTypeCons a) = a
toString (GenTypeVar i) = toString i
toString (GenTypeApp l r) = "(" +++ toString l +++ " " +++ toString r +++ ")"
toString (GenTypeArrow l r) = "(" +++ toString l +++ "->" +++ toString r +++ ")"
:: Syn :== Int
:: T = {t :: Syn}
derive g T
Start = g{|*|} {t=42}
Produces:
T Int ((Syn->T))
While I expect it (and want it) to produce:
T Int ((Int->T))