GArrowFullyEnriched: minimize context of the data declaration
[ghc-base.git] / GHC / HetMet / GArrowFullyEnriched.hs
index bf7df6b..33f3684 100644 (file)
@@ -58,6 +58,7 @@ module GHC.HetMet.GArrowFullyEnriched (
 ) where
 import Control.Category
 import GHC.HetMet.GArrow
+import GHC.HetMet.GArrowEnclosure
 import Prelude hiding ((.), id)
 
 data GArrow g (**) u => Polynomial g (**) u t x y
@@ -116,6 +117,15 @@ instance (GArrowSwap g (**) u, GArrowCopy g (**) u, GArrowDrop g (**) u)  => GAr
  where
   ga_swap = N ga_swap
 
+--instance (GArrowSwap g (**) u, GArrowCopy g (**) u, GArrowDrop g (**) u, GArrowLoop g (**) u)
+--    => GArrowLoop (Polynomial g (**) u t) (**) u
+-- where
+--  ga_loopl = error "FIXME: GArrowFullyEnriched loopl not implemented"
+--  ga_loopr = error "FIXME: GArrowFullyEnriched loopl not implemented"
+
+instance GArrowEnclosure q g (**) u => GArrowEnclosure (Polynomial q (**) u t) g (**) u where
+  enclose f = N (enclose f)
+
 --
 -- | Given an **instance-polymorphic** Haskell function @(g () a)->(g b c)@ we can produce
 -- a self-contained instance-polymorphic term @(g (a**b) c)@.  The "trick" is that we supply