Sean,<br><br>The answer is, I&#39;m working on a recently semi-released package called TrieMap.<br><br>The objective of this package, building off of the work in this <a href="https://docs.google.com/Doc?docid=0AWuaUF8ZNTNDZHB3emdyaF8zMzNmZmtmcHo2Yw&amp;hl=en" target="_blank">paper</a>, is to automatically derive the type of a generalized trie for any algebraic type based on its algebraic representation.  (I am working on writing up my methods for publication.)<br>

<br>Of course, if I could get automatic access to the mechanisms of a type&#39;s constructors, I wouldn&#39;t even require users to describe the algebraic representation of their type...<br>
<br clear="all">Louis Wasserman<br><a href="mailto:wasserman.louis@gmail.com" target="_blank">wasserman.louis@gmail.com</a><br>
<br><br><div class="gmail_quote">On Tue, Sep 8, 2009 at 2:34 AM, Sean Leather <span dir="ltr">&lt;<a href="mailto:leather@cs.uu.nl" target="_blank">leather@cs.uu.nl</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div class="gmail_quote"><div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I don&#39;t know a thing about SYB, Data.Data, or Data.Typeable, mostly because I&#39;m an efficiency fanatic.  Nevertheless, I&#39;d like to know whether or not there&#39;s a way to deconstruct a (mostly) arbitrary type, into tuples, unions,  etc. using this framework.  Any thoughts?<br>






</blockquote></div><div><br>You can use the Template Haskell deriving in EMGM to get that structure pretty efficiently.<br><br>  <a href="http://www.cs.uu.nl/wiki/GenericProgramming/EMGM" target="_blank">http://www.cs.uu.nl/wiki/GenericProgramming/EMGM</a><br>




  <a href="http://hackage.haskell.org/package/emgm" target="_blank">http://hackage.haskell.org/package/emgm</a><br><br>The obligatory question is: why do you want it?<br><br>Sean  <br></div></div>
</blockquote></div><br>