From 23ce9fad436bb4beff4671a11b2704da2104e462 Mon Sep 17 00:00:00 2001 From: John Meacham Date: Fri, 3 Mar 2006 04:57:53 +0000 Subject: [PATCH] make head/build rule apply to all types, not just Bool. --- GHC/List.lhs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GHC/List.lhs b/GHC/List.lhs index 0d43453..705fdc9 100644 --- a/GHC/List.lhs +++ b/GHC/List.lhs @@ -63,7 +63,7 @@ badHead = errorEmptyList "head" -- This rule is useful in cases like -- head [y | (x,y) <- ps, x==t] {-# RULES -"head/build" forall (g::forall b.(Bool->b->b)->b->b) . +"head/build" forall (g::forall b.(a->b->b)->b->b) . head (build g) = g (\x _ -> x) badHead "head/augment" forall xs (g::forall b. (a->b->b) -> b -> b) . head (augment g xs) = g (\x _ -> x) (head xs) -- 1.7.10.4