TIM -> TI
This commit is contained in:
@@ -9,7 +9,7 @@ import Data.HashSet qualified as S
|
||||
import System.IO
|
||||
import System.Exit (exitSuccess)
|
||||
import Core
|
||||
import TIM
|
||||
import TI
|
||||
import GM
|
||||
import Lens.Micro
|
||||
import Lens.Micro.Mtl
|
||||
@@ -41,7 +41,7 @@ options = RLPCOptions
|
||||
<*> option evaluatorReader
|
||||
( long "evaluator"
|
||||
<> short 'e'
|
||||
<> metavar "gm|tim"
|
||||
<> metavar "gm|ti"
|
||||
<> value EvaluatorGM
|
||||
<> help "the intermediate layer used to model evaluation"
|
||||
)
|
||||
@@ -53,7 +53,7 @@ options = RLPCOptions
|
||||
evaluatorReader :: ReadM Evaluator
|
||||
evaluatorReader = maybeReader $ \case
|
||||
"gm" -> Just EvaluatorGM
|
||||
"tim" -> Just EvaluatorTIM
|
||||
"tim" -> Just EvaluatorTI
|
||||
_ -> Nothing
|
||||
|
||||
mmany :: (Alternative f, Monoid m) => f m -> f m
|
||||
@@ -115,6 +115,6 @@ ddumpEval = whenFlag flagDDumpEval do
|
||||
ev <- view rlpcEvaluator
|
||||
pure $ case ev of
|
||||
EvaluatorGM -> v GM.hdbgProg
|
||||
EvaluatorTIM -> v TIM.hdbgProg
|
||||
EvaluatorTI -> v TI.hdbgProg
|
||||
where v f p h = f p h *> pure ()
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ common warnings
|
||||
library
|
||||
import: warnings
|
||||
exposed-modules: Core
|
||||
, TIM
|
||||
, TI
|
||||
, GM
|
||||
, Compiler.RLPC
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ data RLPCOptions = RLPCOptions
|
||||
}
|
||||
deriving Show
|
||||
|
||||
data Evaluator = EvaluatorGM | EvaluatorTIM
|
||||
data Evaluator = EvaluatorGM | EvaluatorTI
|
||||
deriving Show
|
||||
|
||||
data Severity = Error
|
||||
|
||||
@@ -109,7 +109,7 @@ doAdmin :: GmState -> GmState
|
||||
doAdmin st = st & gmStats . stsReductions %~ succ
|
||||
|
||||
-- the state is considered final if there is no more code to execute. very
|
||||
-- simple compared to TIM
|
||||
-- simple compared to TI
|
||||
isFinal :: GmState -> Bool
|
||||
isFinal st = null $ st ^. gmCode
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{-|
|
||||
Module : TIM
|
||||
Description : The Template Instantiation Machine
|
||||
Module : TI
|
||||
Description : The Template Instantiator
|
||||
-}
|
||||
{-# LANGUAGE LambdaCase, BlockArguments #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
module TIM
|
||||
module TI
|
||||
( module Core.Examples
|
||||
, hdbgProg
|
||||
) where
|
||||
Reference in New Issue
Block a user