) 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
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