TIM -> TI

This commit is contained in:
crumbtoo
2023-11-30 14:08:19 -07:00
parent e01f0d67a9
commit 089afa0ea1
5 changed files with 10 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ import Data.HashSet qualified as S
import System.IO import System.IO
import System.Exit (exitSuccess) import System.Exit (exitSuccess)
import Core import Core
import TIM import TI
import GM import GM
import Lens.Micro import Lens.Micro
import Lens.Micro.Mtl import Lens.Micro.Mtl
@@ -41,7 +41,7 @@ options = RLPCOptions
<*> option evaluatorReader <*> option evaluatorReader
( long "evaluator" ( long "evaluator"
<> short 'e' <> short 'e'
<> metavar "gm|tim" <> metavar "gm|ti"
<> value EvaluatorGM <> value EvaluatorGM
<> help "the intermediate layer used to model evaluation" <> help "the intermediate layer used to model evaluation"
) )
@@ -53,7 +53,7 @@ options = RLPCOptions
evaluatorReader :: ReadM Evaluator evaluatorReader :: ReadM Evaluator
evaluatorReader = maybeReader $ \case evaluatorReader = maybeReader $ \case
"gm" -> Just EvaluatorGM "gm" -> Just EvaluatorGM
"tim" -> Just EvaluatorTIM "tim" -> Just EvaluatorTI
_ -> Nothing _ -> Nothing
mmany :: (Alternative f, Monoid m) => f m -> f m mmany :: (Alternative f, Monoid m) => f m -> f m
@@ -115,6 +115,6 @@ ddumpEval = whenFlag flagDDumpEval do
ev <- view rlpcEvaluator ev <- view rlpcEvaluator
pure $ case ev of pure $ case ev of
EvaluatorGM -> v GM.hdbgProg EvaluatorGM -> v GM.hdbgProg
EvaluatorTIM -> v TIM.hdbgProg EvaluatorTI -> v TI.hdbgProg
where v f p h = f p h *> pure () where v f p h = f p h *> pure ()

View File

@@ -19,7 +19,7 @@ common warnings
library library
import: warnings import: warnings
exposed-modules: Core exposed-modules: Core
, TIM , TI
, GM , GM
, Compiler.RLPC , Compiler.RLPC

View File

@@ -87,7 +87,7 @@ data RLPCOptions = RLPCOptions
} }
deriving Show deriving Show
data Evaluator = EvaluatorGM | EvaluatorTIM data Evaluator = EvaluatorGM | EvaluatorTI
deriving Show deriving Show
data Severity = Error data Severity = Error

View File

@@ -109,7 +109,7 @@ doAdmin :: GmState -> GmState
doAdmin st = st & gmStats . stsReductions %~ succ doAdmin st = st & gmStats . stsReductions %~ succ
-- the state is considered final if there is no more code to execute. very -- 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 :: GmState -> Bool
isFinal st = null $ st ^. gmCode isFinal st = null $ st ^. gmCode

View File

@@ -1,12 +1,12 @@
{-| {-|
Module : TIM Module : TI
Description : The Template Instantiation Machine Description : The Template Instantiator
-} -}
{-# LANGUAGE LambdaCase, BlockArguments #-} {-# LANGUAGE LambdaCase, BlockArguments #-}
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TemplateHaskell #-}
module TIM module TI
( module Core.Examples ( module Core.Examples
, hdbgProg , hdbgProg
) where ) where