summaryrefslogtreecommitdiff
path: root/compiler/GHC/Cmm/Ppr.hs
Commit message (Collapse)AuthorAgeFilesLines
* Generalize OutputablePSylvain Henry2020-09-171-11/+16
| | | | | Add a type parameter for the environment required by OutputableP. It avoids tying Platform with OutputableP.
* Introduce OutputablePSylvain Henry2020-09-171-60/+59
| | | | | | | | | | | | | | | | | | | | | | | | | Some types need a Platform value to be pretty-printed: CLabel, Cmm types, instructions, etc. Before this patch they had an Outputable instance and the Platform value was obtained via sdocWithDynFlags. It meant that the *renderer* of the SDoc was responsible of passing the appropriate Platform value (e.g. via the DynFlags given to showSDoc). It put the burden of passing the Platform value on the renderer while the generator of the SDoc knows the Platform it is generating the SDoc for and there is no point passing a different Platform at rendering time. With this patch, we introduce a new OutputableP class: class OutputableP a where pdoc :: Platform -> a -> SDoc With this class we still have some polymorphism as we have with `ppr` (i.e. we can use `pdoc` on a variety of types instead of having a dedicated `pprXXX` function for each XXX type). One step closer removing `sdocWithDynFlags` (#10143) and supporting several platforms (#14335).
* Rip out CmmStackInfo(updfr_space)Ben Gamari2020-05-281-3/+2
| | | | | As noted in #18232, this field is currently completely unused and moreover doesn't have a clear meaning.
* Modules: Utils and Data (#13009)Sylvain Henry2020-04-261-4/+4
| | | | | | | Update Haddock submodule Metric Increase: haddock.compiler
* Modules: Types (#13009)Sylvain Henry2020-03-291-1/+1
| | | | | | | Update Haddock submodule Metric Increase: haddock.compiler
* Refactoring: use Platform instead of DynFlags when possibleSylvain Henry2020-03-191-5/+7
| | | | | | | | Metric Decrease: ManyConstructors T12707 T13035 T1969
* Disentangle DynFlags and SDocSylvain Henry2020-02-201-11/+11
| | | | | | | | | | | | | Remove several uses of `sdocWithDynFlags`. The remaining ones are mostly CodeGen related (e.g. depend on target platform constants) and will be fixed separately. Metric Decrease: T12425 T9961 WWRec T1969 T14683
* Module hierarchy: Cmm (cf #13009)Sylvain Henry2020-01-251-0/+309