I just tried here, and got no problems.<div><br></div><div>lucky.hs:</div><div><div>lucky :: (Integral a) =&gt; a -&gt; String</div><div>lucky 7 = &quot;LUCKY NUMBER SEVEN!!!&quot;</div><div>lucky x = &quot;Sorry, you&#39;re out of luck, pal...&quot;</div>
<div><br></div><div>ghci:</div><div>:load &quot;/path/to/lucky.hs&quot;</div><div><div>[1 of 1] Compiling Main             ( /path/to/lucky.hs, interpreted )</div><div>Ok, modules loaded: Main.</div><div>*Main&gt; lucky 7</div>
<div>&quot;LUCKY NUMBER SEVEN!!!&quot;</div><div>*Main&gt; lucky 200</div><div>&quot;Sorry, you&#39;re out of luck, pal...&quot;</div><div>*Main&gt; </div></div><div><br></div><div>I would suggest verifying my ghc installation or for any &quot;funky&quot; chars in the file.</div>
<div><br></div>Homero Cardoso de Almeida<br><br><div class="gmail_quote">On Thu, May 31, 2012 at 6:16 PM, Keshav Kini <span dir="ltr">&lt;<a href="mailto:keshav.kini@gmail.com" target="_blank">keshav.kini@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Stan Kulp &lt;<a href="mailto:stan_kulp@yahoo.com">stan_kulp@yahoo.com</a>&gt; writes:<br>
&gt; I have been working my way through &quot;Learn You a Haskell for Greater Good&quot; and<br>
&gt; am stumped when I get to the &quot;Syntax in Functions - Pattern Matching&quot; section.<br>
&gt;<br>
&gt; The book shows the following expression...<br>
&gt;<br>
&gt; ghci&gt; lucky :: (Integral a) =&gt; a -&gt; String<br>
<br>
</div>As far as I can see, the live version of `the section you mention`_ on<br>
<a href="http://learnyouahaskell.com" target="_blank">learnyouahaskell.com</a> does not contain this text - it doesn&#39;t have the<br>
&quot;ghci&gt; &quot; at the beginning of the line. Besides what others have said in<br>
response to your question, I would add that you should make sure to read<br>
LYAH on the website if possible - other sources might be out of date, as<br>
I think the author does update the website version from time to time.<br>
<br>
.. _the section you mention:<br>
   <a href="http://learnyouahaskell.com/syntax-in-functions#pattern-matching" target="_blank">http://learnyouahaskell.com/syntax-in-functions#pattern-matching</a><br>
<span class="HOEnZb"><font color="#888888"><br>
-Keshav<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br></div>