summaryrefslogtreecommitdiff
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/TypeVar.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/TypeVar.hs b/Library/TypeVar.hs
index fbb06a6..078d5d3 100644
--- a/Library/TypeVar.hs
+++ b/Library/TypeVar.hs
@@ -14,7 +14,8 @@ module Library.TypeVar (
mkEqualsType,
typeFunc,
typeBool,
- typeVarsInType
+ typeVarsInType,
+ isTypeVar
) where
@@ -75,3 +76,9 @@ typeBool = AType [] (TypeOp (Name [] "bool"))
typeVarsInType :: Type -> Set.Set Type
typeVarsInType (TypeVar t) = Set.singleton (TypeVar t)
typeVarsInType (AType list _) = Set.unions . (map typeVarsInType) $ list
+
+
+isTypeVar :: Type -> Bool
+isTypeVar (TypeVar _) = True
+isTypeVar _ = False
+