rephrase GArrow{Sum,Prod} to make instance inference easier
[ghc-base.git] / GHC / HetMet / Arrow.hs
index 2de4c42..cb20a6a 100644 (file)
@@ -55,9 +55,7 @@ instance ArrowApply a => GArrowApply a (,) () a where
   ga_applyl    = ga_swap >>> app
   ga_applyr    = app
 
-instance Arrow a => GArrowProd a (,) () (,) () where
-  ga_prod_drop  = arr (\x -> ())
-  ga_prod_copy  = arr (\x -> (x,x))
+instance Arrow a => GArrowProd a (,) () where
 
 -- The uninhabited type
 data Void
@@ -90,7 +88,7 @@ instance ArrowChoice a => GArrow a Either Void where
                     eitherUnAssoc (Right (Left  y)) = Left  (Right y)
                     eitherUnAssoc (Right (Right z)) = Right        z
 
-instance ArrowChoice a => GArrowSum a (,) () Either Void where
+instance ArrowChoice a => GArrowSum a Either Void where
   ga_never = arr voidImpossible
   ga_merge = arr merge
               where