aboutsummaryrefslogtreecommitdiff
path: root/src/assignment.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/assignment.hs')
-rw-r--r--src/assignment.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/assignment.hs b/src/assignment.hs
new file mode 100644
index 0000000..c086280
--- /dev/null
+++ b/src/assignment.hs
@@ -0,0 +1,11 @@
+module Assignment where
+
+import qualified Expr as E
+
+data Assignment
+ = Variable String E.Expr
+ | Function String String E.Expr
+
+instance Show Assignment where
+ show (Variable name e) = name ++ " = " ++ show e
+ show (Function name arg e) = name ++ "(" ++ arg ++ ") = " ++ show e