Add fromProducer convenience function
Generalize the type using the monad-primitive package