- 
                Notifications
    You must be signed in to change notification settings 
- Fork 73
Open
Description
Is something like the following possible in polysemy where given the effects
data E1 :: Effect where
  E1_unit :: E1 m ()
  E1_rec :: something.. a -> E1 m a
makeSem ''E1
data E2 :: Effect where
  E2_unit :: E2 m ()
  E2_rec :: something.. a -> E2 m a
makeSem ''E2one could write something like this:
main = do
  e1_rec $ do
    e1_unit
    e2_unit
    e2_rec $ do
      e1_unit
      e2_unit
  e1_rec $ do
    e1_unit
    e2_unit
  ..I.e I arbitrarily mix different effects under both effects' _rec variants and the effect stack is same on each "level".
My actual use case is that I have DSLs for generating css and javascript both of which have their separate effects/GADTs and interpreters, and am wondering if I could re-use them without writing a sum GADT.
Metadata
Metadata
Assignees
Labels
No labels