Ohhh, this is delightful! I’m still digesting the implications, but it does model it beautifully. When I get time to fiddle I’ll see whether this could work nicely with QualifiedDo! Thank you!
Also curious about whether this would need and/or be amenable to a set of useful combinators similar to those usually available for regular monads/applicatives. There’s not much on Hackage about relative monads. Fertile ground for budding library authors?
By convenience. The free’s Ap gives you a Functor instance for any f that doesn’t have one (my GADT Spec type doesn’t), and free’s Free wants something that’s an instance of Functor. I suppose a freer monad would do the same trick that Ap is doing for me. But I think overall these are implementation details.