summaryrefslogtreecommitdiff
path: root/compiler/GHC/Hs/Expr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Hs/Expr.hs')
-rw-r--r--compiler/GHC/Hs/Expr.hs82
1 files changed, 41 insertions, 41 deletions
diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs
index 050ba91d6b..d52f9cac65 100644
--- a/compiler/GHC/Hs/Expr.hs
+++ b/compiler/GHC/Hs/Expr.hs
@@ -47,7 +47,7 @@ import Util
import Outputable
import FastString
import GHC.Core.Type
-import TysWiredIn (mkTupleStr)
+import GHC.Builtin.Types (mkTupleStr)
import GHC.Tc.Utils.TcType (TcType)
import {-# SOURCE #-} GHC.Tc.Types (TcLclEnv)
@@ -75,7 +75,7 @@ type LHsExpr p = Located (HsExpr p)
-- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when
-- in a list
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
-------------------------
-- | Post-Type checking Expression
@@ -281,7 +281,7 @@ data HsExpr p
-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLam',
-- 'ApiAnnotation.AnnRarrow',
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p)) -- ^ Lambda-case
--
@@ -289,7 +289,7 @@ data HsExpr p
-- 'ApiAnnotation.AnnCase','ApiAnnotation.AnnOpen',
-- 'ApiAnnotation.AnnClose'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsApp (XApp p) (LHsExpr p) (LHsExpr p) -- ^ Application
@@ -316,7 +316,7 @@ data HsExpr p
--
-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnMinus'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| NegApp (XNegApp p)
(LHsExpr p)
(SyntaxExpr p)
@@ -324,7 +324,7 @@ data HsExpr p
-- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,
-- 'ApiAnnotation.AnnClose' @')'@
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsPar (XPar p)
(LHsExpr p) -- ^ Parenthesised expr; see Note [Parens in HsSyn]
@@ -340,7 +340,7 @@ data HsExpr p
-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',
-- 'ApiAnnotation.AnnClose'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
-- Note [ExplicitTuple]
| ExplicitTuple
(XExplicitTuple p)
@@ -364,7 +364,7 @@ data HsExpr p
-- 'ApiAnnotation.AnnOf','ApiAnnotation.AnnOpen' @'{'@,
-- 'ApiAnnotation.AnnClose' @'}'@
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsCase (XCase p)
(LHsExpr p)
(MatchGroup p (LHsExpr p))
@@ -374,7 +374,7 @@ data HsExpr p
-- 'ApiAnnotation.AnnThen','ApiAnnotation.AnnSemi',
-- 'ApiAnnotation.AnnElse',
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsIf (XIf p) -- GhcPs: this is a Bool; False <=> do not use
-- rebindable syntax
(SyntaxExpr p) -- cond function
@@ -389,7 +389,7 @@ data HsExpr p
-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnIf'
-- 'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose',
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)]
-- | let(rec)
@@ -398,7 +398,7 @@ data HsExpr p
-- 'ApiAnnotation.AnnOpen' @'{'@,
-- 'ApiAnnotation.AnnClose' @'}'@,'ApiAnnotation.AnnIn'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsLet (XLet p)
(LHsLocalBinds p)
(LHsExpr p)
@@ -408,7 +408,7 @@ data HsExpr p
-- 'ApiAnnotation.AnnVbar',
-- 'ApiAnnotation.AnnClose'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsDo (XDo p) -- Type of the whole expression
(HsStmtContext GhcRn) -- The parameterisation is unimportant
-- because in this context we never use
@@ -420,7 +420,7 @@ data HsExpr p
-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,
-- 'ApiAnnotation.AnnClose' @']'@
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
-- See Note [Empty lists]
| ExplicitList
(XExplicitList p) -- Gives type of components of list
@@ -433,7 +433,7 @@ data HsExpr p
-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{'@,
-- 'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnClose' @'}'@
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| RecordCon
{ rcon_ext :: XRecordCon p
, rcon_con_name :: Located (IdP p) -- The constructor name;
@@ -445,7 +445,7 @@ data HsExpr p
-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{'@,
-- 'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnClose' @'}'@
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| RecordUpd
{ rupd_ext :: XRecordUpd p
, rupd_expr :: LHsExpr p
@@ -458,7 +458,7 @@ data HsExpr p
--
-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| ExprWithTySig
(XExprWithTySig p)
@@ -471,14 +471,14 @@ data HsExpr p
-- 'ApiAnnotation.AnnComma','ApiAnnotation.AnnDotdot',
-- 'ApiAnnotation.AnnClose' @']'@
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| ArithSeq
(XArithSeq p)
(Maybe (SyntaxExpr p))
-- For OverloadedLists, the fromList witness
(ArithSeqInfo p)
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
-----------------------------------------------------------
-- MetaHaskell Extensions
@@ -487,7 +487,7 @@ data HsExpr p
-- 'ApiAnnotation.AnnOpenE','ApiAnnotation.AnnOpenEQ',
-- 'ApiAnnotation.AnnClose','ApiAnnotation.AnnCloseQ'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsBracket (XBracket p) (HsBracket p)
-- See Note [Pending Splices]
@@ -509,7 +509,7 @@ data HsExpr p
-- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',
-- 'ApiAnnotation.AnnClose'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsSpliceE (XSpliceE p) (HsSplice p)
-----------------------------------------------------------
@@ -520,7 +520,7 @@ data HsExpr p
-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnProc',
-- 'ApiAnnotation.AnnRarrow'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsProc (XProc p)
(LPat p) -- arrow abstraction, proc
(LHsCmdTop p) -- body of the abstraction
@@ -530,7 +530,7 @@ data HsExpr p
-- static pointers extension
-- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnStatic',
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsStatic (XStatic p) -- Free variables of the body
(LHsExpr p) -- Body
@@ -681,7 +681,7 @@ data HsPragE p
-- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{-\# CORE'@,
-- 'ApiAnnotation.AnnVal', 'ApiAnnotation.AnnClose' @'\#-}'@
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsPragCore (XCoreAnn p)
SourceText -- Note [Pragma source text] in GHC.Types.Basic
StringLiteral -- hdaume: core annotation
@@ -695,7 +695,7 @@ data HsPragE p
-- 'ApiAnnotation.AnnVal',
-- 'ApiAnnotation.AnnClose' @'\#-}'@
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsPragTick -- A pragma introduced tick
(XTickPragma p)
SourceText -- Note [Pragma source text] in GHC.Types.Basic
@@ -721,7 +721,7 @@ type instance XXPragE (GhcPass _) = NoExtCon
type LHsTupArg id = Located (HsTupArg id)
-- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma'
--- For details on above see note [Api annotations] in ApiAnnotation
+-- For details on above see note [Api annotations] in GHC.Parser.Annotation
-- | Haskell Tuple Argument
data HsTupArg id
@@ -841,7 +841,7 @@ A tuple data constructor like () or (,,,) is parsed as an `HsVar`, not an
Sadly, the grammar for this is actually ambiguous, and it's only thanks to the
preference of a shift in a shift/reduce conflict that the parser works as this
-Note details. Search for a reference to this Note in Parser.y for further
+Note details. Search for a reference to this Note in GHC.Parser for further
explanation.
Note [Empty lists]
@@ -853,7 +853,7 @@ various phases and why.
Parsing
-------
An empty list is parsed by the sysdcon nonterminal. It thus comes to life via
-HsVar nilDataCon (defined in TysWiredIn). A freshly-parsed (HsExpr GhcPs) empty list
+HsVar nilDataCon (defined in GHC.Builtin.Types). A freshly-parsed (HsExpr GhcPs) empty list
is never a ExplicitList.
Renaming
@@ -1270,7 +1270,7 @@ data HsCmd id
-- 'ApiAnnotation.Annrarrowtail','ApiAnnotation.AnnLarrowtail',
-- 'ApiAnnotation.AnnRarrowtail'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
= HsCmdArrApp -- Arrow tail, or arrow application (f -< arg)
(XCmdArrApp id) -- type of the arrow expressions f,
-- of the form a t t', where arg :: t
@@ -1283,7 +1283,7 @@ data HsCmd id
-- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpenB' @'(|'@,
-- 'ApiAnnotation.AnnCloseB' @'|)'@
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsCmdArrForm -- Command formation, (| e cmd1 .. cmdn |)
(XCmdArrForm id)
(LHsExpr id) -- The operator.
@@ -1304,14 +1304,14 @@ data HsCmd id
-- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLam',
-- 'ApiAnnotation.AnnRarrow',
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsCmdPar (XCmdPar id)
(LHsCmd id) -- parenthesised command
-- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,
-- 'ApiAnnotation.AnnClose' @')'@
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsCmdCase (XCmdCase id)
(LHsExpr id)
@@ -1320,7 +1320,7 @@ data HsCmd id
-- 'ApiAnnotation.AnnOf','ApiAnnotation.AnnOpen' @'{'@,
-- 'ApiAnnotation.AnnClose' @'}'@
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsCmdIf (XCmdIf id)
(SyntaxExpr id) -- cond function
@@ -1332,7 +1332,7 @@ data HsCmd id
-- 'ApiAnnotation.AnnThen','ApiAnnotation.AnnSemi',
-- 'ApiAnnotation.AnnElse',
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsCmdLet (XCmdLet id)
(LHsLocalBinds id) -- let(rec)
@@ -1341,7 +1341,7 @@ data HsCmd id
-- 'ApiAnnotation.AnnOpen' @'{'@,
-- 'ApiAnnotation.AnnClose' @'}'@,'ApiAnnotation.AnnIn'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| HsCmdDo (XCmdDo id) -- Type of the whole expression
(Located [CmdLStmt id])
@@ -1350,7 +1350,7 @@ data HsCmd id
-- 'ApiAnnotation.AnnVbar',
-- 'ApiAnnotation.AnnClose'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| XCmd !(XXCmd id) -- Note [Trees that Grow] extension point
@@ -1567,7 +1567,7 @@ type LMatch id body = Located (Match id body)
-- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a
-- list
--- For details on above see note [Api annotations] in ApiAnnotation
+-- For details on above see note [Api annotations] in GHC.Parser.Annotation
data Match p body
= Match {
m_ext :: XCMatch p body,
@@ -1659,7 +1659,7 @@ hsLMatchPats (L _ (Match { m_pats = pats })) = pats
-- 'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose'
-- 'ApiAnnotation.AnnRarrow','ApiAnnotation.AnnSemi'
--- For details on above see note [Api annotations] in ApiAnnotation
+-- For details on above see note [Api annotations] in GHC.Parser.Annotation
data GRHSs p body
= GRHSs {
grhssExt :: XCGRHSs p body,
@@ -1809,7 +1809,7 @@ type GhciStmt id = Stmt id (LHsExpr id)
-- 'ApiAnnotation.AnnBy','ApiAnnotation.AnnBy',
-- 'ApiAnnotation.AnnGroup','ApiAnnotation.AnnUsing'
--- For details on above see note [Api annotations] in ApiAnnotation
+-- For details on above see note [Api annotations] in GHC.Parser.Annotation
data StmtLR idL idR body -- body should always be (LHs**** idR)
= LastStmt -- Always the last Stmt in ListComp, MonadComp,
-- and (after the renamer, see GHC.Rename.Expr.checkLastStmt) DoExpr, MDoExpr
@@ -1827,7 +1827,7 @@ data StmtLR idL idR body -- body should always be (LHs**** idR)
-- See Note [Monad Comprehensions]
-- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLarrow'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| BindStmt (XBindStmt idL idR body)
-- ^ Post renaming has optional fail and bind / (>>=) operator.
-- Post typechecking, also has result type of the
@@ -1861,7 +1861,7 @@ data StmtLR idL idR body -- body should always be (LHs**** idR)
-- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLet'
-- 'ApiAnnotation.AnnOpen' @'{'@,'ApiAnnotation.AnnClose' @'}'@,
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| LetStmt (XLetStmt idL idR body) (LHsLocalBindsLR idL idR)
-- ParStmts only occur in a list/monad comprehension
@@ -1899,7 +1899,7 @@ data StmtLR idL idR body -- body should always be (LHs**** idR)
-- Recursive statement (see Note [How RecStmt works] below)
-- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnRec'
- -- For details on above see note [Api annotations] in ApiAnnotation
+ -- For details on above see note [Api annotations] in GHC.Parser.Annotation
| RecStmt
{ recS_ext :: XRecStmt idL idR body
, recS_stmts :: [LStmtLR idL idR body]