{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RankNTypes #-} module Symantic.Printer where import Data.Function (($)) import Data.String (String) import Symantic.Parser -- TODO: var num newtype Printer prov a = Printer {unPrinter :: TermAST prov} print :: Printer prov a -> TermAST prov print = unPrinter print2 :: String -> Printer prov a1 -> Printer prov a2 -> Printer prov a3 print2 n (Printer aT) (Printer bT) = Printer $ BinTree2 (BinTree2 (BinTree0 (TokenTermAtom n)) aT) bT