40 lines
928 B
Haskell
40 lines
928 B
Haskell
module Main where
|
|
|
|
import qualified Data.Map as M
|
|
import Interpreter
|
|
import Text.Pretty.Simple
|
|
|
|
ppr :: Show a => a -> IO ()
|
|
ppr =
|
|
pPrintOpt
|
|
CheckColorTty
|
|
defaultOutputOptionsDarkBg
|
|
{ outputOptionsCompactParens = True
|
|
, outputOptionsIndentAmount = 2
|
|
, outputOptionsPageWidth = 80
|
|
}
|
|
|
|
main :: IO ()
|
|
main = do
|
|
let (res, interp) =
|
|
prove [Goal, U (Struct $ Id 1 2), U (Atom 1), U (Atom 2), LastCall] $
|
|
M.fromList
|
|
[ ( Id 1 2
|
|
, [ [U (Atom 333), U (Atom 444), NoGoal]
|
|
, [ U (Atom 1)
|
|
, U (Atom 2)
|
|
, Goal
|
|
, U (Struct $ Id 2 0)
|
|
, Call
|
|
, Goal
|
|
, U (Struct $ Id 1 2)
|
|
, U (Atom 333)
|
|
, U (Atom 444)
|
|
, LastCall
|
|
]
|
|
])
|
|
, (Id 2 0, [[NoGoal]])
|
|
]
|
|
ppr interp
|
|
ppr res
|