summaryrefslogtreecommitdiff
path: root/app/Main.hs
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2022-10-16 21:49:59 +0200
committerMirek Kratochvil <exa.exa@gmail.com>2022-10-16 21:49:59 +0200
commit865d63a103d119e51a4fba3a0d185ff1c6394176 (patch)
treec9156491488db6985e370e4d080c2ac6504aae61 /app/Main.hs
parentcbd6aa4021f744be7301e9d5b6fce2c6c98c46ae (diff)
downloadprlg-865d63a103d119e51a4fba3a0d185ff1c6394176.tar.gz
prlg-865d63a103d119e51a4fba3a0d185ff1c6394176.tar.bz2
some small stuff
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs21
1 files changed, 14 insertions, 7 deletions
diff --git a/app/Main.hs b/app/Main.hs
index c2f03ee..0a1ba8f 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -1,32 +1,39 @@
module Main where
+import qualified Data.Map as M
import Interpreter
import Text.Pretty.Simple
-import qualified Data.Map as M
ppr :: Show a => a -> IO ()
-ppr = pPrintOpt CheckColorTty defaultOutputOptionsDarkBg {outputOptionsCompactParens = True, outputOptionsIndentAmount = 2, outputOptionsPageWidth=80}
+ppr =
+ pPrintOpt
+ CheckColorTty
+ defaultOutputOptionsDarkBg
+ { outputOptionsCompactParens = True
+ , outputOptionsIndentAmount = 2
+ , outputOptionsPageWidth = 80
+ }
main :: IO ()
main = do
let (res, interp) =
- prove [Goal, U (Struct (1, 2)), U (Atom 1), U (Atom 2), LastCall] $
+ prove [Goal, U (Struct $ Id 1 2), U (Atom 1), U (Atom 2), LastCall] $
M.fromList
- [ ( (1, 2)
+ [ ( Id 1 2
, [ [U (Atom 333), U (Atom 444), NoGoal]
, [ U (Atom 1)
, U (Atom 2)
, Goal
- , U (Struct (2, 0))
+ , U (Struct $ Id 2 0)
, Call
, Goal
- , U (Struct (5, 2))
+ , U (Struct $ Id 1 2)
, U (Atom 333)
, U (Atom 444)
, LastCall
]
])
- , ((2, 0), [[NoGoal]])
+ , (Id 2 0, [[NoGoal]])
]
ppr interp
ppr res