bergamot/test/Main.purs

22 lines
769 B
Plaintext

module Test.Main where
import Prelude
import Language.Bergamot.Syntax
import Language.Bergamot.Rules
import Language.Bergamot.Unifier
import Language.Bergamot.Parser
import Language.Bergamot.Latex
import Control.Apply
import Control.Monad.Logic.Trans
import Control.Monad.Logic.Class
import Control.Monad.Unify.Trans
import Control.Monad.Unify.Class
import Data.List (List(..), (:))
import Data.Array (fromFoldable)
import Data.Foldable
import Data.Maybe
main :: String -> String -> Maybe String
main rs q = map (toLatex <<< map (const "?")) $ join $ lift2 runUnifier (fromFoldable <$> parseRules rs) (query <$> parseQuery q)
-- main = map toLatexProofTree $ runUnifier rules $ query $ tType (tSndExpr (tProdExpr tStringExpr (tPlusExpr tIntExpr tIntExpr))) (Var "T")