From 8c8f6155f1b05230c271059c52a503211aec872b Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 16 Mar 2020 14:15:42 +0100 Subject: file Renaming, basic REPL --- src/Assignment.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/Assignment.hs (limited to 'src/Assignment.hs') 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 -- cgit