Skip to content

Commit

Permalink
allow parsing ctor fields
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorTaelin committed Sep 26, 2024
1 parent 174e027 commit 140255e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/Kind/Parse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,19 @@ parseCon = withSrc $ do
nam <- parseName
parseTrivia
P.char '{'
arg <- P.many $ P.try $ parseTerm
parseTrivia
args <- P.many $ P.try $ do
parseTrivia
fieldName <- P.optionMaybe $ do
name <- parseName
parseTrivia
P.char ':'
parseTrivia
return name
arg <- parseTerm
parseTrivia
return arg
P.char '}'
return $ Con nam arg
return $ Con nam args

parseSwi = withSrc $ do
P.try $ do
Expand Down

0 comments on commit 140255e

Please sign in to comment.