diff options
Diffstat (limited to 'compiler/deSugar')
-rw-r--r-- | compiler/deSugar/DsForeign.lhs | 6 | ||||
-rw-r--r-- | compiler/deSugar/DsMonad.lhs | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/compiler/deSugar/DsForeign.lhs b/compiler/deSugar/DsForeign.lhs index 59124e32e1..daf49eebac 100644 --- a/compiler/deSugar/DsForeign.lhs +++ b/compiler/deSugar/DsForeign.lhs @@ -212,11 +212,7 @@ dsFCall fn_id co fcall mDeclHeader = do (fcall', cDoc) <- case fcall of CCall (CCallSpec (StaticTarget cName mPackageId isFun) CApiConv safety) -> - do thisMod <- getModuleDs - let pkg = packageIdString (modulePackageId thisMod) - mod = moduleNameString (moduleName thisMod) - wrapperNameComponents = [pkg, mod, unpackFS cName] - wrapperName <- mkWrapperName "ghc_wrapper" wrapperNameComponents + do wrapperName <- mkWrapperName "ghc_wrapper" (unpackFS cName) let fcall' = CCall (CCallSpec (StaticTarget wrapperName mPackageId True) CApiConv safety) c = includes $$ fun_proto <+> braces (cRet <> semi) diff --git a/compiler/deSugar/DsMonad.lhs b/compiler/deSugar/DsMonad.lhs index 6ed0f64a06..5e94d515d7 100644 --- a/compiler/deSugar/DsMonad.lhs +++ b/compiler/deSugar/DsMonad.lhs @@ -167,6 +167,9 @@ data DsGblEnv , ds_parr_bi :: PArrBuiltin -- desugarar names for '-XParallelArrays' } +instance ContainsModule DsGblEnv where + extractModule = ds_mod + data DsLclEnv = DsLclEnv { ds_meta :: DsMetaEnv, -- Template Haskell bindings ds_loc :: SrcSpan -- to put in pattern-matching error msgs |