@@ -35,6 +35,7 @@ import PureScript.Parser.Common
35import PureScript.Declarations
35import PureScript.Declarations
36import PureScript.Parser.Values
36import PureScript.Parser.Values
37import PureScript.Parser.Types
37import PureScript.Parser.Types
38+import PureScript.Parser.Kinds
39parseDataDeclaration :: P.Parsec String ParseState Declaration
40parseDataDeclaration :: P.Parsec String ParseState Declaration
40parseDataDeclaration = do
41parseDataDeclaration = do
@@ -62,9 +63,11 @@ parseValueDeclaration =
62 <*> (lexeme (indented *> P.char '=') *> parseValue)
63 <*> (lexeme (indented *> P.char '=') *> parseValue)
64parseExternDeclaration :: P.Parsec String ParseState Declaration
65parseExternDeclaration :: P.Parsec String ParseState Declaration
65−parseExternDeclaration =
66+parseExternDeclaration = reserved "extern" *> indented *>
67+ (ExternDataDeclaration <$> (reserved "data" *> indented *> properName)
68+ <*> (lexeme (indented *> P.string "::") *> parseKind)
66− ExternDeclaration <$> (reserved "extern" *> indented *> parseIdent)
69+ <|> ExternDeclaration <$> parseIdent
67− <*> (lexeme (indented *> P.string "::") *> parsePolyType)
70+ <*> (lexeme (indented *> P.string "::") *> parsePolyType))
69parseAssociativity :: P.Parsec String ParseState Associativity
72parseAssociativity :: P.Parsec String ParseState Associativity
70parseAssociativity =
73parseAssociativity =