summaryrefslogtreecommitdiff
path: root/compiler/backpack
diff options
context:
space:
mode:
authorCsongor Kiss <kiss.csongor.kiss@gmail.com>2016-10-08 11:28:22 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2016-10-08 11:28:58 +0100
commit21647bcd6fe8206840bdcc7b747c7cc60c0c3db8 (patch)
treef2468ec4bc5fc2cc4d05b0102847e84c74b704be /compiler/backpack
parentf2d80de4b6aa7c3b5b9da20d7569907662d39bbe (diff)
downloadhaskell-21647bcd6fe8206840bdcc7b747c7cc60c0c3db8.tar.gz
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@gmail.com> Reviewers: austin, bgamari, mpickering Reviewed By: mpickering Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2582
Diffstat (limited to 'compiler/backpack')
-rw-r--r--compiler/backpack/NameShape.hs4
-rw-r--r--compiler/backpack/RnModIface.hs2
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/backpack/NameShape.hs b/compiler/backpack/NameShape.hs
index 568d700b94..0a2d7ca319 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 536f0b03ef..b90edd90ad 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