Hi,
in Halogen.Query.HalogenM we have some helper functions to lift HalogenM execution from one monadic context to another: mapAction, imapState, mapOutput and hoist. What is missing is mapping between different slots type.
From my understanding it would make sense to be able to run HalogenM ... slots ... in a context of HalogenM ... slots' ... if slots row type is a subset of slots' row type:
mapSlots
:: forall state action slots slots' output m
. Union slots addon slots'
=> HalogenM state action slots output m
~> HalogenM state action slots' output m
It simply means that the computation does not use all the subcomponents available. I haven’t checked, but perhaps even unsafeCoerce would be a valid implementation of this function.
My use case is that I have a HalogenM action that uses () as slots type (for some reason I couldn’t make it compile with foralls) and I’d like to hoist this action into another HalogenM.