Re: [elm-discuss] combining union types

2016-07-01 Thread Janis Voigtländer
No. You can only do to Msg what you already did to PageMsg and LibMsg (through tagging *their* message "subtypes"). > Am 01.07.2016 um 11:43 schrieb jonathan de montalembert : > > Is there a way to combine two Msg into one? Like (not working) > >> type PageMsg >> =

[elm-discuss] combining union types

2016-07-01 Thread jonathan de montalembert
Is there a way to combine two Msg into one? Like (not working) type PageMsg > = HomeMsg Home.Msg > | ArchiveMsg Archive.Msg > > type LibMsg > = TranslationMsg Translation.Msg > | PhoenixMsg Phoenix.Msg > > type Msg > = PageMsg > | LibMsg then have update: Msg -> Model ->