From e248226f442f289f3b7399411cdfd127a0de4d1a Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sat, 12 Nov 2022 19:02:45 +0100 Subject: o hello prlg --- app/Builtins.hs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'app/Builtins.hs') diff --git a/app/Builtins.hs b/app/Builtins.hs index b4d6b8d..eb62526 100644 --- a/app/Builtins.hs +++ b/app/Builtins.hs @@ -6,6 +6,11 @@ import qualified Data.Map as M import Env import qualified Operators as O +import Debug.Trace + +hello :: BuiltinFunc +hello = BuiltinFunc $ trace "hllo prlg" + addBuiltins :: PrlgEnv () addBuiltins = do a1 <- findStruct "a" 1 @@ -13,19 +18,21 @@ addBuiltins = do b <- findAtom "b" c <- findAtom "c" b0 <- findStruct "b" 0 - any <- findStruct "any" 1 - eq <- findStruct "=" 2 + any1 <- findStruct "any" 1 + eq2 <- findStruct "=" 2 + hello0 <- findStruct "hello" 0 modify $ \s -> s { defs = M.fromList - [ (eq, [[U (LocalRef 0 Nothing), U (LocalRef 0 Nothing), NoGoal]]) + [ (eq2, [[U (LocalRef 0 Nothing), U (LocalRef 0 Nothing), NoGoal]]) , (a1, [[U (Atom a), NoGoal], [U (Atom b), NoGoal]]) , ( b0 , [ [Goal, U (Struct a1), U (Atom c), LastCall] , [Goal, U (Struct a1), U (Atom b), LastCall] ]) - , (any, [[U (VoidRef Nothing), NoGoal]]) + , (any1, [[U (VoidRef Nothing), NoGoal]]) + , (hello0, [[Builtin hello]]) ] , ops = [(O.xfy "," 1000), (O.xfx "=" 700)] } -- cgit v1.2.3