summaryrefslogtreecommitdiff
path: root/Main.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2023-04-04 20:56:49 +0200
committerTom Smeding <tom@tomsmeding.com>2023-04-04 20:56:49 +0200
commit3df25408b6bc76745f03c824bd96d043561f3b45 (patch)
tree99941108b537e8ebaa8b5512744dd80220d76430 /Main.hs
InitialHEADmaster
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)