Open tesk9 opened 2 years ago
Those exist! But they're probably hard to discover 😅
In the generated file, check out the make_
record. The only difference is that for record type aliases, it doesn't provide the constructor : one -> two -> three -> record
form, but the
constructor : { one : Expression, two : Expression, three : Expression} -> Expression
form.
Could add both if that's useful though
Ah! I guess I missed it!
I do think having the constructor : one -> two -> three -> record
form in addition would be useful for what I'm trying to do, though, since it can be a bit challenging to switch back and forth from the expression-based api to the inferred type API.
I'd like to be able to use type and type alias constructors from the
Gen
folder when working with published Elm packages.For example, if I had:
I'd like to be able to use a reference to the
Id
andUserFlags
constructors. Something like:that would produce:
Right now, I'm doing the equivalent of: