fused-effects / fused-effects

A fast, flexible, fused effect system for Haskell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unexplainable instance resolution

ilyakooo0 opened this issue · comments

commented

So I have something similar to this happening:

foo :: Has Foo sig m => m ()

data U m a
runU :: U m a -> m a

bar :: Has Foo sig m => m ()
bar = do
  runU $ foo

U has quite a few instances defined on it, none of which are related to fused-effects however.

My question is how can the Has constraints get resolved if the actual m is warped in another monad?

commented

This was completely my problem. I had actually defined an Algebra instance on U.