<div dir="ltr">On Thu, Aug 2, 2012 at 2:20 PM, Bryan Huh <span dir="ltr"><<a href="mailto:bhh1988@gmail.com" target="_blank">bhh1988@gmail.com</a>></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'm sorry if this is a stupid question, but the xmonad.hs doesn't
compile saying that "when" is out of scope. It seems to not
recognize the keyword "when." I tried "if" as well but then it tells
me there's a parse error. Are you sure that what you have compiles
for you?</div></blockquote><div><br></div><div>"when" isn't a keyword; it's a function defined in Control.Monad. (Haskell'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>