From 865d63a103d119e51a4fba3a0d185ff1c6394176 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sun, 16 Oct 2022 21:49:59 +0200 Subject: some small stuff --- app/Main.hs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'app/Main.hs') 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 -- cgit v1.2.3