bgamari / ghc-pretty-errors

Design planning for prettier error messages from GHC
8 stars 1 forks source link

Support custom printing of types #4

Open goldfirere opened 4 years ago

goldfirere commented 4 years ago

https://gitlab.haskell.org/ghc/ghc/issues/17391 is a sensible request to allow users to plug-in to the type-printing mechanism. We can imagine EDSLs providing their own printers this way. While we don't have to fully design or implement such a facility as part of this work, I think we should keep this potential application in mind.

alpmestan commented 4 years ago

This would be supported with our last iteration, I think. We could imagine a hook that'd let user get their hands on the documents at the stage where the annotation are expressions/types/etc, and take it from there or give them a chance to transform the annotations before the documents go down the pipeline to eventually get printed.