<div dir="ltr">On Tue, Aug 13, 2013 at 10:45 PM,  <span dir="ltr">&lt;<a href="mailto:briand@aracnet.com" target="_blank">briand@aracnet.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><span style="color:rgb(34,34,34)">fooBar =</span><br></div>
    do putStrLn &quot;foo&quot;<br>
       return True<br>
<br>
so then I thought, aha!, all I need to do is understand the type of &quot;return True&quot; and all will be revealed to me.  Well, it&#39;s this:<br>
<br>
 Control.Monad.Trans.Reader.ReaderT<br>
       (GHC.Ptr.Ptr Gtk.EExpose) IO Bool<br>
<br>
just like the error message says.<br>
<br>
Still don&#39;t know what that&#39;s supposed to be.  I&#39;m having trouble tracking down<br>
<br>
Control.Monad.Trans.Reader.ReaderT<br></blockquote><div><br></div><div>In this case, all you need to know is the Control.Monad.Trans part and the IO underneath; this tells you that you can use `lift` and possibly `liftIO` to get at the IO.</div>
<div><br></div><div>    fooBar = do</div><div>        liftIO $ putStrLn &quot;foo&quot;</div><div>        return True</div><div><br></div><div>If `liftIO` complains about a missing MonadIO instance, file a bug :) but you can also get there by using `lift` to reach it; in this case you only need it once, but for more deeply nested transformers you may need it multiple times (e.g. `lift . lift . lift $ putStrLn &quot;foo&quot;` for a stack of 3 transformers over IO).</div>
<div><br></div></div>-- <br><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div>
<div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</div></div>