summaryrefslogtreecommitdiff
path: root/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/Main.hs b/Main.hs
new file mode 100644
index 0000000..7099e07
--- /dev/null
+++ b/Main.hs
@@ -0,0 +1,21 @@
+module Main where
+
+import System.Exit (die)
+import Text.Parsec
+
+-- import Expr
+import Parser
+import Normalise
+
+
+main :: IO ()
+main = do
+ s <- getContents
+
+ expr <- case parse parseExpr "<stdin>" s of
+ Left err -> die (show err)
+ Right expr -> return expr
+
+ print expr
+
+ print (normalise expr)