dhall-lang / dhall-to-cabal

Compile Dhall expressions to Cabal files
MIT License
100 stars 19 forks source link

Use multi-binding let in --print-type and --print-default. #153

Closed quasicomputational closed 5 years ago

ocharles commented 5 years ago

Maybe it's worth running this through the linter first?

quasicomputational commented 5 years ago

Hmm - that's an idea as well. On the one hand, ideally we'd generate perfectly formed output; on the other hand, an as-simple-as-it-can-get-away-with generator + a tidying pass has some aesthetic appeal.

Looking at the things that the linter does, the elimination of dead bindings could be quite useful. I think that this one (using multi-let) is something we can and should handle on the generation side without too much fuss, though - I think this patch improves the code readability anyway.