<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Out of curiosity, do you know if HaRe works for 6.10? &nbsp;The page only mentions GHC 6.6 and 6.8.<br><br>Duane Johnson<br><a href="http://blog.inquirylabs.com/">http://blog.inquirylabs.com/</a><br><div><div><br></div><div><br></div><div>On Mar 18, 2009, at 6:14 AM, Chris Brown wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I'm not sure if you got my previous message, as I was having some problems posting to the list...<br><br><blockquote type="cite">Putting in a nutshell, I generalize an extensional defined function<br></blockquote><blockquote type="cite">definition into a recursive one. This is done in a number of steps by<br></blockquote><blockquote type="cite">modifying expressions and exploiting type information of<br></blockquote><blockquote type="cite">sub-expressions. For example:<br></blockquote><blockquote type="cite">rev [] = []<br></blockquote><blockquote type="cite">rev [a] = [a]<br></blockquote><blockquote type="cite">rev [a,b] = [b,a]<br></blockquote><blockquote type="cite">rev [a,b,c] = [c,b,a]<br></blockquote><blockquote type="cite">~~&gt;<br></blockquote><blockquote type="cite">rev x = y<br></blockquote><blockquote type="cite">~~&gt;<br></blockquote><blockquote type="cite">rev [] = []<br></blockquote><blockquote type="cite">rev (x:xs) = (y:ys)<br></blockquote><blockquote type="cite">~~&gt;<br></blockquote><blockquote type="cite">rev [] = []<br></blockquote><blockquote type="cite">rev (x:xs) = (last (x:xs)) : (reverse (x:xs))<br></blockquote><blockquote type="cite">The initial set of rules is given by the user (in a file, via IO, ...).<br></blockquote><blockquote type="cite">The problem later is to infer the type of an intermediate variable, e.g.<br></blockquote><blockquote type="cite">'y'.<br></blockquote><br>I'm still not entirely sure what you want to do here. But it sounds like HaRe could already do most of this for you via a sequence of folds, unfolds, introduce pattern matching and generative folding. HaRe already has built-in support for some symbolic evaluation, which is already used in the generative<br>fold refactoring, and has type checking support too.<br><br><a href="http://www.cs.kent.ac.uk/projects/refactor-fp/hare.html">http://www.cs.kent.ac.uk/projects/refactor-fp/hare.html</a><br><br>If it doesn't do exactly what you want out of the tin, it does have a large API for designing transformations over Haskell code.<br><br>http://www.cs.kent.ac.uk/projects/refactor-fp/hare/haddock/RefacUtils.html<br><br><br><br>Chris.<br><br><br><br><br><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite">Martin<br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Haskell-Cafe mailing list<br></blockquote><blockquote type="cite">Haskell-Cafe@haskell.org<br></blockquote><blockquote type="cite">http://www.haskell.org/mailman/listinfo/haskell-cafe<br></blockquote><blockquote type="cite"><br></blockquote><br>--<br>Chris Brown<br><br>Visualization Software Engineer, Peiriannydd Meddalwedd Delweddu.<br><br>Cast Ltd., Technium CAST,<br>Ffordd Penlan, Parc Menai,<br>Bangor, Gwynedd UK. LL57 4HJ.<br><br>Tel: +44 (0)1248 675038<br>Fax: +44 (0)1248 675012<br>Mobile: +44 (0)7917 763712<br><br><br>-- <br>Centre for Advanced Software Technology Limited is a limited company registered in England and Wales.<br>Registered Number: 04473521, Registered Office: Finance Office, Bangor University, College Road, Bangor, Gwynedd. LL57 2DG.<br><br>_______________________________________________<br>Haskell-Cafe mailing list<br>Haskell-Cafe@haskell.org<br>http://www.haskell.org/mailman/listinfo/haskell-cafe<br></div></blockquote></div><br></body></html>