<div>&nbsp;</div>
<div>Many thanks for your helps.</div>
<div>&nbsp;</div>
<div>Kwanghoon</div>
<div>&nbsp;</div>
<div>On Tue, Dec 16, 2008 at 11:22 PM, Thomas Schilling <span dir="ltr">&lt;<a href="mailto:nominolo@googlemail.com">nominolo@googlemail.com</a>&gt;</span> wrote:<br></div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">{-# LANGUAGE ScopedTypeVariables #-}<br><br>2008/12/16 Neil Mitchell &lt;<a href="mailto:ndmitchell@gmail.com">ndmitchell@gmail.com</a>&gt;:<br>

<div>
<div></div>
<div class="Wj3C7c">&gt; Hi<br>&gt;<br>&gt;&gt; You want to use `asTypeOf`, with a lazy pattern to name a value of type &#39;a&#39;.<br>&gt;&gt;<br>&gt;&gt; &nbsp; &nbsp;pr xs = &quot;[&quot; ++ pr (undefined `asTypeOf` x) ++ &quot;]&quot;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;where (x:_) = xs<br>&gt;<br>&gt; I prefer:<br>&gt;<br>&gt; pr xs = &quot;[&quot; ++ pr (undefined `asTypeOf` head x) ++ &quot;]&quot;<br>&gt;<br>&gt; Or even more simply:<br>&gt;<br>&gt; pr xs = &quot;[&quot; ++ pr (head x) ++ &quot;]&quot;<br>
&gt;<br>&gt; I do believe there is some GHC extension that can be turned on to<br>&gt; refer to variables like you did, but its not standard Haskell.<br>&gt;<br>&gt; Thanks<br>&gt;<br>&gt; Neil<br>&gt; _______________________________________________<br>
&gt; Glasgow-haskell-users mailing list<br>&gt; <a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>&gt; <a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
&gt;<br><br><br><br></div></div><font color="#888888">--<br>Push the envelope. &nbsp;Watch it bend.<br></font>
<div>
<div></div>
<div class="Wj3C7c">_______________________________________________<br>Glasgow-haskell-users mailing list<br><a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
</div></div></blockquote></div><br>