diff options
| author | Simon-Kor <52245124+Simon-Kor@users.noreply.github.com> | 2024-06-18 17:16:31 +0200 |
|---|---|---|
| committer | Simon-Kor <52245124+Simon-Kor@users.noreply.github.com> | 2024-06-18 17:16:31 +0200 |
| commit | e90ffa98ad4fe2f12cff83656de84827e16e3ac4 (patch) | |
| tree | 0322a5b8a4eef68e2c37cba239e01695c813d3c8 /source/Syntax/Concrete.hs | |
| parent | 9563a18e455469bc64a9a8f61a95fb33f506bed0 (diff) | |
| parent | 2b2e37e1dc6d74433ef7d455a21f043df8201c3a (diff) | |
Merge remote-tracking branch 'upstream/main'
Diffstat (limited to 'source/Syntax/Concrete.hs')
| -rw-r--r-- | source/Syntax/Concrete.hs | 7 |
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 |
