From: Ian Lynagh Date: Sun, 2 Dec 2007 21:57:58 +0000 (+0000) Subject: Simplify the GHC.Prim hack in base.cabal/Setup.hs X-Git-Url: http://git.megacz.com/?p=ghc-base.git;a=commitdiff_plain;h=ef07afc42600a8cc74cccea5ad6bd4d951174531 Simplify the GHC.Prim hack in base.cabal/Setup.hs --- diff --git a/Setup.hs b/Setup.hs index 9575aa0..2ad48a4 100644 --- a/Setup.hs +++ b/Setup.hs @@ -20,16 +20,11 @@ import Control.Exception (try) main :: IO () main = do let hooks = defaultUserHooks { buildHook = build_primitive_sources - $ filter_modules_hook $ buildHook defaultUserHooks, makefileHook = build_primitive_sources - $ filter_modules_hook $ makefileHook defaultUserHooks, haddockHook = build_primitive_sources - $ filter_modules_hook - $ haddockHook defaultUserHooks, - instHook = filter_modules_hook - $ instHook defaultUserHooks } + $ haddockHook defaultUserHooks } defaultMainWithHooks hooks type Hook a = PackageDescription -> LocalBuildInfo -> UserHooks -> a -> IO () @@ -61,15 +56,4 @@ maybeUpdateFile source target = do case r of ExitSuccess -> removeFile source ExitFailure _ -> do try (removeFile target); renameFile source target - - -filter_modules_hook :: Hook a -> Hook a -filter_modules_hook f pd lbi uhs x - = let lib' = case library pd of - Just lib -> - let ems = filter ("GHC.Prim" /=) (exposedModules lib) - in lib { exposedModules = ems } - Nothing -> error "Expected a library" - pd' = pd { library = Just lib' } - in f pd' lbi uhs x diff --git a/base.cabal b/base.cabal index d922f27..9792d80 100644 --- a/base.cabal +++ b/base.cabal @@ -51,7 +51,6 @@ Library { GHC.Num, GHC.PArr, GHC.Pack, - GHC.Prim, GHC.PrimopWrappers, GHC.Ptr, GHC.Read,