Working Version 0.0.1

This commit is contained in:
Macocian Adrian Radu
2022-03-03 00:41:18 +01:00
parent edee037aa3
commit a07fe3e67b
7 changed files with 53 additions and 40 deletions

View File

@@ -18,6 +18,15 @@ data Symbol = Var{
argsType :: [(Type, Cardinality)],
returnType :: (Type, Cardinality)
} deriving (Show)
instance Eq Symbol where
(==) (Var name1 _ _) (Var name2 _ _)
| name1 == name2 = True
| otherwise = False
(==) (Func name1 _ _) (Func name2 _ _)
| name1 == name2 = True
| otherwise = False
(==) _ _ = False
-- |A map of the predefined functions, their arguments and their return type