[commit: ghc] master: TTG typo: XFieldOcc should be XCFieldOcc (9269541)

git at git.haskell.org git at git.haskell.org
Sun Jul 15 17:38:09 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/926954196f9ffd7b89cba53061b39ef996e1650c/ghc

>---------------------------------------------------------------

commit 926954196f9ffd7b89cba53061b39ef996e1650c
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Sun Jul 15 19:35:51 2018 +0200

    TTG typo: XFieldOcc should be XCFieldOcc
    
    In the following
    
      data FieldOcc pass = FieldOcc { extFieldOcc     :: XFieldOcc pass
                                    , rdrNameFieldOcc :: Located RdrName
                                       -- ^ See Note [Located RdrNames] in HsExpr
                                    }
    
        | XFieldOcc
            (XXFieldOcc pass)
    
    we are using XFieldOcc for both the extFieldOcc type and the extra constructor.
    
    The first one should be XCFieldOcc
    
    Updates haddock submodule
    closes #15386


>---------------------------------------------------------------

926954196f9ffd7b89cba53061b39ef996e1650c
 compiler/hsSyn/HsExtension.hs |  4 ++--
 compiler/hsSyn/HsPat.hs       |  4 ++--
 compiler/hsSyn/HsTypes.hs     | 12 ++++++------
 utils/haddock                 |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/compiler/hsSyn/HsExtension.hs b/compiler/hsSyn/HsExtension.hs
index a23b973..a7c467d 100644
--- a/compiler/hsSyn/HsExtension.hs
+++ b/compiler/hsSyn/HsExtension.hs
@@ -973,11 +973,11 @@ type ForallXConDeclField (c :: * -> Constraint) (x :: *) =
 
 -- ---------------------------------------------------------------------
 
-type family XFieldOcc  x
+type family XCFieldOcc x
 type family XXFieldOcc x
 
 type ForallXFieldOcc (c :: * -> Constraint) (x :: *) =
-       ( c (XFieldOcc  x)
+       ( c (XCFieldOcc x)
        , c (XXFieldOcc x)
        )
 
diff --git a/compiler/hsSyn/HsPat.hs b/compiler/hsSyn/HsPat.hs
index 866b0e2..faefb84 100644
--- a/compiler/hsSyn/HsPat.hs
+++ b/compiler/hsSyn/HsPat.hs
@@ -444,14 +444,14 @@ data HsRecField' id arg = HsRecField {
 --
 -- See also Note [Disambiguating record fields] in TcExpr.
 
-hsRecFields :: HsRecFields p arg -> [XFieldOcc p]
+hsRecFields :: HsRecFields p arg -> [XCFieldOcc p]
 hsRecFields rbinds = map (unLoc . hsRecFieldSel . unLoc) (rec_flds rbinds)
 
 -- Probably won't typecheck at once, things have changed :/
 hsRecFieldsArgs :: HsRecFields p arg -> [arg]
 hsRecFieldsArgs rbinds = map (hsRecFieldArg . unLoc) (rec_flds rbinds)
 
-hsRecFieldSel :: HsRecField pass arg -> Located (XFieldOcc pass)
+hsRecFieldSel :: HsRecField pass arg -> Located (XCFieldOcc pass)
 hsRecFieldSel = fmap extFieldOcc . hsRecFieldLbl
 
 hsRecFieldId :: HsRecField GhcTc arg -> Located Id
diff --git a/compiler/hsSyn/HsTypes.hs b/compiler/hsSyn/HsTypes.hs
index 8a1f33f..8c5387d 100644
--- a/compiler/hsSyn/HsTypes.hs
+++ b/compiler/hsSyn/HsTypes.hs
@@ -1169,19 +1169,19 @@ type LFieldOcc pass = Located (FieldOcc pass)
 -- Represents an *occurrence* of an unambiguous field.  We store
 -- both the 'RdrName' the user originally wrote, and after the
 -- renamer, the selector function.
-data FieldOcc pass = FieldOcc { extFieldOcc     :: XFieldOcc pass
+data FieldOcc pass = FieldOcc { extFieldOcc     :: XCFieldOcc pass
                               , rdrNameFieldOcc :: Located RdrName
                                  -- ^ See Note [Located RdrNames] in HsExpr
                               }
 
   | XFieldOcc
       (XXFieldOcc pass)
-deriving instance (p ~ GhcPass pass, Eq (XFieldOcc p)) => Eq  (FieldOcc p)
-deriving instance (p ~ GhcPass pass, Ord (XFieldOcc p)) => Ord (FieldOcc p)
+deriving instance (p ~ GhcPass pass, Eq (XCFieldOcc p)) => Eq  (FieldOcc p)
+deriving instance (p ~ GhcPass pass, Ord (XCFieldOcc p)) => Ord (FieldOcc p)
 
-type instance XFieldOcc GhcPs = NoExt
-type instance XFieldOcc GhcRn = Name
-type instance XFieldOcc GhcTc = Id
+type instance XCFieldOcc GhcPs = NoExt
+type instance XCFieldOcc GhcRn = Name
+type instance XCFieldOcc GhcTc = Id
 
 type instance XXFieldOcc (GhcPass _) = NoExt
 
diff --git a/utils/haddock b/utils/haddock
index 3266a96..e3926b5 160000
--- a/utils/haddock
+++ b/utils/haddock
@@ -1 +1 @@
-Subproject commit 3266a962f7b6083b4b48cb66e70c62e3157df930
+Subproject commit e3926b50ab8a7269fd6904b06e881745f08bc5d6



More information about the ghc-commits mailing list