From d50ec6414ac487ad057bbcd5644ca6bf370183fc Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sat, 7 Jan 2023 18:12:39 +0100 Subject: [PATCH] fix clause order --- app/Builtins.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Builtins.hs b/app/Builtins.hs index 34cc665..a273660 100644 --- a/app/Builtins.hs +++ b/app/Builtins.hs @@ -274,12 +274,12 @@ modDef :: ([Code] -> Maybe [Code]) -> IR.Id -> PrlgEnv () modDef fn struct = modify $ \s -> s {defs = M.alter (maybe (fn []) fn) struct $ defs s} -addClauseZ :: Code -> IR.Id -> PrlgEnv () -addClauseZ code = modDef $ Just . ([code] ++) - addClauseA :: Code -> IR.Id -> PrlgEnv () addClauseA code = modDef $ Just . (code :) +addClauseZ :: Code -> IR.Id -> PrlgEnv () +addClauseZ code = modDef $ Just . (++ [code]) + addProcedure :: [Code] -> IR.Id -> PrlgEnv () addProcedure heads = modDef $ Just . const heads