[Haskell-cafe] Monadic correctness

Andrew Coppin andrewcoppin at btinternet.com
Sat Oct 17 17:15:47 EDT 2009


Derek Elkins wrote:
> On Sat, Oct 17, 2009 at 3:24 PM, Andrew Coppin
> <andrewcoppin at btinternet.com> wrote:
>   
>> I'm reasonably confident it works, but not 100% sure...
>>
>> newtype Foo x = Foo (M -> IO x)
>>     
>
> In this case it is trivial, Foo = ReaderT M IO which is a monad.

Ah yes, of course... I keep forgetting that the Reader monad doesn't do 
what it sounds like it does!

Oh well. ;-)



More information about the Haskell-Cafe mailing list