summaryrefslogtreecommitdiff
path: root/TypeVar.hs
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2012-05-22 09:22:33 +1000
committerJed Barber <jjbarber@y7mail.com>2012-05-22 09:22:33 +1000
commit3ea6bacad9fd7b14d5454d6ea109f5de724fd690 (patch)
tree74a25abf68bcb98bc91d268d06800c8b33808df6 /TypeVar.hs
parente438502b5fbbfa22d73927daaa0d93dc650a033b (diff)
Split the Object wrapping from the actual computation in the article commands
Diffstat (limited to 'TypeVar.hs')
-rw-r--r--TypeVar.hs27
1 files changed, 27 insertions, 0 deletions
diff --git a/TypeVar.hs b/TypeVar.hs
index 436cde4..aea20a5 100644
--- a/TypeVar.hs
+++ b/TypeVar.hs
@@ -11,6 +11,13 @@ module TypeVar (
Var(..),
+ nullNumber,
+ nullName,
+ nullTyOp,
+ nullType,
+ nullConst,
+ nullVar,
+
mkEqualsType,
typeFunc,
typeBool,
@@ -60,6 +67,26 @@ instance Show Var where
+nullNumber :: Number
+nullNumber = 0
+
+nullTyOp :: TypeOp
+nullTyOp = TypeOp nullName
+
+nullType :: Type
+nullType = TypeVar nullName
+
+nullName :: Name
+nullName = Name [] ""
+
+nullConst :: Const
+nullConst = Const nullName
+
+nullVar :: Var
+nullVar = Var nullName nullType
+
+
+
mkEqualsType :: Type -> Type
mkEqualsType ty = typeFunc ty (typeFunc ty typeBool)