diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-09-26 00:28:41 -0600 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-09-26 00:28:41 -0600 |
commit | a4cffc1eeb547f780068875a703251db6aa41d6c (patch) | |
tree | 77d44ebaa73a909923b958c11daf1acd5a735977 /src/Language/Fiddle/Parser.hs | |
parent | 3a59cfb59b3339e13bdc9dfd1696ae2c554fcd9a (diff) | |
download | fiddle-a4cffc1eeb547f780068875a703251db6aa41d6c.tar.gz fiddle-a4cffc1eeb547f780068875a703251db6aa41d6c.tar.bz2 fiddle-a4cffc1eeb547f780068875a703251db6aa41d6c.zip |
Rename some of the stages.
Stage1 -> Parsed
Stage2 -> Expanded
Stage3 -> Checked
Diffstat (limited to 'src/Language/Fiddle/Parser.hs')
-rw-r--r-- | src/Language/Fiddle/Parser.hs | 12 |
1 files changed, 6 insertions, 6 deletions
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 |