From 089afa0ea1946cab837e0cc2f457ee135e0baf29 Mon Sep 17 00:00:00 2001 From: crumbtoo Date: Thu, 30 Nov 2023 14:08:19 -0700 Subject: [PATCH] TIM -> TI --- app/Main.hs | 8 ++++---- rlp.cabal | 2 +- src/Compiler/RLPC.hs | 2 +- src/GM.hs | 2 +- src/{TIM.hs => TI.hs} | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) rename src/{TIM.hs => TI.hs} (99%) diff --git a/app/Main.hs b/app/Main.hs index 1bb77c1..4bfcdd5 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -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 () diff --git a/rlp.cabal b/rlp.cabal index d909d49..4aeaa36 100644 --- a/rlp.cabal +++ b/rlp.cabal @@ -19,7 +19,7 @@ common warnings library import: warnings exposed-modules: Core - , TIM + , TI , GM , Compiler.RLPC diff --git a/src/Compiler/RLPC.hs b/src/Compiler/RLPC.hs index 7a266b8..a17b3fc 100644 --- a/src/Compiler/RLPC.hs +++ b/src/Compiler/RLPC.hs @@ -87,7 +87,7 @@ data RLPCOptions = RLPCOptions } deriving Show -data Evaluator = EvaluatorGM | EvaluatorTIM +data Evaluator = EvaluatorGM | EvaluatorTI deriving Show data Severity = Error diff --git a/src/GM.hs b/src/GM.hs index 76d2dd4..b757375 100644 --- a/src/GM.hs +++ b/src/GM.hs @@ -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 diff --git a/src/TIM.hs b/src/TI.hs similarity index 99% rename from src/TIM.hs rename to src/TI.hs index e05adaa..347642b 100644 --- a/src/TIM.hs +++ b/src/TI.hs @@ -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