-
-
Notifications
You must be signed in to change notification settings - Fork 412
Closed
Labels
Description
Consider
-- succeeds
join_ :: Monad m => m (m a) -> m a
join_ = _The tactics plugin produces the solution (\ x -> (>>=) x (\ x11 -> x11)). However, now consider
-- fails
fJoin :: (Monad m, Monad f) => f (m (m a)) -> f (m a)
fJoin = fmap _The type of _ is still m (m a) -> m a (with Monad constraint on m), but the tactics plugin fails to find the solution. I tried moving it into a let binding but it still fails.
-- fails
fJoin :: (Monad m, Monad f) => f (m (m a)) -> f (m a)
fJoin = let f = _ in fmap fHowever if we generalize the constraint on f to Functor, the tactics plugin succeeds;
-- succeeds
fJoin :: (Monad m, Functor f) => f (m (m a)) -> f (m a)
fJoin = fmap _Is solved with _ = (\ x -> (>>=) x (\ x11 -> x11)). However moving it into a let binding again causes a failure!
-- fails
fJoin :: (Monad m, Functor f) => f (m (m a)) -> f (m a)
fJoin = let f = _ in fmap fThis has been tested as of commit 6c14163.