Mitchell,
You could pass in another argument that specifies which 's', which might not be as much of a pain if it was an implicit parameter like here: <
http://lpaste.net/154303>.
Another way to resolve the ambiguity would be to say that foo1 accesses first State in the list:
type family OuterState xs where
OuterState (State s ': rest) = s
OuterState (x ': xs) = OuterState xs
-- using ScopedTypeVariables
foo1 :: forall r s. (OuterState r ~ s, Member (State s) r, HasInt s) => Eff r Int
foo1 = getInt <$> (get :: Eff r s)
But I think you probably should just pin down the state type you're accessing because you can have multiple `State s`and they don't get in each other’s way at all if they have different types.
get2 :: Eff '[State Int, State Char] (Int,Char)
get2 = do i <- get; c <- get; return (i,c) -- works just fine
Regards,
Adam