• Sylvain Henry's avatar
    DynFlags: refactor GHC.CmmToAsm (#17957, #10143) · 0c5ed5c7
    Sylvain Henry authored
    This patch removes the use of `sdocWithDynFlags` from GHC.CmmToAsm.*.Ppr
    
    To do that I've had to make some refactoring:
    
    * X86' and PPC's `Instr` are no longer `Outputable` as they require a
      `Platform` argument
    
    * `Instruction` class now exposes `pprInstr :: Platform -> instr -> SDoc`
    
    * as a consequence, I've refactored some modules to avoid .hs-boot files
    
    * added (derived) functor instances for some datatypes parametric in the
      instruction type. It's useful for pretty-printing as we just have to
      map `pprInstr` before pretty-printing the container datatype.
    0c5ed5c7
Monad.hs 12 KB