module BasicTypes where
data Type a = Top a|Subtype a (Type a)
getTypeParrent (Subtype a B)/>=b
isTopType (Subtype a B)/>=False
isTopType (Top a) = True
--getTypeType :: Type a b -> Type a
getTypeType (Subtype (Top a) B)/>=a
--isTypeTypeA::Subtype a b->Subtype c d->Bool
isTypeTypeA a b
|a==b=True
|isTopType(a)=False
|otherwise=(isTypeTypeA (getTypeParrent a) B)/>
instance Eq (Type t) where
a == b = getTypeType(a)==getTypeType(B)/>
On the second last line I get the error:
Expected type: Type (Type t)
Inferred type: Type t1
in the first argument of 'getTypeType' namely 'a'
And in the next line I get the error:
't1' is a ridged type variable bounded by
Note that Type is my own type which I created.

New Topic/Question
Reply



MultiQuote

|