summaryrefslogtreecommitdiff
path: root/compiler/rename/RnExpr.hs
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2018-06-02 11:56:58 -0400
committerBen Gamari <ben@smart-cactus.org>2018-06-02 16:21:12 -0400
commitfaee23bb69ca813296da484bc177f4480bcaee9f (patch)
tree28e1c99f0de9d505c1df81ae7459839f5db4121c /compiler/rename/RnExpr.hs
parent13a86606e51400bc2a81a0e04cfbb94ada5d2620 (diff)
downloadhaskell-faee23bb69ca813296da484bc177f4480bcaee9f.tar.gz
vectorise: Put it out of its misery
Poor DPH and its vectoriser have long been languishing; sadly it seems there is little chance that the effort will be rekindled. Every few years we discuss what to do with this mass of code and at least once we have agreed that it should be archived on a branch and removed from `master`. Here we do just that, eliminating heaps of dead code in the process. Here we drop the ParallelArrays extension, the vectoriser, and the `vector` and `primitive` submodules. Test Plan: Validate Reviewers: simonpj, simonmar, hvr, goldfire, alanz Reviewed By: simonmar Subscribers: goldfire, rwbarton, thomie, mpickering, carter Differential Revision: https://phabricator.haskell.org/D4761
Diffstat (limited to 'compiler/rename/RnExpr.hs')
-rw-r--r--compiler/rename/RnExpr.hs33
1 files changed, 3 insertions, 30 deletions
diff --git a/compiler/rename/RnExpr.hs b/compiler/rename/RnExpr.hs
index 8478ab0322..937ffaf248 100644
--- a/compiler/rename/RnExpr.hs
+++ b/compiler/rename/RnExpr.hs
@@ -272,10 +272,6 @@ rnExpr (ExplicitList x _ exps)
else
return (ExplicitList x Nothing exps', fvs) }
-rnExpr (ExplicitPArr x exps)
- = do { (exps', fvs) <- rnExprs exps
- ; return (ExplicitPArr x exps', fvs) }
-
rnExpr (ExplicitTuple x tup_args boxity)
= do { checkTupleSection tup_args
; checkTupSize (length tup_args)
@@ -342,10 +338,6 @@ rnExpr (ArithSeq x _ seq)
else
return (ArithSeq x Nothing new_seq, fvs) }
-rnExpr (PArrSeq x seq)
- = do { (new_seq, fvs) <- rnArithSeq seq
- ; return (PArrSeq x new_seq, fvs) }
-
{-
These three are pattern syntax appearing in expressions.
Since all the symbols are reservedops we can simply reject them.
@@ -841,7 +833,7 @@ rnStmt ctxt rnBody (L loc (BodyStmt _ body _ _)) thing_inside
; (guard_op, fvs2) <- if isListCompExpr ctxt
then lookupStmtName ctxt guardMName
else return (noSyntaxExpr, emptyFVs)
- -- Only list/parr/monad comprehensions use 'guard'
+ -- Only list/monad comprehensions use 'guard'
-- Also for sub-stmts of same eg [ e | x<-xs, gd | blah ]
-- Here "gd" is a guard
; (thing, fvs3) <- thing_inside []
@@ -1020,12 +1012,11 @@ lookupStmtNamePoly ctxt name
not_rebindable = return (HsVar noExt (noLoc name), emptyFVs)
-- | Is this a context where we respect RebindableSyntax?
--- but ListComp/PArrComp are never rebindable
+-- but ListComp are never rebindable
-- Neither is ArrowExpr, which has its own desugarer in DsArrows
rebindableContext :: HsStmtContext Name -> Bool
rebindableContext ctxt = case ctxt of
ListComp -> False
- PArrComp -> False
ArrowExpr -> False
PatGuard {} -> False
@@ -1818,7 +1809,6 @@ isStrictPattern (L _ pat) =
ListPat{} -> True
TuplePat{} -> True
SumPat{} -> True
- PArrPat{} -> True
ConPatIn{} -> True
ConPatOut{} -> True
LitPat{} -> True
@@ -1977,7 +1967,6 @@ checkLastStmt ctxt lstmt@(L loc stmt)
= case ctxt of
ListComp -> check_comp
MonadComp -> check_comp
- PArrComp -> check_comp
ArrowExpr -> check_do
DoExpr -> check_do
MDoExpr -> check_do
@@ -2028,7 +2017,7 @@ pprStmtCat (XStmtLR {}) = panic "pprStmtCat: XStmtLR"
emptyInvalid :: Validity -- Payload is the empty document
emptyInvalid = NotValid Outputable.empty
-okStmt, okDoStmt, okCompStmt, okParStmt, okPArrStmt
+okStmt, okDoStmt, okCompStmt, okParStmt
:: DynFlags -> HsStmtContext Name
-> Stmt GhcPs (Located (body GhcPs)) -> Validity
-- Return Nothing if OK, (Just extra) if not ok
@@ -2044,7 +2033,6 @@ okStmt dflags ctxt stmt
GhciStmtCtxt -> okDoStmt dflags ctxt stmt
ListComp -> okCompStmt dflags ctxt stmt
MonadComp -> okCompStmt dflags ctxt stmt
- PArrComp -> okPArrStmt dflags ctxt stmt
TransStmtCtxt ctxt -> okStmt dflags ctxt stmt
-------------
@@ -2091,21 +2079,6 @@ okCompStmt dflags _ stmt
ApplicativeStmt {} -> emptyInvalid
XStmtLR{} -> panic "okCompStmt"
-----------------
-okPArrStmt dflags _ stmt
- = case stmt of
- BindStmt {} -> IsValid
- LetStmt {} -> IsValid
- BodyStmt {} -> IsValid
- ParStmt {}
- | LangExt.ParallelListComp `xopt` dflags -> IsValid
- | otherwise -> NotValid (text "Use ParallelListComp")
- TransStmt {} -> emptyInvalid
- RecStmt {} -> emptyInvalid
- LastStmt {} -> emptyInvalid -- Should not happen (dealt with by checkLastStmt)
- ApplicativeStmt {} -> emptyInvalid
- XStmtLR{} -> panic "okPArrStmt"
-
---------
checkTupleSection :: [LHsTupArg GhcPs] -> RnM ()
checkTupleSection args