CategoricalData / hydra

Transformations transformed
Apache License 2.0
64 stars 9 forks source link

Revamp type inference with respect to universal types #103

Open joshsh opened 10 months ago

joshsh commented 10 months ago

Hydra, while a mostly faithful implementation of the LambdaGraph spec, never quite made the leap from Hindley-Milner -style type schemes to System F -style universal types. Its type inference is sufficient for code generation into Haskell, but Java code generation needs more support. In particular, the inferencer is casual about the order of type variables in what were once type schemes (as they used to be a set), and this makes things difficult in Java, which requires the generated code to be littered with type annotations. Fix this.

joshsh commented 4 months ago

This is done-ish in #103 ("ish" because inference still fails in some cases where it ought to succeed), but we're exploring a more standard solution in #118.