CategoricalData / hydra

Transformations transformed
Apache License 2.0
72 stars 10 forks source link

"Let" support in Haskell DSL #69

Closed joshsh closed 1 year ago

joshsh commented 1 year ago

Similar to #68 (Flow support), we need support for let-terms (inner definitions) in the Haskell DSL, with corresponding support in generated Haskell and Java. Only the simplest functions can make do without inner definitions ("where" / local variables).

joshsh commented 1 year ago

Support has been added to the Haskell DSL and the Haskell serde. Still TODO:

joshsh commented 1 year ago

Inference support for recursive 'let' terms has been completed in the branch. Using "let" syntax in Haskell instead of "where", which requires some additional refinements to the coder and serde.

joshsh commented 1 year ago

Recursive 'let' is now fully supported in generated Haskell. Last TODO is Java support.

joshsh commented 1 year ago

Btw. Java support is now there, as well. Working through a problem with type annotations which appears to happen in spite of correct inference for 'let' terms. Should be possible to close this ticket after that is fixed.