From a4cffc1eeb547f780068875a703251db6aa41d6c Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 26 Sep 2024 00:28:41 -0600 Subject: Rename some of the stages. Stage1 -> Parsed Stage2 -> Expanded Stage3 -> Checked --- src/Language/Fiddle/Parser.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Language/Fiddle/Parser.hs') diff --git a/src/Language/Fiddle/Parser.hs b/src/Language/Fiddle/Parser.hs index 980925f..b3ed09a 100644 --- a/src/Language/Fiddle/Parser.hs +++ b/src/Language/Fiddle/Parser.hs @@ -29,7 +29,7 @@ type P = ParsecT S () Identity type A = Commented SourceSpan -type Pa (a :: Stage -> (Type -> Type) -> Type -> Type) = P (a 'Stage1 F (Commented SourceSpan)) +type Pa (a :: Stage -> (Type -> Type) -> Type -> Type) = P (a 'Parsed F (Commented SourceSpan)) type PaS (a :: (Type -> Type) -> Type -> Type) = P (a F (Commented SourceSpan)) @@ -52,7 +52,7 @@ isComment (Token t _) = stripTrailingComments :: [Token s] -> [Token s] stripTrailingComments = reverse . dropWhile isComment . reverse -directedP :: Pa t -> PaS (Directed t 'Stage1) +directedP :: Pa t -> PaS (Directed t 'Parsed) directedP subparser = withMeta $ do Directed <$> many directiveP <*> subparser @@ -164,7 +164,7 @@ objTypeP = do recur' <- recur return $ recur' base where - recur :: P (ObjType Stage1 F A -> ObjType Stage1 F A) + recur :: P (ObjType Parsed F A -> ObjType Parsed F A) recur = ( do withMeta $ do @@ -174,7 +174,7 @@ objTypeP = do ) <|> return id - baseObjP :: P (A -> ObjType Stage1 F A) + baseObjP :: P (A -> ObjType Parsed F A) baseObjP = (ReferencedObjType <$> name) <|> ( do @@ -262,7 +262,7 @@ registerBitsTypeRefP = do recur' <- recurP return (recur' base) where - recurP :: P (RegisterBitsTypeRef Stage1 F A -> RegisterBitsTypeRef Stage1 F A) + recurP :: P (RegisterBitsTypeRef Parsed F A -> RegisterBitsTypeRef Parsed F A) recurP = ( do withMeta $ do @@ -421,7 +421,7 @@ tok t' = do (\(Token _ (SourceSpan s1 _)) -> s1) (\tok@(Token t _) -> if t == t' then Just tok else Nothing) -parseFiddleText :: String -> Text -> F (FiddleUnit 'Stage1 F (Commented SourceSpan)) +parseFiddleText :: String -> Text -> F (FiddleUnit 'Parsed F (Commented SourceSpan)) parseFiddleText sourceName txt = runIdentity . Text.Parsec.runParserT -- cgit