diff options
-rw-r--r-- | TypeVar.hs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -58,13 +58,17 @@ instance Show Var where mkEqualsType :: Type -> Type -mkEqualsType ty = typeFunc (AType [] (TypeOp (Name [] "bool"))) (typeFunc ty ty) +mkEqualsType ty = typeFunc typeBool (typeFunc ty ty) typeFunc :: Type -> Type -> Type typeFunc ty1 ty2 = AType [ty1,ty2] (TypeOp (Name [] "->")) +typeBool :: Type +typeBool = AType [] (TypeOp (Name [] "bool")) + + typeVarsInType :: Type -> Set Type typeVarsInType (TypeVar t) = Set.singleton (TypeVar t) typeVarsInType (AType list _) = unions . (map typeVarsInType) $ list |