<div dir="ltr">On Tue, Oct 23, 2012 at 4:31 AM, M.v.Gulik <span dir="ltr">&lt;<a href="mailto:mvgulik@gmail.com" target="_blank">mvgulik@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">
1) What is the purpose of the used pound/&quot;#&quot; character here. (Looks<br>
like some type-casting, but that&#39;s just a wild guess from me here.<br></blockquote><div><br></div><div>This is not normal Haskell code you&#39;re looking at; it&#39;s using internals which are normally hidden, and # is not special in normal Haskell code.  If you turn on the special meaning (MagicHash) then it usually means that something is unlifted.</div>
<div><br></div><div>In this case, 1# is an unboxed Int value:  a raw machine word.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2) kinda the same for the &quot;I#&quot; in the &quot;len [] ...&quot; line. As the length<br>

</blockquote><div><br></div><div>I# is the internal constructor for a normal Int value; the value (1 :: Int) is internally represented as (I# 1#), or the internal Int constructor wrapping a raw machine word.</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">3) Why is it giving a compile error on the &quot;where&quot; line. Error:<br></blockquote><div><br></div><div>Because # does not have its special meaning in normal Haskell code.</div>
<div><br></div><div><a href="http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#magic-hash">http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#magic-hash</a> documents this special behavior, and what you need to do to get it.  But you should probably not be worrying about it at this point, and almost certainly not using it.</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/linux, openafs, kerberos, infrastructure          <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div><br>
</div>