From 501d4ded88828294d450b90d57adf0a017b3503d Mon Sep 17 00:00:00 2001 From: Adam Megacz Date: Sat, 19 Mar 2011 12:32:15 -0700 Subject: [PATCH] add Control.Category instance for GArrow --- GHC/HetMet/GArrow.hs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/GHC/HetMet/GArrow.hs b/GHC/HetMet/GArrow.hs index 93d2886..2f7f5f9 100644 --- a/GHC/HetMet/GArrow.hs +++ b/GHC/HetMet/GArrow.hs @@ -19,6 +19,7 @@ module GHC.HetMet.GArrow ( GArrowReflect(..) ) where import Control.Arrow +import Control.Category class GArrow g (**) where ga_id :: g x x @@ -94,3 +95,14 @@ instance ArrowLoop a => GArrowLoop a (,) where ga_loop = loop + + +------------------------------------------------------------------------------ +-- Category instance for GArrow + +instance GArrow g => Category g where + id = ga_id + x .y = ga_comp y x + + + -- 1.7.10.4