Answering myself.
Extensible records - http://elm-lang.org/docs/records#record-types
Is this a type of polymorphism then?
On Friday, 17 March 2017 21:59:08 UTC+13, Richard Wood wrote:
>
> Thanks Max.
>>
> I see this works. Haven't come across either of these in the docs. Is
> there a reference or a name for what's happening here that I could search
> for to learn more?
>
>
>> Instead of
>>
>> type alias Model = { foo : Foo, bar : Bar }
>>
>> view : Model -> Html Msg
>> view { foo } = -- code that ignores bar
>>
>> -- try
>>
>> view : {a| foo : Foo} -> Html Msg
>> view { foo } = -- same code
>>
>>
>>
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.