
Dear GHC Devs, Because of the unwieldy nature of the data that the GHC type checker outputs, I am trying to convert a GHC 'Type' [1] to a haskell-src-ext 'Type' [2]. The translation does not need to be perfect for now, but I would at least like to be able to translate function types and types that involve type-class constraints. (See my initial attempt in attachment) Has this ever been done before? Could you point me to some documentation on GHC's 'Type' [1] that could help me with writing this function? (The comments in code aren't nearly enough for me.) In particular, I am having trouble finding type class constraints in the 'Type'. Thank you for your time. [1]: https://downloads.haskell.org/~ghc/8.0.2/docs/html/libraries/ghc-8.0.2/src/T... [2]: https://hackage.haskell.org/package/haskell-src-exts-1.18.2/docs/Language-Ha... -- Tom Sydney Kerckhove