Zonk metas in functions, optional type signature on ptype
This commit is contained in:
@@ -272,7 +272,14 @@ parseDef = do
|
||||
|
||||
export
|
||||
parsePType : Parser Decl
|
||||
parsePType = PType <$> getPos <* keyword "ptype" <*> uident
|
||||
parsePType = do
|
||||
fc <- getPos
|
||||
keyword "ptype"
|
||||
id <- uident
|
||||
ty <- optional $ do
|
||||
keyword ":"
|
||||
mustWork typeExpr
|
||||
pure $ PType fc id ty
|
||||
|
||||
parsePFunc : Parser Decl
|
||||
parsePFunc = do
|
||||
|
||||
Reference in New Issue
Block a user