[commit: ghc] master: Fix build (21647bc)

git at git.haskell.org git at git.haskell.org
Sat Oct 8 10:29:42 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/21647bcd6fe8206840bdcc7b747c7cc60c0c3db8/ghc

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

commit 21647bcd6fe8206840bdcc7b747c7cc60c0c3db8
Author: Csongor Kiss <kiss.csongor.kiss at gmail.com>
Date:   Sat Oct 8 11:28:22 2016 +0100

    Fix build
    
    - interaction between backpack and export list refactoring
      introduced a few syntax errors, and constructor arity mismatches
    - CPP macro used in backpack was not accepted by clang because of
      extraneous whitespace
    
    Signed-off-by: Csongor Kiss <kiss.csongor.kiss at gmail.com>
    
    Reviewers: austin, bgamari, mpickering
    
    Reviewed By: mpickering
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2582


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

21647bcd6fe8206840bdcc7b747c7cc60c0c3db8
 compiler/backpack/NameShape.hs  | 4 ++--
 compiler/backpack/RnModIface.hs | 2 +-
 compiler/deSugar/Desugar.hs     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/compiler/backpack/NameShape.hs b/compiler/backpack/NameShape.hs
index 568d700..0a2d7ca 100644
--- a/compiler/backpack/NameShape.hs
+++ b/compiler/backpack/NameShape.hs
@@ -167,7 +167,7 @@ substName env n | Just n' <- lookupNameEnv env n = n'
 -- for type constructors, where it is sufficient to substitute the 'availName'
 -- to induce a substitution on 'availNames'.
 substNameAvailInfo :: HscEnv -> ShNameSubst -> AvailInfo -> IO AvailInfo
-substNameAvailInfo _ env (Avail p n) = return (Avail p (substName env n))
+substNameAvailInfo _ env (Avail n) = return (Avail (substName env n))
 substNameAvailInfo hsc_env env (AvailTC n ns fs) =
     let mb_mod = fmap nameModule (lookupNameEnv env n)
     in AvailTC (substName env n)
@@ -243,7 +243,7 @@ uAvailInfos flexi as1 as2 = -- pprTrace "uAvailInfos" (ppr as1 $$ ppr as2) $
 -- with only name holes from @flexi@ unifiable (all other name holes rigid.)
 uAvailInfo :: ModuleName -> ShNameSubst -> AvailInfo -> AvailInfo
            -> Either SDoc ShNameSubst
-uAvailInfo flexi subst (Avail _ n1) (Avail _ n2) = uName flexi subst n1 n2
+uAvailInfo flexi subst (Avail n1) (Avail n2) = uName flexi subst n1 n2
 uAvailInfo flexi subst (AvailTC n1 _ _) (AvailTC n2 _ _) = uName flexi subst n1 n2
 uAvailInfo _ _ a1 a2 = Left $ text "While merging export lists, could not combine"
                            <+> ppr a1 <+> text "with" <+> ppr a2
diff --git a/compiler/backpack/RnModIface.hs b/compiler/backpack/RnModIface.hs
index 536f0b0..b90edd9 100644
--- a/compiler/backpack/RnModIface.hs
+++ b/compiler/backpack/RnModIface.hs
@@ -140,7 +140,7 @@ rnModule mod = do
     return (renameHoleModule dflags hmap mod)
 
 rnAvailInfo :: Rename AvailInfo
-rnAvailInfo (Avail p n) = Avail p <$> rnIfaceGlobal n
+rnAvailInfo (Avail n) = Avail <$> rnIfaceGlobal n
 rnAvailInfo (AvailTC n ns fs) = do
     -- Why don't we rnIfaceGlobal the availName itself?  It may not
     -- actually be exported by the module it putatively is from, in
diff --git a/compiler/deSugar/Desugar.hs b/compiler/deSugar/Desugar.hs
index 1f589a9..28ec706 100644
--- a/compiler/deSugar/Desugar.hs
+++ b/compiler/deSugar/Desugar.hs
@@ -369,7 +369,7 @@ deSugar hsc_env
         ; usages <- mkUsageInfo hsc_env mod (imp_mods imports) used_names dep_files merged
         -- id_mod /= mod when we are processing an hsig, but hsigs
         -- never desugared and compiled (there's no code!)
-        ; MASSERT ( id_mod == mod )
+        ; MASSERT( id_mod == mod )
 
         ; let mod_guts = ModGuts {
                 mg_module       = mod,



More information about the ghc-commits mailing list