<div>Also, I didn't realize this at first, but in order to use any of the MonadTrans instances, like having StateT s (Prompt p) automatically be a MonadPrompt, you sadly also need "-fallow-overlapping-instances".
</div>
<div> </div>
<div>This is because MonadTrans monads looks a lot like Prompt.</div>
<div> </div>
<div>arbitrary MonadTrans monad:</div>
<div> t (m :: * -> *) (a :: *)</div>
<div>Prompt:</div>
<div> Prompt (p :: * -> *) (a :: *)</div>
<div> </div>
<div>Since you can substitute "Prompt" for t and rename m to p, they look like they match the some of the same types to the compiler. However, since Prompt won't ever be declared as an instance of MonadTrans, the overlap is safe.
</div>
<div> </div>
<div>The alternative is to declare all the instances you need manually:</div>
<div> </div>
<div>instance MonadPrompt p (StateT s (Prompt p)) where prompt = lift . prompt</div>
<div>-- etc.</div>
<div> </div>
<div> -- ryan<br> </div>