[small bugfix in output simplification, less extensive, but correct
martin.hofmann@uni-bamberg.de**20090619102638] hunk ./src/Data/Rules.hs 24
-import Data.List (foldl', transpose, (\\), nub, sortBy, partition, isPrefixOf, deleteBy)
+import Data.List ( foldl', transpose, (\\), nub, sortBy, sort, partition
+                 , isPrefixOf, deleteBy)
hunk ./src/Data/Rules.hs 275
-    rearrange  = (uncurry (++)). partition tgtOrBgk
+    rearrange  = (uncurry  ((++) `on` sort)). partition tgtOrBgk
hunk ./src/Data/Rules.hs 285
+--                               `mplus`
+--                              (getOneWhich hasTwoCall nrec)
hunk ./src/Data/Rules.hs 289
---                          (cc,ct) = (mkCall (fst x) (typeOf.rhs $ cr) (lhs cr), rhs cr)
---                      in simplify blckl $ replaceInAll cc ct (r ++ xs)
---                      in  trace ("\nXXX " ++ (show.fst $ x) ++ "\n" ++ (show $ l)) $ simplify blckl $ replaceInAll cc ct (r ++ xs)
hunk ./src/Data/Rules.hs 308
-    repCall r = r{rhs= replaceTerm cc ct (rhs r)}
-    
+    repCall r = r{rhs= replaceCall (rule [cc] ct) (rhs r)}
+--    repCall r = r{rhs= replaceTerm cc ct (rhs r)}
+
+replaceCall :: Rule -> RHS -> RHS
+replaceCall _ t@(TVarE _ _)       = t
+replaceCall _ t@(TLitE _ _)       = t
+replaceCall _ t@(TWildE _ _)      = t
+replaceCall _ t@(TConE n _)       = t
+replaceCall r t = maybe repSubterms id $ matchEval [t] r
+    where
+    repSubterms = (root t $ map (replaceCall r) $ subterms t)
hunk ./src/TODO 4
-
+* allow for guarded rules
+* introduce recursion schemes for lists:
+	- Catamorphisms (ok)
+	- Anamorphisms (need conditionals or guards)
+	- Hylomorphisms (need conditionals or guards)
+	- Paramorphisms
+	- ... (?)
+* generalise morphisms to arbitrary algebraic data types
hunk ./src/UI/Help.hs 61
-                           "function calls [default]"))) <$$>
+                           "function calls"))) <$$>
hunk ./src/UI/Help.hs 63
-                align (fillwords ("show Igor2's original solution"))) <$$>
+                align (fillwords ("show Igor2's original solution [default]"))) <$$>