[Git][ghc/ghc][wip/amg/renamer-refactor] More plausible substNameAvailInfo

Adam Gundry gitlab at gitlab.haskell.org
Wed Nov 18 14:29:08 UTC 2020



Adam Gundry pushed to branch wip/amg/renamer-refactor at Glasgow Haskell Compiler / GHC


Commits:
4b16fb18 by Adam Gundry at 2020-11-18T14:20:41+00:00
More plausible substNameAvailInfo

- - - - -


1 changed file:

- compiler/GHC/Types/Name/Shape.hs


Changes:

=====================================
compiler/GHC/Types/Name/Shape.hs
=====================================
@@ -184,10 +184,8 @@ substName env n | Just n' <- lookupNameEnv env n = n'
 -- to induce a substitution on 'availNames'.
 substNameAvailInfo :: HscEnv -> ShNameSubst -> AvailInfo -> IO AvailInfo
 substNameAvailInfo _ env (Avail n) = return (Avail (substName env n))
-substNameAvailInfo hsc_env env (AvailFL fl) =
-    AvailFL <$> setNameFieldSelector hsc_env mb_mod fl -- AMG TODO mb_mod?
-  where
-    mb_mod = Nothing
+substNameAvailInfo _ env (AvailFL fl) =
+    return (AvailFL fl { flSelector = substName env (flSelector fl) })
 substNameAvailInfo hsc_env env (AvailTC n ns fs) =
     let mb_mod = fmap nameModule (lookupNameEnv env n)
     in AvailTC (substName env n)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4b16fb18146454c280dc8319c34aedca91aae2e0

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4b16fb18146454c280dc8319c34aedca91aae2e0
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201118/f0e2be05/attachment.html>


More information about the ghc-commits mailing list