aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Reducer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Reducer.hs')
-rw-r--r--src/Reducer.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Reducer.hs b/src/Reducer.hs
index 3be8306..31ed3da 100644
--- a/src/Reducer.hs
+++ b/src/Reducer.hs
@@ -1,18 +1,20 @@
-- MIT License, Copyright (c) 2024 Marvin Borner
module Reducer
( reduce
- , unsafeReduce
+ , reduceNoIO
) where
import Helper
+import qualified Reducer.HigherOrder as HigherOrder
import qualified Reducer.ION as ION
import qualified Reducer.RKNL as RKNL
reduce :: EvalConf -> Expression -> IO Expression
reduce conf e = case _reducer conf of
- "RKNL" -> RKNL.reduce e
- "ION" -> pure $ ION.reduce e
- _ -> error "Invalid reducer"
+ "RKNL" -> RKNL.reduce e
+ "ION" -> pure $ ION.reduce e
+ "HigherOrder" -> pure $ HigherOrder.reduce e
+ _ -> error "Invalid reducer"
-unsafeReduce :: Expression -> Expression
-unsafeReduce = RKNL.unsafeReduce
+reduceNoIO :: Expression -> Expression
+reduceNoIO = HigherOrder.reduce