Yes, it&#39;s entirely unproblematic, and a good suggestion.<br><br><br>Thanks,<br>Pedro<br><br><div class="gmail_quote">On Sat, Jan 26, 2013 at 6:36 PM, Simon Peyton-Jones <span dir="ltr">&lt;<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Good idea!  Simple, and I see no downsides.<br>
<br>
Pedro is putting in place a new Typeable library (using kind polymorphism) for GHC 7.8.  Pedro, might you incorporate this?<br>
<span class="HOEnZb"><font color="#888888"><br>
Simon<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
|  -----Original Message-----<br>
|  From: <a href="mailto:libraries-bounces@haskell.org">libraries-bounces@haskell.org</a> [mailto:<a href="mailto:libraries-bounces@haskell.org">libraries-bounces@haskell.org</a>] On<br>
|  Behalf Of Shachaf Ben-Kiki<br>
|  Sent: 26 January 2013 04:07<br>
|  To: <a href="mailto:libraries@haskell.org">libraries@haskell.org</a><br>
|  Subject: Proxy and new-typeable<br>
|<br>
|  I see that the new-typeable branch in GHC is using &quot;typeRep :: forall a.<br>
|  Typeable a =&gt; Proxy a -&gt; TypeRep&quot; rather than &quot;typeOf :: forall a. Typeable a<br>
|  =&gt; a -&gt; TypeRep&quot;. This is clearly a big improvement over using undefined<br>
|  everywhere.<br>
|<br>
|  I&#39;d like to suggest a small change, if it hasn&#39;t been brought up before --<br>
|  &quot;typeRep :: forall proxy a. Typeable a =&gt; proxy a -&gt; TypeRep&quot;. This makes<br>
|  typeRep compatible with any other Proxy type, since it doesn&#39;t use any<br>
|  properties of the concrete type -- it just uses it to pass information about<br>
|  the &quot;a&quot;. Things that consume a Proxy don&#39;t ever need to refer to Proxy<br>
|  explicitly.<br>
|<br>
|  This would make Typeable compatible with other Proxy libraries, like the one in<br>
|  &quot;tagged&quot;. It would also make it compatible with any other type of kind * -&gt; *<br>
|  -- for example, &quot;typeRep ([] :: [Int])&quot; would be a valid, and arguable more<br>
|  convenient, syntax for using typeRep. &quot;Nothing :: Maybe Int&quot; and so on would<br>
|  work too. So things that produce a &quot;proxy&quot; don&#39;t need to refer to Proxy<br>
|  explicitly either.<br>
|<br>
|  Possibly this would make the Proxy type entirely unnecessary. If it stays,<br>
|  though, I suggest that it belongs in a module other than Data.Typeable.Internal<br>
|  -- it&#39;s a useful type for many other things, and as long as it&#39;s in base and<br>
|  exposed to users, it might as well be treated as a type in its own right. It&#39;s<br>
|  also a monad, can provide a variant of `asTypeOf`, and so on.<br>
|<br>
|      Shachaf<br>
|<br>
|  _______________________________________________<br>
|  Libraries mailing list<br>
|  <a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
|  <a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br>