summaryrefslogtreecommitdiff
path: root/source/Syntax
diff options
context:
space:
mode:
Diffstat (limited to 'source/Syntax')
-rw-r--r--source/Syntax/Concrete.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/Syntax/Concrete.hs b/source/Syntax/Concrete.hs
index bad9635..b51b738 100644
--- a/source/Syntax/Concrete.hs
+++ b/source/Syntax/Concrete.hs
@@ -241,7 +241,7 @@ grammar lexicon@Lexicon{..} = mdo
asmLetStruct <- rule $ AsmLetStruct <$> (_let *> var <* _be <* _an) <*> structNounNameless
asmLet <- rule $ asmLetNoun <|> asmLetNouns <|> asmLetIn <|> asmLetEq <|> asmLetThe <|> asmLetStruct
asmSuppose <- rule $ AsmSuppose <$> (_suppose *> stmt)
- asm <- rule $ assumptionList (asmLet <|> asmSuppose) <* _dot
+ asm <- rule $ andList1_ (asmLet <|> asmSuppose) <* _dot
asms <- rule $ concat <$> many asm
axiom <- rule $ Axiom <$> asms <* optional _then <*> stmt <* _dot
@@ -406,7 +406,7 @@ andList1 item = ((:|) <$> item <*> many (_commaAnd *> item))
-- | Like 'andList1', but drops the information about nonemptiness.
andList1_ :: Prod r Text (Located Token) a -> Prod r Text (Located Token) [a]
-andList1_ item = toList <$> andList1 item
+andList1_ item = NonEmpty.toList <$> andList1 item
commaList :: Prod r Text (Located Token) a -> Prod r Text (Located Token) (NonEmpty a)
@@ -421,9 +421,6 @@ commaList2 :: Prod r Text (Located Token) a -> Prod r Text (Located Token) (NonE
commaList2 item = (:|) <$> item <* _comma <*> commaList_ item
-assumptionList :: Prod r Text (Located Token) a -> Prod r Text (Located Token) [a]
-assumptionList item = NonEmpty.toList <$> andList1 item
-
enumerated :: Prod r Text (Located Token) a -> Prod r Text (Located Token) [a]
enumerated p = NonEmpty.toList <$> enumerated1 p