From 8ed8e78f08c7fb045fd988f5859831dd75654490 Mon Sep 17 00:00:00 2001 From: Ross Paterson Date: Tue, 4 Nov 2008 14:45:15 +0000 Subject: [PATCH] FIX #2722: update RULES for the Category/Arrow split The rule arr id = id interacts unpleasantly with the advice to define id = arr id in instances of Category that are also instances of Arrow (#2722). Also changed a couple of >>>'s to .'s in later rules. --- Control/Arrow.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Control/Arrow.hs b/Control/Arrow.hs index 3fa7e1e..4606b4d 100644 --- a/Control/Arrow.hs +++ b/Control/Arrow.hs @@ -94,8 +94,6 @@ class Category a => Arrow a where f &&& g = arr (\b -> (b,b)) >>> f *** g {-# RULES -"identity" - arr id = id "compose/arr" forall f g . (arr f) . (arr g) = arr (f . g) "first/arr" forall f . @@ -217,9 +215,9 @@ class Arrow a => ArrowChoice a where "fanin/arr" forall f g . arr f ||| arr g = arr (f ||| g) "compose/left" forall f g . - left f >>> left g = left (f >>> g) + left f . left g = left (f . g) "compose/right" forall f g . - right f >>> right g = right (f >>> g) + right f . right g = right (f . g) #-} instance ArrowChoice (->) where -- 1.7.10.4