<div dir="ltr">Thanks Richard !<div><br></div><div>I followed your advice and posted a new comment to the ticket</div><div><br></div><div>Yorick</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/6 Richard Eisenberg <span dir="ltr"><<a href="mailto:eir@cis.upenn.edu" target="_blank">eir@cis.upenn.edu</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hello Yorick,</div><div><br></div><div>Thanks for taking this one on!</div><div>
<br></div><div>First off, this kind of question/post is appropriate for putting right into the ticket itself. Posting a comment to the ticket makes it more likely that you'll get a response and saves your thoughts for posterity.</div>
<div><br></div><div>Now, on to your question:</div><div><br></div><div>That seems somewhat reasonable, but I think your work could go a little further. It looks like you've introduced TupleP as a new constructor for Pred. This, I believe, would work. But, I think it would be better to have a way of using *any* type as a predicate in TH, as allowed by ConstraintKinds. Perhaps one way to achieve this is to make Pred a synonym of Type, or there could be a TypeP constructor for Pred.</div>
<div><br></div><div>In any case, I would recommend writing a wiki page up with a proposed new TH syntax for predicates and then posting a link to the proposal on the #7021 ticket. Then, it will be easier to debate the merits of any particular approach.</div>
<div><br></div><div>Once again, thanks!</div><div>Richard</div><br><div><div><div class="h5"><div>On Jan 3, 2014, at 6:13 PM, Yorick Laupa wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5"><div dir="ltr">
Hi,<div><br></div><div>I try to make my way through #7021 [1]. Unfortunately, there is nothing in the ticket about what should be expected from the code given as example.</div><div><br></div><div>I came with an implementation and I would like feedback from you guys. So, considering this snippet:</div>

<div><br></div><div>--</div><div><pre style="margin-right:1.75em;border-top-right-radius:0.3em;font-size:13px;overflow:auto;border-bottom-right-radius:0.3em;margin-left:1.75em;border-top-left-radius:0.3em;background-color:rgb(247,247,247);padding:0.25em;border:1px solid rgb(215,215,215);border-bottom-left-radius:0.3em">
{-# LANGUAGE ConstraintKinds #-}

type IOable a = (Show a, Read a)

foo :: IOable a => a
foo = undefined</pre></div><div>-- </div><div><br></div><div>This is what I got now when pretty-printing <a href="http://TH.Info" target="_blank">TH.Info</a> after reify "foo" call:</div><div><br></div><div>VarI Tuple.foo (ForallT [PlainTV a_1627398594] [TupleP 2 [AppT (ConT GHC.Show.Show) (VarT a_1627398594),AppT (ConT GHC.Read.Read) (VarT a_1627398594)]] (VarT a_1627398594)) Nothing (Fixity 9 InfixL)</div>

<div> </div><div>Does that sound right to you ?</div><div><br></div><div>Thanks for your time</div><div><br></div><div>-- Yorick</div><div><br></div><div>[1] <a href="https://ghc.haskell.org/trac/ghc/ticket/7021" target="_blank">https://ghc.haskell.org/trac/ghc/ticket/7021</a></div>

</div></div></div>
_______________________________________________<br>ghc-devs mailing list<br><a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/mailman/listinfo/ghc-devs</a><br>
</blockquote></div><br></div></blockquote></div><br></div>