I am trying to work with GHC core data types.
I am able to compile my Haskell source to core representation with type Bind CoreBndr
.
As we know there is no default Show
instance for this data type.
There is a way to pretty print this representation but it has way too much noise associated with it.
I want to treat GHC core as any other algebraic data type and write functions with it.
It would be much easier if we had a Show
instance of GHC core.
Has anybody already written a show instance which I can reuse?
Aside, how does the community write and verify programs that deal with GHC core?
ghc -c file.hs -ddump-simpl
gives core representation of the program pertty printed with explicit types, dictionary arguments occurance checks etc. but in a program context the core representation is just a value of some data type. – ankitrokdeonsnsShow
instance help you to "treat GHC core as any other algebraic data type and write functions with it"? – Daniel Wagner