<div dir="ltr">On Thu, Aug 2, 2012 at 2:20 PM, Bryan Huh <span dir="ltr">&lt;<a href="mailto:bhh1988@gmail.com" target="_blank">bhh1988@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    I&#39;m sorry if this is a stupid question, but the xmonad.hs doesn&#39;t
    compile saying that &quot;when&quot; is out of scope. It seems to not
    recognize the keyword &quot;when.&quot; I tried &quot;if&quot; as well but then it tells
    me there&#39;s a parse error. Are you sure that what you have compiles
    for you?</div></blockquote><div><br></div><div>&quot;when&quot; isn&#39;t a keyword; it&#39;s a function defined in Control.Monad.  (Haskell&#39;s laziness means that many things that would have to be baked-in syntax in other languages can be written as functions, and its syntax means those functions behave as if they *were* baked into the language.)  So all you should need to do is add</div>
<div><br></div><div>    import Control.Monad (when)</div><div><br></div><div>up with the other import statements.</div><div><br></div></div>-- <br>brandon s allbery                                      <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>
wandering unix systems administrator (available)     (412) 475-9364 vm/sms<br><br>
</div>