diff options
author | Marvin Borner | 2024-02-29 11:35:25 +0100 |
---|---|---|
committer | Marvin Borner | 2024-02-29 11:35:25 +0100 |
commit | 4c6386fd250e8447e76ec9dfb6e8f5a266a050e2 (patch) | |
tree | 885850a60fa523c553f95411d0a826a0866a4020 /src/Reducer/ION.hs | |
parent | d28604e2ebe4c58a9eb0ac2d7763b55f6c0beaea (diff) |
Added higher order reducer
Diffstat (limited to 'src/Reducer/ION.hs')
-rw-r--r-- | src/Reducer/ION.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Reducer/ION.hs b/src/Reducer/ION.hs index 9154bd8..5eb959b 100644 --- a/src/Reducer/ION.hs +++ b/src/Reducer/ION.hs @@ -147,7 +147,8 @@ rules ch vm = case chr' ch of let parentVal = load (load (sp vm1 + 1) vm1 + 1) vm1 let (a, vm2) = app (ord 'f') (load (sp vm1) vm1) vm1 lazy 0 (wor a) (wor parentVal) (store (sp vm2) parentVal vm2) - _ -> error $ "invalid combinator " ++ show ch + '\0' -> store (sp vm) (arg' 1 vm) vm + _ -> error $ "invalid combinator " ++ show ch where lvm n f g = lazy n f g vm eval :: VM -> VM |