RE: Querying the instances a data type implements
Simon Peyton-Jones <[email protected]> Mon, 18 Jan 2010 09:55:06 +0000
| Newsgroups | gmane.comp.lang.haskell.template,gmane.comp.lang.haskell.glasgow.user |
|---|---|
| Message-ID | <59543203684B2244980D7E4057D5FBC10AFA4087@DB3EX14MBXC306.europe.corp.microsoft.com> |
--===============1070293048== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_59543203684B2244980D7E4057D5FBC10AFA4087DB3EX14MBXC306e_" --_000_59543203684B2244980D7E4057D5FBC10AFA4087DB3EX14MBXC306e_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable All: as Robert says, I keep meaning to close the template-haskell list alto= gether; but I am not sure how to do so. Jonathan: where did you find a pointer to the mailing list? I should remov= e those too. Returning to the question, sadly there's no way to do what you want right n= ow. There's an open feature request: http://hackage.haskell.org/trac/ghc/ticket/1835 Would anyone like to undertake it? It's not hard. Simon From: [email protected] [mailto:template-haskell-bounces= @haskell.org] On Behalf Of [email protected] Sent: 17 January 2010 23:42 To: [email protected] Subject: [Template-haskell] Querying the instances a data type implements Hi, I am trying query the instances that a data type implements. Calling reify = on the data type doesn't appear to return anything relating to type classes= . I am very new to Template Haskell, so I apologize if there is a easy way to= do this that I missed. -Jonathan --_000_59543203684B2244980D7E4057D5FBC10AFA4087DB3EX14MBXC306e_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"> <head> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii"= > <meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)"> <style> <!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--> </head> <body lang=3DEN-GB link=3Dblue vlink=3Dpurple> <div class=3DSection1> <p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",= "sans-serif"; color:#1F497D'>All: as Robert says, I keep meaning to close the template-ha= skell list altogether; but I am not sure how to do so. <o:p></o:p></span></= p> <p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",= "sans-serif"; color:#1F497D'><o:p> </o:p></span></p> <p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",= "sans-serif"; color:#1F497D'>Jonathan: where did you find a pointer to the mailing list?&= nbsp; I should remove those too.<o:p></o:p></span></p> <p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",= "sans-serif"; color:#1F497D'><o:p> </o:p></span></p> <p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",= "sans-serif"; color:#1F497D'>Returning to the question, sadly there’s no way to do = what you want right now. There’s an open feature request:<o:p></o:p></sp= an></p> <p class=3DMsoNormal style=3D'text-indent:5.25pt'><span style=3D'font-size:= 11.0pt; font-family:"Calibri","sans-serif";color:#1F497D'> http://hackage.hask= ell.org/trac/ghc/ticket/1835<o:p></o:p></span></p> <p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",= "sans-serif"; color:#1F497D'>Would anyone like to undertake it? It’s not hard= .<o:p></o:p></span></p> <p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",= "sans-serif"; color:#1F497D'><o:p> </o:p></span></p> <p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",= "sans-serif"; color:#1F497D'>Simon<o:p></o:p></span></p> <p class=3DMsoNormal><span style=3D'font-size:11.0pt;font-family:"Calibri",= "sans-serif"; color:#1F497D'><o:p> </o:p></span></p> <div style=3D'border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm = 4.0pt'> <div> <div style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm = 0cm 0cm'> <p class=3DMsoNormal><b><span lang=3DEN-US style=3D'font-size:10.0pt;font-f= amily: "Tahoma","sans-serif"'>From:</span></b><span lang=3DEN-US style=3D'font-siz= e:10.0pt; font-family:"Tahoma","sans-serif"'> [email protected] [mailto:[email protected]] <b>On Behalf Of </b>jonathanG= [email protected]<br> <b>Sent:</b> 17 January 2010 23:42<br> <b>To:</b> [email protected]<br> <b>Subject:</b> [Template-haskell] Querying the instances a data type implements<o:p></o:p></span></p> </div> </div> <p class=3DMsoNormal><o:p> </o:p></p> <p class=3DMsoNormal>Hi, <br> <br> I am trying query the instances that a data type implements. Calling reify = on the data type doesn't appear to return anything relating to type classes. <= br> <br> I am very new to Template Haskell, so I apologize if there is a easy way to= do this that I missed.<br> <br> -Jonathan<o:p></o:p></p> </div> </div> </body> </html> --_000_59543203684B2244980D7E4057D5FBC10AFA4087DB3EX14MBXC306e_-- --===============1070293048== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ template-haskell mailing list [email protected] http://www.haskell.org/mailman/listinfo/template-haskell --===============1070293048==--