packages feed

kan-extensions 2.5 → 2.6

raw patch · 2 files changed

+6/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.Functor.KanExtension: instance (Functor g, Apply h) => Apply (Lan g h)

Files

Data/Functor/KanExtension.hs view
@@ -15,6 +15,7 @@ import Data.Functor.Identity import Data.Functor.Adjunction import Data.Functor.Composition+import Data.Functor.Apply import Control.Applicative  newtype Ran g h a = Ran { runRan :: forall b. (a -> g b) -> h b }@@ -59,6 +60,10 @@  instance Functor (Lan f g) where   fmap f (Lan g h) = Lan (f . g) h++instance (Functor g, Apply h) => Apply (Lan g h) where+  Lan kxf x <.> Lan kya y =+    Lan (\k -> kxf (fmap fst k) (kya (fmap snd k))) ((,) <$> x <.> y)  instance (Functor g, Applicative h) => Applicative (Lan g h) where   pure a = Lan (const a) (pure ())
kan-extensions.cabal view
@@ -1,6 +1,6 @@ name:          kan-extensions category:      Data Structures, Monads, Comonads, Functors-version:       2.5+version:       2.6 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE