<div dir="ltr">Hi Michael,<div><br></div><div>Yes, that did the trick.</div><div><br></div><div>Thanks!</div><div><br></div><div>-John</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 21 Mar 2016 at 01:13 Michael Snoyman <<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Here's an example:<div><br></div><div><div>{-# LANGUAGE MagicHash #-}</div><div>import GHC.Prim</div><div>import GHC.Types</div><div>import Data.Word</div><div><br></div><div>main :: IO ()</div><div>main = do</div><div> let word = 5 :: Word</div><div> res =</div><div> case word of</div><div> W# w -> W# (popCnt64# w)</div><div> print res</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Sun, Mar 20, 2016 at 12:19 PM, John Ky <span dir="ltr"><<a href="mailto:newhoggy@gmail.com" target="_blank">newhoggy@gmail.com</a>></span> wrote:<br></div></div><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 dir="ltr">Hello Haskellers,<div><br></div><div>Does anyone know how to call popCnt64# from the GHC.Prim module?</div><div><br></div><div>This was my failed attempt:</div><div><br></div>λ> popCnt64# 1<br><br><br><interactive>:14:11:<br> Couldn't match kind ‘*’ with ‘#’<br> When matching types<br> a0 :: *<br> Word# :: #<br> Expected type: Integer -> Word#<br> Actual type: Integer -> a0<br> In the first argument of ‘popCnt64#’, namely ‘1’<br> In the expression: popCnt64# 1<br> In an equation for ‘it’: it = popCnt64# 1<span><font color="#888888"><div><br></div><div>-John</div><div><br></div></font></span></div>
<br></blockquote></div></div><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">_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>