To avoid UndecidableInstances, the linked answer expanded the type family, which for human readability really shouldn't have. Namely, he writes
instance MonadBaseControl IO Foo where
type StM Foo a = a
when you can consider the entry instead
instance MonadBaseControl IO Foo where
type StM Foo a = StM (ReaderT Int IO) a
, . ( UndecidableInstances) . UndecidableInstances, , ; ghci, :
> :kind! forall a. StM (StateT Int IO) a
forall a. StM (StateT Int IO) a :: *
= (a, Int)
, StateT Foo :
instance MonadBaseControl IO Foo where
type StM Foo a = (a, Int)