[Haskell-cafe] Where is Show for GHC AST?
dyaitskov at gmail.com
Wed Apr 22 05:02:01 UTC 2020
I am trying to modify LiquidHaskell and want to see how source code
is represented in AST format.
I think I have AST i.e. HsExpr value, but there is no Show instance for that.
I noticed that GHC classes implement similar class Outputable, but
it doesn't do what I expected. It just reconstruct AST back to source code.
I could probably write a TH function generating Show instances for all
types which HsExpr depends on, but I hope there is more straight
forward way to do that.
And after all I curious what is the reason for not having Show for GHC
It would be so convenient having Show.
Daneel S. Yaitskov
More information about the Haskell-Cafe