diff options
Diffstat (limited to 'compiler/GHC/Hs/Binds.hs')
-rw-r--r-- | compiler/GHC/Hs/Binds.hs | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/compiler/GHC/Hs/Binds.hs b/compiler/GHC/Hs/Binds.hs index d67d1c4312..3a22863537 100644 --- a/compiler/GHC/Hs/Binds.hs +++ b/compiler/GHC/Hs/Binds.hs @@ -91,27 +91,28 @@ type instance XXValBindsLR (GhcPass pL) pR type instance XFunBind (GhcPass pL) GhcPs = NoExtField type instance XFunBind (GhcPass pL) GhcRn = NameSet - -- ^ After the renamer (but before the type-checker), the FunBind - -- extension field contains the locally-bound free variables of this - -- defn. See Note [Bind free vars] +-- ^ After the renamer (but before the type-checker), the FunBind +-- extension field contains the locally-bound free variables of this +-- defn. See Note [Bind free vars] + type instance XFunBind (GhcPass pL) GhcTc = HsWrapper - -- ^ After the type-checker, the FunBind extension field contains a - -- coercion from the type of the MatchGroup to the type of the Id. - -- Example: - -- - -- @ - -- f :: Int -> forall a. a -> a - -- f x y = y - -- @ - -- - -- Then the MatchGroup will have type (Int -> a' -> a') - -- (with a free type variable a'). The coercion will take - -- a CoreExpr of this type and convert it to a CoreExpr of - -- type Int -> forall a'. a' -> a' - -- Notice that the coercion captures the free a'. +-- ^ After the type-checker, the FunBind extension field contains a +-- coercion from the type of the MatchGroup to the type of the Id. +-- Example: +-- +-- @ +-- f :: Int -> forall a. a -> a +-- f x y = y +-- @ +-- +-- Then the MatchGroup will have type (Int -> a' -> a') +-- (with a free type variable a'). The coercion will take +-- a CoreExpr of this type and convert it to a CoreExpr of +-- type Int -> forall a'. a' -> a' +-- Notice that the coercion captures the free a'. type instance XPatBind GhcPs (GhcPass pR) = EpAnn [AddEpAnn] -type instance XPatBind GhcRn (GhcPass pR) = NameSet -- ^ See Note [Bind free vars] +type instance XPatBind GhcRn (GhcPass pR) = NameSet -- See Note [Bind free vars] type instance XPatBind GhcTc (GhcPass pR) = Type -- Type of the GRHSs type instance XVarBind (GhcPass pL) (GhcPass pR) = NoExtField @@ -122,7 +123,7 @@ type instance XXHsBindsLR GhcRn pR = DataConCantHappen type instance XXHsBindsLR GhcTc pR = AbsBinds type instance XPSB (GhcPass idL) GhcPs = EpAnn [AddEpAnn] -type instance XPSB (GhcPass idL) GhcRn = NameSet -- ^ Post renaming, FVs. See Note [Bind free vars] +type instance XPSB (GhcPass idL) GhcRn = NameSet -- Post renaming, FVs. See Note [Bind free vars] type instance XPSB (GhcPass idL) GhcTc = NameSet type instance XXPatSynBind (GhcPass idL) (GhcPass idR) = DataConCantHappen |