
5 Feb
2011
5 Feb
'11
2:35 a.m.
Hi Max, data M a = M { unM :: forall m. MonadPeelIO m => Reader.ReaderT () m a }
It seems "clear" that there should be a MonadPeelIO instance for M, but I can't for the life of me figure it out.
Have you (or the big brains on Haskell-Cafe, who are CCed) come across this before? Is there an obvious solution I am missing?
I have not used monad-peel before so please ignore my comment if I am missing something obvious. The documentation mentions that "Instances of MonadPeelIO should be constructed via MonadTransPeel, using peelIO = liftPeel peelIO". I think this would work at least in your simplified example as ReaderT is an instance of MonadTransPeel. Maybe you can take the same route with your actual transformer? Sebastian