Closed phadej closed 1 week ago
Looking more into the code, generating Haskell code manually from C.Decl
doesn't seem that complicated that one would need haskell-src-exts
for it.
I don't mind skipping haskell-src-exts, but then the various backends should be as dumb as possible; all logic should live someplace else. Perhaps we should introduce our own Haskell abstraction; see also https://github.com/well-typed/hs-bindgen/issues/124#issuecomment-2325972009.
We decided that we will go with our own internal Haskell representation, so I guess we should generate TH from that.
As of #157 we are generating TH directly from our own internal AST, and we no longer use haskell-src-meta
. Have opened #158 to track getting rid of haskell-src-exts
altogether (for the CTYPE
issue).
... without first generating haskell-src-exts stuff.
Yes, this means that we (may) have to do multiple independent "backends", but I feel that TH interface is simply better than
haskell-src-exts
. (It may be viable to simply pretty print TH AST, then dealing withhaskell-src-exts
at all).