summaryrefslogtreecommitdiff
path: root/Main.hs
blob: 7099e074841b5ff3d3469b99af4ba2362424473f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)