From 3ea6bacad9fd7b14d5454d6ea109f5de724fd690 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 22 May 2012 09:22:33 +1000 Subject: Split the Object wrapping from the actual computation in the article commands --- TypeVar.hs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'TypeVar.hs') 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) -- cgit