From 30e0f79975e56ac91f9883bfb5fa3cc168062b9e Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft" Date: Wed, 1 Aug 2007 12:52:08 +0000 Subject: [PATCH] Generalise the type of synthesize, as suggested by Trac #1571 I have not looked at the details, but the type checker is happy with the more general type, and more general types are usually a Good Thing. --- Data/Generics/Schemes.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/Generics/Schemes.hs b/Data/Generics/Schemes.hs index 7985457..f23bcd0 100644 --- a/Data/Generics/Schemes.hs +++ b/Data/Generics/Schemes.hs @@ -122,7 +122,7 @@ something = everything orElse -- 2nd argument o is for reduction of results from subterms; -- 3rd argument f updates the synthesised data according to the given term -- -synthesize :: s -> (s -> s -> s) -> GenericQ (s -> s) -> GenericQ s +synthesize :: s -> (t -> s -> s) -> GenericQ (s -> t) -> GenericQ t synthesize z o f x = f x (foldr o z (gmapQ (synthesize z o f) x)) -- 1.7.10.4