File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
src/Language/PureScript/Parser Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ parseValueDeclaration = do
110110
111111parseExternDeclaration :: TokenParser Declaration
112112parseExternDeclaration = reserved " foreign" *> indented *> reserved " import" *> indented *> parseExternAlt where
113- parseExternAlt = parseExternData <|> parseExternKind <|> parseExternTerm
113+ parseExternAlt = parseExternData <|> P. try parseExternKind <|> parseExternTerm
114114
115115 parseExternData = ExternDataDeclaration <$> (reserved " data" *> indented *> typeName)
116116 <*> (indented *> doubleColon *> parseKind)
@@ -167,11 +167,11 @@ parseImportDeclaration' = do
167167parseDeclarationRef :: TokenParser DeclarationRef
168168parseDeclarationRef =
169169 withSourceSpan PositionedDeclarationRef
170- $ (ValueRef <$> parseIdent)
170+ $ (KindRef <$> P. try (reserved " kind" *> kindName))
171+ <|> (ValueRef <$> parseIdent)
171172 <|> (ValueOpRef <$> parens parseOperator)
172173 <|> parseTypeRef
173174 <|> (TypeClassRef <$> (reserved " class" *> properName))
174- <|> (KindRef <$> (reserved " kind" *> kindName))
175175 <|> (ModuleRef <$> (indented *> reserved " module" *> moduleName))
176176 <|> (TypeOpRef <$> (indented *> reserved " type" *> parens parseOperator))
177177 where
Original file line number Diff line number Diff line change @@ -556,7 +556,6 @@ reservedPsNames :: [Text]
556556reservedPsNames = [ " data"
557557 , " newtype"
558558 , " type"
559- , " kind"
560559 , " foreign"
561560 , " import"
562561 , " infixl"
You can’t perform that action at this time.
0 commit comments