diff --git a/Cabal/Distribution/Simple/GHC.hs b/Cabal/Distribution/Simple/GHC.hs index 965bd8b5b76..fc8f976ab8b 100644 --- a/Cabal/Distribution/Simple/GHC.hs +++ b/Cabal/Distribution/Simple/GHC.hs @@ -1,4 +1,5 @@ {-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE CPP #-} @@ -1734,8 +1735,11 @@ installLib verbosity lbi targetDir dynlibTargetDir _builtDir _pkg lib clbi = do installOrdinary = install False installShared = install True + gHC_PRIM = "GHC.Prim" :: ModuleName + -- We ignore any "GHC.Prim" module. Which doesn't physically exist. It is part of + -- the @base@ package, and containes wired-in primitives. copyModuleFiles ext = - findModuleFiles [builtDir] [ext] (allLibModules lib clbi) + findModuleFiles [builtDir] [ext] (filter (/= gHC_PRIM) $ allLibModules lib clbi) >>= installOrdinaryFiles verbosity targetDir compiler_id = compilerId (compiler lbi)