diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-12-15 17:03:47 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-12-15 17:08:58 +0000 |
commit | 3f87866ad536d1c20fa477aa124fe1267fb36a43 (patch) | |
tree | 8770d74570997fc5896243ffabe13001d5d83c7e /compiler/main/Hooks.hs | |
parent | 48222831ae392cb556707b6b290a4dcc2677d97b (diff) | |
download | haskell-3f87866ad536d1c20fa477aa124fe1267fb36a43.tar.gz |
Fix dll-split problem with patch 'Make Core Lint check for locally-bound GlobalId'
The trouble was that my changes made a lot more files transitively link with
DynFlags, which is the root module for the revolting Windows dll-split stuff.
Anyway this patch fixes it, in a good way:
- Make GHC/Hooks *not* import DsMonad, because DsMonad imports too
much other stuff (notably tcLookup variants). Really, Hooks depends
only on *types* not *code*.
- To do this I need the DsM type, and the types it depends on,
not to be part of DsMonad. So I moved it to TcRnTypes, which is
where the similar pieces for the TcM and IfM monads live.
- We can then delete DsMonad.hs-boot
- There are a bunch of knock-on change, of no great significance
Diffstat (limited to 'compiler/main/Hooks.hs')
-rw-r--r-- | compiler/main/Hooks.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/main/Hooks.hs b/compiler/main/Hooks.hs index 44f340aed9..3e797cad2e 100644 --- a/compiler/main/Hooks.hs +++ b/compiler/main/Hooks.hs @@ -1,5 +1,10 @@ -- \section[Hooks]{Low level API hooks} +-- NB: this module is SOURCE-imported by DynFlags, and should primarily +-- refer to *types*, rather than *code* +-- If you import too muchhere , then the revolting compiler_stage2_dll0_MODULES +-- stuff in compiler/ghc.mk makes DynFlags link to too much stuff + module Hooks ( Hooks , emptyHooks , lookupHook @@ -27,7 +32,6 @@ import HscTypes import HsDecls import HsBinds import HsExpr -import {-# SOURCE #-} DsMonad import OrdList import Id import TcRnTypes |