<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2745.2800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I'm trying to create&nbsp;a library to querying XML 
data using Strafunski. I'm also using DrIFT to generate the instances of 
Typeable and Term of my Datatypes to be used inside Strafunski.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Supose i've this datatypes:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>data Shape = Circle Float (Float,Float) | Triangle 
(Float, Float) (Float, Float) (Float, Float)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>then DrIFT, among other things, creates the 
functions:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>isCircle (Circle _ _&nbsp;) = True</FONT></DIV>
<DIV><FONT face=Arial size=2>isCircle _ = False</FONT></DIV>
<DIV><FONT face=Arial size=2>isTriangle (Triangle _ _ _) = True</FONT></DIV>
<DIV><FONT face=Arial size=2>isTriangle _ = False</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>what i'd like to have "is" as a generic "isFoo" 
function, with the type:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>is :: String -&gt; DataType -&gt; Bool</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>that when running will act like this:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>is "Circle" (Circle 3.4 (3.0,3.1)) = 
True</FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>is "Triangle" (Circle 3.4 (3.0,3.1)) = 
False</FONT></DIV>
<DIV>is "Circle" 2&nbsp;= False</DIV>
<DIV>&nbsp;</DIV>
<DIV>I was looking on TyCon constructor and mkTyCon function, but i didn't 
understood it well.</DIV>
<DIV>Can anyone tell me how can i create this "is Foo" function?</DIV>
<DIV>&nbsp;</DIV>
<DIV>I was thinking about create a dynamic type with mkTyCon and then see if it 
matches with the DataType receiveid as function parameter.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards,</DIV>
<DIV>Vitor Rodrigues</DIV>
<DIV>&nbsp;</DIV></FONT></DIV></BODY></HTML>