diff options
author | Tom Smeding <tom@tomsmeding.com> | 2023-04-04 20:56:49 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2023-04-04 20:56:49 +0200 |
commit | 3df25408b6bc76745f03c824bd96d043561f3b45 (patch) | |
tree | 99941108b537e8ebaa8b5512744dd80220d76430 /Main.hs |
Diffstat (limited to 'Main.hs')
-rw-r--r-- | Main.hs | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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) |