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