semigroupoids 3.0.2 → 3.0.3
raw patch · 8 files changed
+50/−4 lines, 8 filesdep ~base
Dependency ranges changed: base
Files
- semigroupoids.cabal +1/−1
- src/Data/Functor/Alt.hs +4/−0
- src/Data/Functor/Apply.hs +5/−1
- src/Data/Functor/Bind.hs +13/−1
- src/Data/Functor/Extend.hs +5/−1
- src/Data/Functor/Plus.hs +4/−0
- src/Data/Semigroupoid.hs +10/−0
- src/Data/Semigroupoid/Static.hs +8/−0
semigroupoids.cabal view
@@ -1,6 +1,6 @@ name: semigroupoids category: Control, Comonads-version: 3.0.2+version: 3.0.3 license: BSD3 cabal-version: >= 1.6 license-file: LICENSE
src/Data/Functor/Alt.hs view
@@ -1,3 +1,7 @@+{-# LANGUAGE CPP #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Safe #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Alt
src/Data/Functor/Apply.hs view
@@ -1,3 +1,7 @@+{-# LANGUAGE CPP #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Safe #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Apply@@ -27,4 +31,4 @@ , MaybeApply(..) ) where -import Data.Functor.Bind +import Data.Functor.Bind
src/Data/Functor/Bind.hs view
@@ -1,3 +1,15 @@+{-# LANGUAGE CPP #-}+#ifndef MIN_VERSION_comonad+#define MIN_VERSION_comonad(x,y,z) 1+#endif++#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702+#if __GLASGOW_HASKELL__ >= 707 && (MIN_VERSION_comonad(3,0,3))+{-# LANGUAGE Safe #-}+#else+{-# LANGUAGE Trustworthy #-}+#endif+#endif {-# OPTIONS_GHC -fno-warn-orphans #-} ----------------------------------------------------------------------------- -- |@@ -449,7 +461,7 @@ instance Ord k => Bind (Map k) where m >>- f = Map.mapMaybeWithKey (\k -> Map.lookup k . f) m --- | An 'IntMap' is a 'Applicative', but it is an instance of 'Bind'+-- | An 'IntMap' is not a 'Monad', but it is an instance of 'Bind' instance Bind IntMap where m >>- f = IntMap.mapMaybeWithKey (\k -> IntMap.lookup k . f) m
src/Data/Functor/Extend.hs view
@@ -1,3 +1,7 @@+{-# LANGUAGE CPP #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Safe #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Extend@@ -67,7 +71,7 @@ duplicated f m = f . (<>) m instance Extend Seq where- duplicated = Seq.tails+ duplicated l = Seq.take (Seq.length l) (Seq.tails l) instance Extend Tree where duplicated w@(Node _ as) = Node w (map duplicated as)
src/Data/Functor/Plus.hs view
@@ -1,3 +1,7 @@+{-# LANGUAGE CPP #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Safe #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Plus
src/Data/Semigroupoid.hs view
@@ -1,3 +1,13 @@+{-# LANGUAGE CPP #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702+#if __GLASGOW_HASKELL__ >= 707 && (MIN_VERSION_comonad(3,0,3))+{-# LANGUAGE Safe #-}+#else+{-# LANGUAGE Trustworthy #-}+#endif+#endif++ ----------------------------------------------------------------------------- -- | -- Module : Data.Semigroupoid
src/Data/Semigroupoid/Static.hs view
@@ -1,4 +1,12 @@ {-# LANGUAGE CPP #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702+#if __GLASGOW_HASKELL__ >= 707 && (MIN_VERSION_comonad(3,0,3))+{-# LANGUAGE Safe #-}+#else+{-# LANGUAGE Trustworthy #-}+#endif+#endif+ module Data.Semigroupoid.Static ( Static(..) ) where