Closed jfmengels closed 11 months ago
These 2 don't make sense to me
.field << (\a -> { field = a, other = other })
--> a
.field << (\a -> { record | field = a, other = other })
--> a
I think both should return (\a -> a)
(or identity
), right?
Right! 👍 Probably the lambda version, because that applies to more situations.
Oh, and we should also support the check for all branches, like we already do with the non-function version of record access.
@lue-bird Shall I move the proposals for type alias Record = { first : Int, second : Int }
into a separate issue?
Oh, I forgot about these. Reopened!
To me these seem very obscure, tho, so I'll focus elsewhere.
We already have
but we don't have
I think we can take the same simplifications done in #161 for tuples and apply them for records where we currently don't
(✅ indicates this is now supported)
And then if we the names and positions of record fields of type aliases, we can do the exact same simplifications done in #161 for tuples when using the automatic record constructor.