Restructure compilation pipeline to allow hooks
authorAustin Seipp <austin@well-typed.com>
Sun, 22 Sep 2013 23:47:35 +0000 (18:47 -0500)
committerAustin Seipp <austin@well-typed.com>
Sun, 22 Sep 2013 23:47:38 +0000 (18:47 -0500)
commit6f799899aa7cd9c59c9ebf9c9709f9423d93d307
treebed11393db25e594d9525471a01c69dd98a9b355
parentea2af9b21d6e772e3adc8806044557b504b84795
Restructure compilation pipeline to allow hooks

This commit exposes GHC's internal compiler pipeline through a `Hooks`
module in the GHC API. It currently allows you to hook:

 * Foreign import/exports declarations
 * The frontend up to type checking
 * The one shot compilation mode
 * Core compilation, and the module iface
 * Linking and the phases in DriverPhases.hs
 * Quasiquotation

Authored-by: Luite Stegeman <stegeman@gmail.com>
Authored-by: Edsko de Vries <edsko@well-typed.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
24 files changed:
compiler/basicTypes/BasicTypes.lhs
compiler/deSugar/DsForeign.lhs
compiler/deSugar/DsMonad.lhs-boot [new file with mode: 0644]
compiler/ghc.cabal.in
compiler/ghc.mk
compiler/ghci/ByteCodeLink.lhs
compiler/ghci/ByteCodeLink.lhs-boot [deleted file]
compiler/ghci/Linker.lhs
compiler/ghci/RtClosureInspect.hs
compiler/iface/LoadIface.lhs
compiler/main/DriverPipeline.hs
compiler/main/DynFlags.hs
compiler/main/DynamicLoading.hs
compiler/main/GHC.hs
compiler/main/Hooks.lhs [new file with mode: 0644]
compiler/main/Hooks.lhs-boot [new file with mode: 0644]
compiler/main/HscMain.hs
compiler/main/HscTypes.lhs
compiler/main/InteractiveEval.hs
compiler/main/InteractiveEvalTypes.hs
compiler/main/PipelineMonad.hs [new file with mode: 0644]
compiler/typecheck/TcForeign.lhs
compiler/typecheck/TcSplice.lhs
docs/users_guide/7.8.1-notes.xml