theam / haskell-do

:pencil2: :bar_chart: - The Haskell code editor focused on interactive development.
Apache License 2.0
352 stars 31 forks source link

Generation of Code Based on Type #19

Open SamuelSchlesinger opened 7 years ago

SamuelSchlesinger commented 7 years ago

I think we should make use of this module in ghc-mod and do some generation of code based on a type: https://hackage.haskell.org/package/ghc-mod-5.7.0.0/docs/Language-Haskell-GhcMod-FillSig.html. This is a really valuable tool if you structure your types right.

NickSeagull commented 7 years ago

Would be really cool, this utility does the same thing, we could check it out 😄 https://hackage.haskell.org/package/djinn

SamuelSchlesinger commented 7 years ago

I checked it out and it seems to have the problem that it doesn't allow for recursive types. I get this from a completeness perspective (exhaustive checking for existence of a term of that type) but it's silly from a practical perspective, as the real question you want to ask is "is there a term that can fit in my computer?"