Skip to content

Commit 4b144d6

Browse files
committed
Merge pull request purescript#1707 from purescript/1700
Fix purescript#1700, remove featureRemoved calls in parser (for 0.8)
2 parents ab1b00d + a8209f1 commit 4b144d6

4 files changed

Lines changed: 2 additions & 25 deletions

File tree

src/Language/PureScript/Docs/Convert.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ augmentDeclarations (partitionEithers -> (augments, toplevels)) =
9696
-- fixity declarations.
9797
--
9898
-- TODO: This may no longer be necessary after issue 806 is resolved, hopefully
99-
-- in 0.8.
99+
-- in 0.9.
100100
addDefaultFixity :: Declaration -> Declaration
101101
addDefaultFixity decl@Declaration{..}
102102
| isOp declTitle && isNothing declFixity =

src/Language/PureScript/Parser/Common.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ import Language.PureScript.Names
2727

2828
import qualified Text.Parsec as P
2929

30-
featureWasRemoved :: String -> TokenParser a
31-
featureWasRemoved err = do
32-
pos <- P.getPosition
33-
error $ "It looks like you are trying to use a feature from a previous version of the compiler:\n" ++ err ++ "\nat " ++ show pos
34-
3530
properName :: TokenParser ProperName
3631
properName = ProperName <$> uname
3732

src/Language/PureScript/Parser/Declarations.hs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ parseExternDeclaration = P.try (reserved "foreign") *> indented *> reserved "imp
106106
(ExternDataDeclaration <$> (P.try (reserved "data") *> indented *> properName)
107107
<*> (indented *> doubleColon *> parseKind)
108108
<|> (do ident <- parseIdent
109-
-- TODO: add a wiki page link with migration info
110-
-- TODO: remove this deprecation warning in 0.8
111-
_ <- P.optional $ stringLiteral *> featureWasRemoved "Inline foreign string literals are no longer supported."
112109
ty <- indented *> doubleColon *> noWildcards parsePolyType
113110
return $ ExternDeclaration ident ty))
114111

@@ -525,10 +522,8 @@ parseIdentifierAndBinder =
525522
-- Parse a binder
526523
--
527524
parseBinder :: TokenParser Binder
528-
parseBinder = withSourceSpan PositionedBinder (P.buildExpressionParser operators (buildPostfixParser postfixTable parseBinderAtom))
525+
parseBinder = withSourceSpan PositionedBinder (buildPostfixParser postfixTable parseBinderAtom)
529526
where
530-
-- TODO: remove this deprecation warning in 0.8
531-
operators = [ [ P.Infix (P.try $ C.indented *> colon *> featureWasRemoved "Cons binders are no longer supported. Consider using purescript-lists or purescript-sequences instead.") P.AssocRight ] ]
532527
-- TODO: parsePolyType when adding support for polymorphic types
533528
postfixTable = [ \b -> flip TypedBinder b <$> (P.try (indented *> doubleColon) *> parseType)
534529
]

src/Language/PureScript/Parser/Types.hs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,6 @@ import Language.PureScript.Environment
1717
import qualified Text.Parsec as P
1818
import qualified Text.Parsec.Expr as P
1919

20-
-- TODO: remove these deprecation warnings in 0.8
21-
parseArray :: TokenParser Type
22-
parseArray = do
23-
_ <- squares $ return tyArray
24-
featureWasRemoved "Array notation is no longer supported. Use Array instead of []."
25-
26-
parseArrayOf :: TokenParser Type
27-
parseArrayOf = do
28-
_ <- squares $ TypeApp tyArray <$> parseType
29-
featureWasRemoved "Array notation is no longer supported. Use Array _ instead of [_]."
30-
3120
parseFunction :: TokenParser Type
3221
parseFunction = parens $ rarrow >> return tyFunction
3322

@@ -56,8 +45,6 @@ parseForAll = mkForAll <$> (P.try (reserved "forall") *> P.many1 (indented *> id
5645
parseTypeAtom :: TokenParser Type
5746
parseTypeAtom = indented *> P.choice (map P.try
5847
[ parseConstrainedType
59-
, parseArray
60-
, parseArrayOf
6148
, parseFunction
6249
, parseObject
6350
, parseTypeWildcard

0 commit comments

Comments
 (0)