google / ghc-source-gen

Library for generating Haskell source files and code fragments.
BSD 3-Clause "New" or "Revised" License
90 stars 29 forks source link

Support for GADTs #63

Open kamoii opened 4 years ago

kamoii commented 4 years ago

Hi, thanks for this cool library.

Is support for GADTs planned?

judah commented 4 years ago

Yes, adding support for GADTs makes a lot of sense. I haven't looked closely at what an API for them would look like. If anyone would like to take a try at implementing it, the docs for HsDataDefn describe how GADTs are represented differently than regular Haskell-98 datatypes: http://hackage.haskell.org/package/ghc-8.6.5/docs/HsDecls.html#t:HsDataDefn