diff options
Diffstat (limited to 'compiler/GHC/Hs/Binds.hs')
-rw-r--r-- | compiler/GHC/Hs/Binds.hs | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/compiler/GHC/Hs/Binds.hs b/compiler/GHC/Hs/Binds.hs index 327aeea2c0..6b4985bcf0 100644 --- a/compiler/GHC/Hs/Binds.hs +++ b/compiler/GHC/Hs/Binds.hs @@ -243,7 +243,7 @@ data HsBindLR idL idR -- type Int -> forall a'. a' -> a' -- Notice that the coercion captures the free a'. - fun_id :: XRec idL (IdP idL), -- Note [fun_id in Match] in GHC.Hs.Expr + fun_id :: LIdP idL, -- Note [fun_id in Match] in GHC.Hs.Expr fun_matches :: MatchGroup idR (LHsExpr idR), -- ^ The payload @@ -369,9 +369,8 @@ type instance XXABExport (GhcPass p) = NoExtCon data PatSynBind idL idR = PSB { psb_ext :: XPSB idL idR, -- ^ Post renaming, FVs. -- See Note [Bind free vars] - psb_id :: XRec idL (IdP idL), -- ^ Name of the pattern synonym - psb_args :: HsPatSynDetails (XRec idR (IdP idR)), - -- ^ Formal parameter names + psb_id :: LIdP idL, -- ^ Name of the pattern synonym + psb_args :: HsPatSynDetails idR, -- ^ Formal parameter names psb_def :: LPat idR, -- ^ Right-hand side psb_dir :: HsPatSynDir idR -- ^ Directionality } @@ -893,7 +892,7 @@ data Sig pass -- For details on above see note [Api annotations] in GHC.Parser.Annotation TypeSig (XTypeSig pass) - [XRec pass (IdP pass)] -- LHS of the signature; e.g. f,g,h :: blah + [LIdP pass] -- LHS of the signature; e.g. f,g,h :: blah (LHsSigWcType pass) -- RHS of the signature; can have wildcards -- | A pattern synonym type signature @@ -905,7 +904,7 @@ data Sig pass -- 'GHC.Parser.Annotation.AnnDot','GHC.Parser.Annotation.AnnDarrow' -- For details on above see note [Api annotations] in GHC.Parser.Annotation - | PatSynSig (XPatSynSig pass) [XRec pass (IdP pass)] (LHsSigType pass) + | PatSynSig (XPatSynSig pass) [LIdP pass] (LHsSigType pass) -- P :: forall a b. Req => Prov => ty -- | A signature for a class method @@ -918,7 +917,7 @@ data Sig pass -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnDefault', -- 'GHC.Parser.Annotation.AnnDcolon' - | ClassOpSig (XClassOpSig pass) Bool [XRec pass (IdP pass)] (LHsSigType pass) + | ClassOpSig (XClassOpSig pass) Bool [LIdP pass] (LHsSigType pass) -- | A type signature in generated code, notably the code -- generated for record selectors. We simply record @@ -950,8 +949,8 @@ data Sig pass -- For details on above see note [Api annotations] in GHC.Parser.Annotation | InlineSig (XInlineSig pass) - (XRec pass (IdP pass)) -- Function name - InlinePragma -- Never defaultInlinePragma + (LIdP pass) -- Function name + InlinePragma -- Never defaultInlinePragma -- | A specialisation pragma -- @@ -966,7 +965,7 @@ data Sig pass -- For details on above see note [Api annotations] in GHC.Parser.Annotation | SpecSig (XSpecSig pass) - (XRec pass (IdP pass)) -- Specialise a function or datatype ... + (LIdP pass) -- Specialise a function or datatype ... [LHsSigType pass] -- ... to these types InlinePragma -- The pragma on SPECIALISE_INLINE form. -- If it's just defaultInlinePragma, then we said @@ -996,7 +995,7 @@ data Sig pass -- For details on above see note [Api annotations] in GHC.Parser.Annotation | MinimalSig (XMinimalSig pass) - SourceText (LBooleanFormula (XRec pass (IdP pass))) + SourceText (LBooleanFormula (LIdP pass)) -- Note [Pragma source text] in GHC.Types.Basic -- | A "set cost centre" pragma for declarations @@ -1008,8 +1007,8 @@ data Sig pass -- > {-# SCC funName "cost_centre_name" #-} | SCCFunSig (XSCCFunSig pass) - SourceText -- Note [Pragma source text] in GHC.Types.Basic - (XRec pass (IdP pass)) -- Function name + SourceText -- Note [Pragma source text] in GHC.Types.Basic + (LIdP pass) -- Function name (Maybe (XRec pass StringLiteral)) -- | A complete match pragma -- @@ -1020,8 +1019,8 @@ data Sig pass -- synonym definitions. | CompleteMatchSig (XCompleteMatchSig pass) SourceText - (XRec pass [XRec pass (IdP pass)]) - (Maybe (XRec pass (IdP pass))) + (XRec pass [LIdP pass]) + (Maybe (LIdP pass)) | XSig !(XXSig pass) type instance XTypeSig (GhcPass p) = NoExtField @@ -1041,7 +1040,7 @@ type instance XXSig (GhcPass p) = NoExtCon type LFixitySig pass = XRec pass (FixitySig pass) -- | Fixity Signature -data FixitySig pass = FixitySig (XFixitySig pass) [XRec pass (IdP pass)] Fixity +data FixitySig pass = FixitySig (XFixitySig pass) [LIdP pass] Fixity | XFixitySig !(XXFixitySig pass) type instance XFixitySig (GhcPass p) = NoExtField @@ -1229,14 +1228,14 @@ pprMinimalSig (L _ bf) = ppr (fmap unLoc bf) -} -- | Haskell Pattern Synonym Details -type HsPatSynDetails arg = HsConDetails arg [RecordPatSynField arg] +type HsPatSynDetails pass = HsConDetails (LIdP pass) [RecordPatSynField (LIdP pass)] -- See Note [Record PatSyn Fields] -- | Record Pattern Synonym Field -data RecordPatSynField a +data RecordPatSynField fld = RecordPatSynField { - recordPatSynSelectorId :: a -- Selector name visible in rest of the file - , recordPatSynPatVar :: a + recordPatSynSelectorId :: fld -- Selector name visible in rest of the file + , recordPatSynPatVar :: fld -- Filled in by renamer, the name used internally -- by the pattern } deriving (Data, Functor) |