Hi All,
I’m trying to find a way to lift a type within an Html option, as per these failing expermients:
notes : Trait -> Html Message notes trait = Textfield.view Mdc (trait.id ++ "-note") model.mdc ([ Textfield.dense , Textfield.fullwidth , Textfield.placeholder "describe here" , Textfield.textarea , Textfield.rows 5 , Textfield.cols 40 , EditNote <| Options.onInput trait.tagNote -- experiment 1 / fails , Options.onInput (EditNote <| trait.tagNote) -- experiment 2 / fails ] ++ ( Html.map EditNote [ Options.onInput trait.tagNote ] ) -- experiment 3 / fails )
The module declares these relevant types:
type Message = Mdc (Material.Msg Message) | EditNote NoteControl type NoteControl = NoteTrackable String | NoteMeasurable String
Note that type Mdc is a top level (Message) type given as a Textfield.view argument.
Does there exist a syntax to lift the NoteControl type (denoted by trait.tagNote) into a Message type, inline within the Html option list above, or is it not possible?
I’m aware of alternative code structures (which are far more verbose) to handle this, but I’m looking for an inline syntax solution.
Thanks.