Fix set1 parsing and ignore HIE yaml

This commit is contained in:
Hugh Sipiere 2020-05-24 14:19:37 +01:00
parent b795014ba0
commit d2d8b9c82f
2 changed files with 6 additions and 1 deletions

2
.gitignore vendored
View File

@ -31,3 +31,5 @@ grin/.end-to-end-test/
*.out.ll
*.out.s
.ghc.environment.*
hie.yaml
*.lock

View File

@ -89,11 +89,14 @@ vec1 p = Vec.fromList <$> list1 p
bracedList :: Parser a -> Parser [a]
bracedList p = braces (sepBy p (op ","))
bracedList1 :: Parser a -> Parser [a]
bracedList1 p = braces (sepBy1 p (op ","))
set :: Ord a => Parser a -> Parser (Set a)
set p = Set.fromList <$> bracedList p
set1 :: Ord a => Parser a -> Parser (Set a)
set1 p = Set.fromList <$> bracedList p
set1 p = Set.fromList <$> bracedList1 p
anySingleBut :: MonadParsec e s m => Token s -> m (Token s)
anySingleBut t = satisfy (/= t)