{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Safe #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE RankNTypes #-}
module Control.Object (Object(..), (#)) where
import Control.Natural
newtype Object f = Object (f ~> IO)
instance Transformation f IO (Object f) where
Object forall a. f a -> IO a
f # :: Object f -> forall a. f a -> IO a
# f a
g = (forall a. f a -> IO a) -> f :~> IO
forall {k} (f :: k -> *) (g :: k -> *). (f ~> g) -> f :~> g
NT f x -> IO x
forall a. f a -> IO a
f (f :~> IO) -> forall a. f a -> IO a
forall {k} (f :: k -> *) (g :: k -> *) t.
Transformation f g t =>
t -> forall (a :: k). f a -> g a
# f a
g