diff options
author | Jed Barber <jjbarber@y7mail.com> | 2012-05-15 00:31:58 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2012-05-15 00:31:58 +1000 |
commit | 7a0eb21089bc60cf779469d04fe35632aec43f0e (patch) | |
tree | 65e990da9451d0acc85122c3e6e566b91af92f28 | |
parent | 0ec171c9aa15390e8579c14d996d1f8be20b7b55 (diff) |
Added a standard reference for a bool type
-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 |