Reduction stack overflow

It means you would never be able to use foo, as instantiating it would require a solution to every constraint ever dreamed up by machine or man.

A more effective workaround for this specific case would be

foo :: (Monoid [Foo], forall e. Monoid e => MonadWriter e (m e)) => m [Foo] Int
foo = pure 1

(You’ll get a compiler warning about a simplifiable class constraint—accurate, but you made me do this, GHC!)

2 Likes