diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-03-16 14:15:42 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-03-16 14:15:42 +0100 |
| commit | 8c8f6155f1b05230c271059c52a503211aec872b (patch) | |
| tree | 53626fa32ad3f6178b42a9dc5db588ee01277cd5 /src/Assignment.hs | |
| parent | d17423cba7c15a26f835a6fa578ecb48b80d8aab (diff) | |
| download | computorv2-8c8f6155f1b05230c271059c52a503211aec872b.tar.gz computorv2-8c8f6155f1b05230c271059c52a503211aec872b.tar.bz2 computorv2-8c8f6155f1b05230c271059c52a503211aec872b.zip | |
file Renaming, basic REPL
Diffstat (limited to 'src/Assignment.hs')
| -rw-r--r-- | src/Assignment.hs | 11 |
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 |
