diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Server.hs | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/app/Server.hs b/app/Server.hs index e67e21f..9eaeca1 100644 --- a/app/Server.hs +++ b/app/Server.hs @@ -1676,7 +1676,7 @@ withModulePath packageInfo' componentId moduleName action = case packageInfo' of PackageInfo packageInfo -> case HM.lookup - (ghcPrimHack packageInfo' moduleName) + moduleName (HCE.moduleNameMap packageInfo) of Just modulePathMap -> case HM.lookup componentId modulePathMap of @@ -1694,7 +1694,7 @@ withModulePath packageInfo' componentId moduleName action = store case eitherModNameMap of Right modNameMap -> - case HM.lookup (ghcPrimHack packageInfo' moduleName) modNameMap of + case HM.lookup moduleName modNameMap of Just componentMap -> case HM.lookup componentId componentMap of Just modulePath -> action modulePath Nothing -> case HM.lookup (HCE.ComponentId "lib") componentMap of @@ -1720,20 +1720,6 @@ withModulePath packageInfo' componentId moduleName action = , toLazyBS $ HCE.packageIdToText packageId ] --- | Workaround for : --- https://github.com/ghc/ghc/blob/ghc-8.2.2-release/compiler/main/Finder.hs#L310-L315 -ghcPrimHack :: PackageInfo -> HCE.HaskellModuleName -> HCE.HaskellModuleName -ghcPrimHack packageInfo' modName@(HCE.HaskellModuleName name) = - case packageInfo' of - PackageInfo packageInfo - | HCE.packageName packageInfo == "ghc-prim" && name == "GHC.Prim" -> - HCE.HaskellModuleName "GHC.Prim_" - | otherwise -> modName - PackageInfoStore (HCE.PackageId packageName _) _ - | packageName == "ghc-prim" && name == "GHC.Prim" -> - HCE.HaskellModuleName "GHC.Prim_" - | otherwise -> modName - parsePackageId :: PackageId -> Maybe (PackageName, Maybe Version) parsePackageId (PackageId text) = case T.splitOn "-" text of |