]> 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 meta a = Printer {unPrinter :: TermAST meta}
13 print :: Printer meta a -> TermAST meta
14 print = unPrinter
15 print2 :: String -> Printer meta a1 -> Printer meta a2 -> Printer meta a3
16 print2 n (Printer aT) (Printer bT) = Printer $ BinTree2 (BinTree2 (BinTree0 (TokenTermAtom n)) aT) bT