summaryrefslogtreecommitdiff
path: root/compiler/Language/Haskell
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/Language/Haskell')
-rw-r--r--compiler/Language/Haskell/Syntax/Expr.hs45
-rw-r--r--compiler/Language/Haskell/Syntax/Extension.hs14
2 files changed, 1 insertions, 58 deletions
diff --git a/compiler/Language/Haskell/Syntax/Expr.hs b/compiler/Language/Haskell/Syntax/Expr.hs
index 326c9903dc..03596f1a77 100644
--- a/compiler/Language/Haskell/Syntax/Expr.hs
+++ b/compiler/Language/Haskell/Syntax/Expr.hs
@@ -1131,20 +1131,6 @@ data StmtLR idL idR body -- body should always be (LHs**** idR)
(LPat idL)
body
- -- | 'ApplicativeStmt' represents an applicative expression built with
- -- '<$>' and '<*>'. It is generated by the renamer, and is desugared into the
- -- appropriate applicative expression by the desugarer, but it is intended
- -- to be invisible in error messages.
- --
- -- For full details, see Note [ApplicativeDo] in "GHC.Rename.Expr"
- --
- | ApplicativeStmt
- (XApplicativeStmt idL idR body) -- Post typecheck, Type of the body
- [ ( SyntaxExpr idR
- , ApplicativeArg idL) ]
- -- [(<$>, e1), (<*>, e2), ..., (<*>, en)]
- (Maybe (SyntaxExpr idR)) -- 'join', if necessary
-
| BodyStmt (XBodyStmt idL idR body) -- Post typecheck, element type
-- of the RHS (used for arrows)
body -- See Note [BodyStmt]
@@ -1249,37 +1235,6 @@ data ParStmtBlock idL idR
-- '@BindStmt@'s should use the monadic fail and which shouldn't.
type FailOperator id = Maybe (SyntaxExpr id)
--- | Applicative Argument
-data ApplicativeArg idL
- = ApplicativeArgOne -- A single statement (BindStmt or BodyStmt)
- { xarg_app_arg_one :: XApplicativeArgOne idL
- -- ^ The fail operator, after renaming
- --
- -- The fail operator is needed if this is a BindStmt
- -- where the pattern can fail. E.g.:
- -- (Just a) <- stmt
- -- The fail operator will be invoked if the pattern
- -- match fails.
- -- It is also used for guards in MonadComprehensions.
- -- The fail operator is Nothing
- -- if the pattern match can't fail
- , app_arg_pattern :: LPat idL -- WildPat if it was a BodyStmt (see below)
- , arg_expr :: LHsExpr idL
- , is_body_stmt :: Bool
- -- ^ True <=> was a BodyStmt,
- -- False <=> was a BindStmt.
- -- See Note [Applicative BodyStmt]
- }
- | ApplicativeArgMany -- do { stmts; return vars }
- { xarg_app_arg_many :: XApplicativeArgMany idL
- , app_stmts :: [ExprLStmt idL] -- stmts
- , final_expr :: HsExpr idL -- return (v1,..,vn), or just (v1,..,vn)
- , bv_pattern :: LPat idL -- (v1,...,vn)
- , stmt_context :: HsDoFlavour
- -- ^ context of the do expression, used in pprArg
- }
- | XApplicativeArg !(XXApplicativeArg idL)
-
{-
Note [The type of bind in Stmts]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/compiler/Language/Haskell/Syntax/Extension.hs b/compiler/Language/Haskell/Syntax/Extension.hs
index 4bdb3ce3cb..9bc79c3527 100644
--- a/compiler/Language/Haskell/Syntax/Extension.hs
+++ b/compiler/Language/Haskell/Syntax/Extension.hs
@@ -518,7 +518,6 @@ type family XXGRHS x b
-- StmtLR type families
type family XLastStmt x x' b
type family XBindStmt x x' b
-type family XApplicativeStmt x x' b
type family XBodyStmt x x' b
type family XLetStmt x x' b
type family XParStmt x x' b
@@ -546,17 +545,6 @@ type family XXCmd x
type family XParStmtBlock x x'
type family XXParStmtBlock x x'
--- -------------------------------------
--- ApplicativeArg type families
-type family XApplicativeArgOne x
-type family XApplicativeArgMany x
-type family XXApplicativeArg x
-
--- =====================================================================
--- Type families for the HsImpExp extension points
-
--- TODO
-
-- =====================================================================
-- Type families for the HsLit extension points
@@ -691,7 +679,7 @@ type family XCFieldOcc x
type family XXFieldOcc x
-- =====================================================================
--- Type families for the HsImpExp type families
+-- Type families for the HsImpExp extension points
-- -------------------------------------
-- ImportDecl type families