]> Git — Sourcephile - tmp/julm/symantic.git/blob - src/Symantic/Printer.hs
init
[tmp/julm/symantic.git] / src / Symantic / Printer.hs
1 {-# LANGUAGE ExistentialQuantification #-}
2 {-# LANGUAGE RankNTypes #-}
3
4 module Symantic.Printer where
5
6 import Data.Function (($))
7 import Data.String (String)
8
9 import Symantic.Parser
10
11 -- TODO: var num
12 newtype Printer prov a = Printer {unPrinter :: TermAST prov}
13 print :: Printer prov a -> TermAST prov
14 print = unPrinter
15 print2 :: String -> Printer prov a1 -> Printer prov a2 -> Printer prov a3
16 print2 n (Printer aT) (Printer bT) = Printer $ BinTree2 (BinTree2 (BinTree0 (TokenTermAtom n)) aT) bT