Skip to content

Commit

Permalink
remove section titles from parser
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Nov 20, 2024
1 parent 15ec17d commit 3aeec44
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions src/Juvix/Compiler/Concrete/Translation/FromSource.hs
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,6 @@ replInput =
<|> ReplOpen <$> openModule
<|> ReplImport <$> import_

--------------------------------------------------------------------------------
-- Symbols and names
--------------------------------------------------------------------------------

symbol :: (Members '[ParserResultBuilder] r) => ParsecS r Symbol
symbol = uncurry (flip WithLoc) <$> identifierL

Expand Down Expand Up @@ -447,10 +443,6 @@ pusingList = do
topModulePath :: (Members '[ParserResultBuilder, PragmasStash, Error ParserError, JudocStash] r) => ParsecS r TopModulePath
topModulePath = mkTopModulePath <$> dottedSymbol

--------------------------------------------------------------------------------
-- Top level statement
--------------------------------------------------------------------------------

recoverStashes :: (Members '[PragmasStash, JudocStash] r) => ParsecS r a -> ParsecS r a
recoverStashes r = do
p <- P.lift (get @(Maybe ParsedPragmas))
Expand Down Expand Up @@ -668,10 +660,6 @@ builtinRecordField = do
void (kw kwBuiltin)
builtinFunction

--------------------------------------------------------------------------------
-- Syntax declaration
--------------------------------------------------------------------------------

syntaxDef :: forall r. (Members '[ParserResultBuilder, PragmasStash, Error ParserError, JudocStash] r) => ParsecS r (SyntaxDef 'Parsed)
syntaxDef = do
syn <- kw kwSyntax
Expand Down Expand Up @@ -796,10 +784,6 @@ iteratorSyntaxDef _iterSyntaxKw = do
_iterInfo <- optional parsedIteratorInfo
return IteratorSyntaxDef {..}

--------------------------------------------------------------------------------
-- Import statement
--------------------------------------------------------------------------------

import_ :: forall r. (Members '[ParserResultBuilder, PragmasStash, Error ParserError, JudocStash, Error ParserError] r) => ParsecS r (Import 'Parsed)
import_ = do
_importKw <- kw kwImport
Expand Down Expand Up @@ -1075,10 +1059,6 @@ parseList = do
_listBracketR <- Irrelevant <$> kw delimBracketR
return List {..}

--------------------------------------------------------------------------------
-- Literals
--------------------------------------------------------------------------------

literalInteger :: (Members '[ParserResultBuilder, PragmasStash, Error ParserError, JudocStash] r) => ParsecS r LiteralLoc
literalInteger = fmap LitIntegerWithBase <$> integerWithBase

Expand Down Expand Up @@ -1261,10 +1241,6 @@ multiwayIf = do
_ifBranchElse <- ifBranch
return If {..}

--------------------------------------------------------------------------------
-- Universe expression
--------------------------------------------------------------------------------

universe :: (Members '[ParserResultBuilder, PragmasStash, Error ParserError, JudocStash] r) => ParsecS r Universe
universe = do
i <- kw kwType
Expand Down Expand Up @@ -1440,10 +1416,6 @@ axiomDef _axiomBuiltin = do
_axiomType <- parseExpressionAtoms
return AxiomDef {..}

--------------------------------------------------------------------------------
-- Function expression
--------------------------------------------------------------------------------

implicitOpenField ::
(Members '[ParserResultBuilder, PragmasStash, Error ParserError, JudocStash] r) =>
ParsecS r (KeywordRef, IsImplicitField)
Expand Down Expand Up @@ -1501,10 +1473,6 @@ function = do
_funReturn <- parseExpressionAtoms
return Function {..}

--------------------------------------------------------------------------------
-- Lambda expression
--------------------------------------------------------------------------------

lambdaClause :: (Members '[ParserResultBuilder, PragmasStash, Error ParserError, JudocStash] r) => Irrelevant (Maybe KeywordRef) -> ParsecS r (LambdaClause 'Parsed)
lambdaClause _lambdaPipe = do
_lambdaParameters <- P.some patternAtom
Expand All @@ -1521,10 +1489,6 @@ lambda = do
let _lambdaBraces = Irrelevant (brl, brr)
return Lambda {..}

-------------------------------------------------------------------------------
-- Data type construction declaration
-------------------------------------------------------------------------------

inductiveDef :: (Members '[ParserResultBuilder, PragmasStash, Error ParserError, JudocStash] r) => Maybe (WithLoc BuiltinInductive) -> ParsecS r (InductiveDef 'Parsed)
inductiveDef _inductiveBuiltin = do
_inductivePositive <- optional (kw kwPositive)
Expand Down Expand Up @@ -1765,10 +1729,6 @@ parsePatternAtomsNested = do
(_patternAtoms, _patternAtomsLoc) <- second Irrelevant <$> interval (P.some patternAtomNested)
return PatternAtoms {..}

--------------------------------------------------------------------------------
-- Module declaration
--------------------------------------------------------------------------------

pmodulePath :: forall t r. (SingI t, Members '[ParserResultBuilder, PragmasStash, Error ParserError, JudocStash] r) => ParsecS r (ModulePathType 'Parsed t)
pmodulePath = case sing :: SModuleIsTop t of
SModuleTop -> topModulePath
Expand Down

0 comments on commit 3aeec44

Please sign in to comment.