From acaddc1e9d90dce0c81d8105a487d5bad6fece7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Wed, 20 May 2020 13:53:50 -0500 Subject: [PATCH] Rename module Parser.Rule to Parser.Rule.Source --- idris2.ipkg | 2 +- idris2api.ipkg | 2 +- idris2rkt.ipkg | 2 +- src/Parser/{Rule.idr => Rule/Source.idr} | 12 ++++++------ src/Parser/Source.idr | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) rename src/Parser/{Rule.idr => Rule/Source.idr} (98%) diff --git a/idris2.ipkg b/idris2.ipkg index 72791220a..a87a7f6b5 100644 --- a/idris2.ipkg +++ b/idris2.ipkg @@ -83,7 +83,7 @@ modules = Idris.Version, Parser.Lexer.Source, - Parser.Rule, + Parser.Rule.Source, Parser.Source, Parser.Support, Parser.Unlit, diff --git a/idris2api.ipkg b/idris2api.ipkg index 80da93bc0..dea8d1803 100644 --- a/idris2api.ipkg +++ b/idris2api.ipkg @@ -83,7 +83,7 @@ modules = Idris.Version, Parser.Lexer.Source, - Parser.Rule, + Parser.Rule.Source, Parser.Source, Parser.Support, Parser.Unlit, diff --git a/idris2rkt.ipkg b/idris2rkt.ipkg index 8b00ec695..02fd25271 100644 --- a/idris2rkt.ipkg +++ b/idris2rkt.ipkg @@ -83,7 +83,7 @@ modules = Idris.Version, Parser.Lexer.Source, - Parser.Rule, + Parser.Rule.Source, Parser.Source, Parser.Support, Parser.Unlit, diff --git a/src/Parser/Rule.idr b/src/Parser/Rule/Source.idr similarity index 98% rename from src/Parser/Rule.idr rename to src/Parser/Rule/Source.idr index a3419df45..1198882f9 100644 --- a/src/Parser/Rule.idr +++ b/src/Parser/Rule/Source.idr @@ -1,4 +1,4 @@ -module Parser.Rule +module Parser.Rule.Source import public Parser.Lexer.Source import public Parser.Support @@ -208,7 +208,7 @@ continueF : EmptyRule () -> (indent : IndentInfo) -> EmptyRule () continueF err indent = do eoi; err <|> do keyword "where"; err - <|> do col <- Rule.column + <|> do col <- Source.column if col <= indent then err else pure () @@ -277,7 +277,7 @@ atEnd indent = eoi <|> do nextIs "Expected end of block" (isTerminator . tok) pure () - <|> do col <- Rule.column + <|> do col <- Source.column if (col <= indent) then pure () else fail "Not the end of a block entry" @@ -287,7 +287,7 @@ export atEndIndent : (indent : IndentInfo) -> EmptyRule () atEndIndent indent = eoi - <|> do col <- Rule.column + <|> do col <- Source.column if col <= indent then pure () else fail "Not the end of a block entry" @@ -375,7 +375,7 @@ blockAfter mincol item ps <- blockEntries AnyIndent item symbol "}" pure ps - <|> do col <- Rule.column + <|> do col <- Source.column if col <= mincol then pure [] else blockEntries (AtPos col) item @@ -387,7 +387,7 @@ blockWithOptHeaderAfter {ty} mincol header item commit hidt <- optional $ blockEntry AnyIndent header restOfBlock hidt - <|> do col <- Rule.column + <|> do col <- Source.column if col <= mincol then pure (Nothing, []) else do hidt <- optional $ blockEntry (AtPos col) header diff --git a/src/Parser/Source.idr b/src/Parser/Source.idr index 595d995db..df83bd4e6 100644 --- a/src/Parser/Source.idr +++ b/src/Parser/Source.idr @@ -1,7 +1,7 @@ module Parser.Source import public Parser.Lexer.Source -import public Parser.Rule +import public Parser.Rule.Source import public Parser.Unlit import public Text.Lexer import public Text.Parser