I encountered this exact situation in a medium-sized app I've written. I just handled the issue in the update function; when I sent a Toggle message to the footer I would also set everything else to Hidden. I think it worked fine for my case, but I guess in a large application written by lots of people the only way to make sure of this would be writing a comment and pinky swear not to ever change that component's state with other messages. So yeah, I'm not sure there's a way to handle this at type level in Elm without making things too complicated.
I remember reading about behavioural types (http://www.behavioural-types.eu/), I don't fully understand them but I think this problem could possibly be a good fit for them? Not that there's any language that implements them yet. -- 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.
