From 4c6386fd250e8447e76ec9dfb6e8f5a266a050e2 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 29 Feb 2024 11:35:25 +0100 Subject: Added higher order reducer --- src/Reducer/RKNL.hs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/Reducer/RKNL.hs') diff --git a/src/Reducer/RKNL.hs b/src/Reducer/RKNL.hs index 9513e38..5aa6ca1 100644 --- a/src/Reducer/RKNL.hs +++ b/src/Reducer/RKNL.hs @@ -2,7 +2,6 @@ -- based on the RKNL abstract machine module Reducer.RKNL ( reduce - , unsafeReduce ) where import Control.Concurrent.MVar @@ -11,7 +10,6 @@ import Data.Map.Strict ( Map ) import qualified Data.Map.Strict as Map import Data.Maybe ( fromMaybe ) import Helper -import System.IO.Unsafe ( unsafePerformIO ) -- TODO: AAH type Store = Map Int Box type Stack = [Redex] @@ -109,9 +107,3 @@ reduce e = do forEachState (loadTerm redex) transition >>= \case Cconf _ [] v -> pure $ fromRedex v _ -> invalidProgramState - --- TODO: AAAAAAAAAAAAAAAAH remove this --- (probably not thaaat bad) -{-# NOINLINE unsafeReduce #-} -unsafeReduce :: Expression -> Expression -unsafeReduce = unsafePerformIO . reduce -- cgit v1.2.3