Skip to content

Commit

Permalink
Resolve ku-fpg#11. Rename run to unwrapNT and nat to makeNT
Browse files Browse the repository at this point in the history
and move them into `Transforrmation` class
  • Loading branch information
phadej committed Oct 15, 2016
1 parent 265efd3 commit 5514ee0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Control/Natural.hs
Expand Up @@ -24,8 +24,8 @@ module Control.Natural
-- * Type Synonym for a Natural Transformation
, type (~>)
-- * Conversion functions between the newtype and the synonym
, run
, nat
, applyNT
, makeNT
-- * Class for Natural Transformations
, Transformation(..)
) where
Expand Down Expand Up @@ -76,12 +76,12 @@ class Transformation f g t | t -> f g where
instance Transformation f g (f :~> g) where
Nat f # g = f g

-- | 'run' is the nonfix version of @#@. It is used to break natural
-- | 'applyNT' is the nonfix version of @#@. It is used to break natural
-- transformation wrappers, including ':~>'.
run :: Transformation f g t => t -> (forall a . f a -> g a)
run = (#)
applyNT :: Transformation f g t => t -> (forall a . f a -> g a)
applyNT = (#)

-- | 'nat' builds our natural transformation abstraction out of
-- | 'makeNT' builds our natural transformation abstraction out of
-- a natural transformation function.
nat :: (forall a . f a -> g a) -> f :~> g
nat = Nat
makeNT :: (forall a . f a -> g a) -> f :~> g
makeNT = Nat

0 comments on commit 5514ee0

Please sign in to comment.