packages feed

universum 1.2.0 → 1.3.0

raw patch · 13 files changed

+96/−38 lines, 13 filesdep −type-operatorssetup-changedPVP ok

version bump matches the API change (PVP)

Dependencies removed: type-operators

API changes (from Hackage documentation)

- Universum.Container.Class: instance (GHC.Classes.Eq a, Data.Hashable.Class.Hashable a) => Universum.Container.Class.CanHash a
- Universum.Container.Class: instance Universum.Container.Class.Container (Data.HashSet.HashSet v)
- Universum.Container.Class: instance Universum.Container.Class.Container (Data.List.NonEmpty.NonEmpty a)
- Universum.Container.Class: instance Universum.Container.Class.Container (Data.Monoid.Dual a)
- Universum.Container.Class: instance Universum.Container.Class.Container (Data.Monoid.Product a)
- Universum.Container.Class: instance Universum.Container.Class.Container (Data.Monoid.Sum a)
- Universum.Container.Class: instance Universum.Container.Class.Container (Data.Set.Internal.Set v)
- Universum.Container.Class: instance Universum.Container.Class.One (Data.List.NonEmpty.NonEmpty a)
- Universum.Container.Class: type ElementConstraint t = Eq;
- Universum.TypeOps: type ($) k k1 (f :: k -> k1) (a :: k) = f a
+ Universum: (%~) :: () => ASetter s t a b -> a -> b -> s -> t
+ Universum: (&) :: () => a -> a -> b -> b
+ Universum: (.~) :: () => ASetter s t a b -> b -> s -> t
+ Universum: (<&>) :: Functor f => f a -> a -> b -> f b
+ Universum: (^.) :: () => s -> Getting a s a -> a
+ Universum: (^..) :: () => s -> Getting Endo [a] s a -> [a]
+ Universum: (^?) :: () => s -> Getting First a s a -> Maybe a
+ Universum: _1 :: Field1 s t a b => Lens s t a b
+ Universum: _2 :: Field2 s t a b => Lens s t a b
+ Universum: _3 :: Field3 s t a b => Lens s t a b
+ Universum: _4 :: Field4 s t a b => Lens s t a b
+ Universum: _5 :: Field5 s t a b => Lens s t a b
+ Universum: infixl 1 <&>
+ Universum: infixl 8 ^.
+ Universum: infixr 4 %~
+ Universum: over :: () => ASetter s t a b -> a -> b -> s -> t
+ Universum: preuse :: MonadState s m => Getting First a s a -> m Maybe a
+ Universum: preview :: MonadReader s m => Getting First a s a -> m Maybe a
+ Universum: set :: () => ASetter s t a b -> b -> s -> t
+ Universum: type Lens' s a = Lens s s a a
+ Universum: type Traversal' s a = Traversal s s a a
+ Universum: type Traversal s t a b = forall (f :: * -> *). Applicative f => a -> f b -> s -> f t
+ Universum: use :: MonadState s m => Getting a s a -> m a
+ Universum: view :: MonadReader s m => Getting a s a -> m a
+ Universum.Applicative: (*>) :: Applicative f => f a -> f b -> f b
+ Universum.Applicative: (<*) :: Applicative f => f a -> f b -> f a
+ Universum.Applicative: (<**>) :: Applicative f => f a -> f a -> b -> f b
+ Universum.Applicative: (<*>) :: Applicative f => f a -> b -> f a -> f b
+ Universum.Applicative: (<|>) :: Alternative f => f a -> f a -> f a
+ Universum.Applicative: Const :: a -> Const a
+ Universum.Applicative: ZipList :: [a] -> ZipList a
+ Universum.Applicative: [getConst] :: Const a -> a
+ Universum.Applicative: [getZipList] :: ZipList a -> [a]
+ Universum.Applicative: class Applicative f => Alternative (f :: * -> *)
+ Universum.Applicative: class Functor f => Applicative (f :: * -> *)
+ Universum.Applicative: empty :: Alternative f => f a
+ Universum.Applicative: infixl 4 <**>
+ Universum.Applicative: liftA2 :: Applicative f => a -> b -> c -> f a -> f b -> f c
+ Universum.Applicative: liftA3 :: Applicative f => a -> b -> c -> d -> f a -> f b -> f c -> f d
+ Universum.Applicative: many :: Alternative f => f a -> f [a]
+ Universum.Applicative: newtype Const a (b :: k) :: forall k. () => * -> k -> *
+ Universum.Applicative: newtype ZipList a
+ Universum.Applicative: optional :: Alternative f => f a -> f Maybe a
+ Universum.Applicative: pure :: Applicative f => a -> f a
+ Universum.Applicative: some :: Alternative f => f a -> f [a]
+ Universum.Base: (*) :: Num a => a -> a -> a
+ Universum.Base: (**) :: Floating a => a -> a -> a
+ Universum.Base: (+) :: Num a => a -> a -> a
+ Universum.Base: (-) :: Num a => a -> a -> a
+ Universum.Base: (/) :: Fractional a => a -> a -> a
+ Universum.Base: (/=) :: Eq a => a -> a -> Bool
+ Universum.Base: (:%) :: !a -> !a -> Ratio a
+ Universum.Base: (<) :: Ord a => a -> a -> Bool
+ Universum.Base: (<=) :: Ord a => a -> a -> Bool
+ Universum.Base: (==) :: Eq a => a -> a -> Bool
+ Universum.Base: (>) :: Ord a => a -> a -> Bool
+ Universum.Base: (>=) :: Ord a => a -> a -> Bool
+ Universum.Base: (^%^) :: Integral a => Rational -> a -> Rational
+ Universum.Base: (^) :: (Num a, Integral b) => a -> b -> a
+ Universum.Base: (^^%^^) :: Integral a => Rational -> a -> Rational
+ Universum.Base: (^^) :: (Fractional a, Integral b) => a -> b -> a
+ Universum.Base: AppendMode :: IOMode
+ Universum.Base: D# :: Double# -> Double
+ Universum.Base: Down :: a -> Down a
+ Universum.Base: EQ :: Ordering
+ Universum.Base: F# :: Float# -> Float
+ Universum.Base: GT :: Ordering
+ Universum.Base: LT :: Ordering
+ Universum.Base: Proxy :: Proxy
+ Universum.Base: ReadMode :: IOMode
+ Universum.Base: ReadWriteMode :: IOMode
+ Universum.Base: WriteMode :: IOMode
+ Universum.Base: [SomeNat] :: SomeNat
+ Universum.Base: abs :: Num a => a -> a
+ Universum.Base: absurd :: () => Void -> a
+ Universum.Base: acos :: Floating a => a -> a
+ Universum.Base: acosh :: Floating a => a -> a
+ Universum.Base: asTypeOf :: () => a -> a -> a
+ Universum.Base: asin :: Floating a => a -> a
+ Universum.Base: asinh :: Floating a => a -> a
+ Universum.Base: atan :: Floating a => a -> a
+ Universum.Base: atanh :: Floating a => a -> a
+ Universum.Base: boundedEnumFrom :: (Enum a, Bounded a) => a -> [a]
+ Universum.Base: boundedEnumFromThen :: (Enum a, Bounded a) => a -> a -> [a]
+ Universum.Base: byteSwap16 :: Word16 -> Word16
+ Universum.Base: byteSwap32 :: Word32 -> Word32
+ Universum.Base: byteSwap64 :: Word64 -> Word64
+ Universum.Base: callStack :: HasCallStack -> CallStack
+ Universum.Base: ceiling :: (RealFrac a, Integral b) => a -> b
+ Universum.Base: chr :: Int -> Char
+ Universum.Base: class Bounded a
+ Universum.Base: class a ~R# b => Coercible (a :: k0) (b :: k0)
+ Universum.Base: class Enum a
+ Universum.Base: class Eq a
+ Universum.Base: class Fractional a => Floating a
+ Universum.Base: class Foldable (t :: * -> *)
+ Universum.Base: class Num a => Fractional a
+ Universum.Base: class Generic a
+ Universum.Base: class (Real a, Enum a) => Integral a
+ Universum.Base: class IsLabel (x :: Symbol) a
+ Universum.Base: class KnownNat (n :: Nat)
+ Universum.Base: class Num a
+ Universum.Base: class Eq a => Ord a
+ Universum.Base: class (Num a, Ord a) => Real a
+ Universum.Base: class (Real a, Fractional a) => RealFrac a
+ Universum.Base: class Show a
+ Universum.Base: class (Functor t, Foldable t) => Traversable (t :: * -> *)
+ Universum.Base: class Typeable (a :: k)
+ Universum.Base: compare :: Ord a => a -> a -> Ordering
+ Universum.Base: comparing :: Ord a => b -> a -> b -> b -> Ordering
+ Universum.Base: concat :: Foldable t => t [a] -> [a]
+ Universum.Base: concatMap :: Foldable t => a -> [b] -> t a -> [b]
+ Universum.Base: cos :: Floating a => a -> a
+ Universum.Base: cosh :: Floating a => a -> a
+ Universum.Base: currentCallStack :: IO [String]
+ Universum.Base: data Bool
+ Universum.Base: data CallStack
+ Universum.Base: data Char
+ Universum.Base: data Constraint
+ Universum.Base: data Double
+ Universum.Base: data Float
+ Universum.Base: data FunPtr a
+ Universum.Base: data Handle
+ Universum.Base: data IO a
+ Universum.Base: data IOMode
+ Universum.Base: data Int
+ Universum.Base: data Int16
+ Universum.Base: data Int32
+ Universum.Base: data Int64
+ Universum.Base: data Int8
+ Universum.Base: data Integer
+ Universum.Base: data Nat
+ Universum.Base: data Ordering
+ Universum.Base: data Ptr a
+ Universum.Base: data Ratio a
+ Universum.Base: data SomeNat
+ Universum.Base: data Void
+ Universum.Base: data Word
+ Universum.Base: data Word16
+ Universum.Base: data Word32
+ Universum.Base: data Word64
+ Universum.Base: data Word8
+ Universum.Base: data Proxy (t :: k) :: forall k. () => k -> *
+ Universum.Base: denominator :: () => Ratio a -> a
+ Universum.Base: div :: Integral a => a -> a -> a
+ Universum.Base: divMod :: Integral a => a -> a -> (a, a)
+ Universum.Base: divZeroError :: () => a
+ Universum.Base: enumFrom :: Enum a => a -> [a]
+ Universum.Base: enumFromThen :: Enum a => a -> a -> [a]
+ Universum.Base: enumFromThenTo :: Enum a => a -> a -> a -> [a]
+ Universum.Base: enumFromTo :: Enum a => a -> a -> [a]
+ Universum.Base: even :: Integral a => a -> Bool
+ Universum.Base: exp :: Floating a => a -> a
+ Universum.Base: floor :: (RealFrac a, Integral b) => a -> b
+ Universum.Base: fmapDefault :: Traversable t => a -> b -> t a -> t b
+ Universum.Base: foldMapDefault :: (Traversable t, Monoid m) => a -> m -> t a -> m
+ Universum.Base: foldlM :: (Foldable t, Monad m) => b -> a -> m b -> b -> t a -> m b
+ Universum.Base: foldrM :: (Foldable t, Monad m) => a -> b -> m b -> b -> t a -> m b
+ Universum.Base: forM :: (Traversable t, Monad m) => t a -> a -> m b -> m t b
+ Universum.Base: fromEnum :: Enum a => a -> Int
+ Universum.Base: fromInteger :: Num a => Integer -> a
+ Universum.Base: fromIntegral :: (Integral a, Num b) => a -> b
+ Universum.Base: fromLabel :: IsLabel x a => a
+ Universum.Base: fromRational :: Fractional a => Rational -> a
+ Universum.Base: gcd :: Integral a => a -> a -> a
+ Universum.Base: gcdInt' :: Int -> Int -> Int
+ Universum.Base: gcdWord' :: Word -> Word -> Word
+ Universum.Base: getCallStack :: CallStack -> [([Char], SrcLoc)]
+ Universum.Base: getStackTrace :: IO Maybe [Location]
+ Universum.Base: infinity :: Rational
+ Universum.Base: infixl 6 `xor`
+ Universum.Base: infixr 8 ^
+ Universum.Base: integralEnumFrom :: (Integral a, Bounded a) => a -> [a]
+ Universum.Base: integralEnumFromThen :: (Integral a, Bounded a) => a -> a -> [a]
+ Universum.Base: integralEnumFromThenTo :: Integral a => a -> a -> a -> [a]
+ Universum.Base: integralEnumFromTo :: Integral a => a -> a -> [a]
+ Universum.Base: lcm :: Integral a => a -> a -> a
+ Universum.Base: logBase :: Floating a => a -> a -> a
+ Universum.Base: mapAccumL :: Traversable t => a -> b -> (a, c) -> a -> t b -> (a, t c)
+ Universum.Base: mapAccumR :: Traversable t => a -> b -> (a, c) -> a -> t b -> (a, t c)
+ Universum.Base: mapM :: (Traversable t, Monad m) => a -> m b -> t a -> m t b
+ Universum.Base: max :: Ord a => a -> a -> a
+ Universum.Base: maxBound :: Bounded a => a
+ Universum.Base: maxInt :: Int
+ Universum.Base: maximumBy :: Foldable t => a -> a -> Ordering -> t a -> a
+ Universum.Base: min :: Ord a => a -> a -> a
+ Universum.Base: minBound :: Bounded a => a
+ Universum.Base: minInt :: Int
+ Universum.Base: minimumBy :: Foldable t => a -> a -> Ordering -> t a -> a
+ Universum.Base: mod :: Integral a => a -> a -> a
+ Universum.Base: natVal :: KnownNat n => proxy n -> Natural
+ Universum.Base: negate :: Num a => a -> a
+ Universum.Base: newtype Down a
+ Universum.Base: notANumber :: Rational
+ Universum.Base: numerator :: () => Ratio a -> a
+ Universum.Base: numericEnumFrom :: Fractional a => a -> [a]
+ Universum.Base: numericEnumFromThen :: Fractional a => a -> a -> [a]
+ Universum.Base: numericEnumFromThenTo :: (Ord a, Fractional a) => a -> a -> a -> [a]
+ Universum.Base: numericEnumFromTo :: (Ord a, Fractional a) => a -> a -> [a]
+ Universum.Base: odd :: Integral a => a -> Bool
+ Universum.Base: ord :: Char -> Int
+ Universum.Base: overflowError :: () => a
+ Universum.Base: pi :: Floating a => a
+ Universum.Base: pred :: Enum a => a -> a
+ Universum.Base: prettyCallStack :: CallStack -> String
+ Universum.Base: prettySrcLoc :: SrcLoc -> String
+ Universum.Base: properFraction :: (RealFrac a, Integral b) => a -> (b, a)
+ Universum.Base: quot :: Integral a => a -> a -> a
+ Universum.Base: quotRem :: Integral a => a -> a -> (a, a)
+ Universum.Base: ratioPrec :: Int
+ Universum.Base: ratioPrec1 :: Int
+ Universum.Base: ratioZeroDenominatorError :: () => a
+ Universum.Base: realToFrac :: (Real a, Fractional b) => a -> b
+ Universum.Base: recip :: Fractional a => a -> a
+ Universum.Base: reduce :: Integral a => a -> a -> Ratio a
+ Universum.Base: rem :: Integral a => a -> a -> a
+ Universum.Base: round :: (RealFrac a, Integral b) => a -> b
+ Universum.Base: seq :: () => a -> b -> b
+ Universum.Base: sequence :: (Traversable t, Monad m) => t m a -> m t a
+ Universum.Base: sequenceA :: (Traversable t, Applicative f) => t f a -> f t a
+ Universum.Base: showStackTrace :: IO Maybe String
+ Universum.Base: signum :: Num a => a -> a
+ Universum.Base: sin :: Floating a => a -> a
+ Universum.Base: sinh :: Floating a => a -> a
+ Universum.Base: someNatVal :: Natural -> SomeNat
+ Universum.Base: sqrt :: Floating a => a -> a
+ Universum.Base: stderr :: Handle
+ Universum.Base: stdin :: Handle
+ Universum.Base: stdout :: Handle
+ Universum.Base: subtract :: Num a => a -> a -> a
+ Universum.Base: succ :: Enum a => a -> a
+ Universum.Base: tan :: Floating a => a -> a
+ Universum.Base: tanh :: Floating a => a -> a
+ Universum.Base: toEnum :: Enum a => Int -> a
+ Universum.Base: toInteger :: Integral a => a -> Integer
+ Universum.Base: toRational :: Real a => a -> Rational
+ Universum.Base: traverse :: (Traversable t, Applicative f) => a -> f b -> t a -> f t b
+ Universum.Base: truncate :: (RealFrac a, Integral b) => a -> b
+ Universum.Base: type FilePath = String
+ Universum.Base: type HasCallStack = ?callStack :: CallStack
+ Universum.Base: type Rational = Ratio Integer
+ Universum.Base: type String = [Char]
+ Universum.Base: vacuous :: Functor f => f Void -> f a
+ Universum.Base: withFile :: () => FilePath -> IOMode -> Handle -> IO r -> IO r
+ Universum.Base: withFrozenCallStack :: HasCallStack => HasCallStack -> a -> a
+ Universum.Base: xor :: Bits a => a -> a -> a
+ Universum.Bool.Reexport: (&&) :: Bool -> Bool -> Bool
+ Universum.Bool.Reexport: (||) :: Bool -> Bool -> Bool
+ Universum.Bool.Reexport: False :: Bool
+ Universum.Bool.Reexport: True :: Bool
+ Universum.Bool.Reexport: bool :: () => a -> a -> Bool -> a
+ Universum.Bool.Reexport: data Bool
+ Universum.Bool.Reexport: guard :: Alternative f => Bool -> f ()
+ Universum.Bool.Reexport: infixr 2 ||
+ Universum.Bool.Reexport: infixr 3 &&
+ Universum.Bool.Reexport: not :: Bool -> Bool
+ Universum.Bool.Reexport: otherwise :: Bool
+ Universum.Bool.Reexport: unless :: Applicative f => Bool -> f () -> f ()
+ Universum.Bool.Reexport: when :: Applicative f => Bool -> f () -> f ()
+ Universum.Container.Class: instance (GHC.Classes.Eq v, Data.Hashable.Class.Hashable v) => Universum.Container.Class.Container (Data.HashSet.HashSet v)
+ Universum.Container.Class: instance GHC.Classes.Ord v => Universum.Container.Class.Container (Data.Set.Internal.Set v)
+ Universum.Container.Class: instance Universum.Container.Class.Container (Data.Semigroup.Internal.Dual a)
+ Universum.Container.Class: instance Universum.Container.Class.Container (Data.Semigroup.Internal.Product a)
+ Universum.Container.Class: instance Universum.Container.Class.Container (Data.Semigroup.Internal.Sum a)
+ Universum.Container.Class: instance Universum.Container.Class.Container (GHC.Base.NonEmpty a)
+ Universum.Container.Class: instance Universum.Container.Class.One (GHC.Base.NonEmpty a)
+ Universum.Container.Reexport: class Hashable a
+ Universum.Container.Reexport: curry :: () => (a, b) -> c -> a -> b -> c
+ Universum.Container.Reexport: data HashMap k v
+ Universum.Container.Reexport: data HashSet a
+ Universum.Container.Reexport: data IntMap a
+ Universum.Container.Reexport: data IntSet
+ Universum.Container.Reexport: data Map k a
+ Universum.Container.Reexport: data Seq a
+ Universum.Container.Reexport: data Set a
+ Universum.Container.Reexport: data Vector a
+ Universum.Container.Reexport: fst :: () => (a, b) -> a
+ Universum.Container.Reexport: hashWithSalt :: Hashable a => Int -> a -> Int
+ Universum.Container.Reexport: snd :: () => (a, b) -> b
+ Universum.Container.Reexport: swap :: () => (a, b) -> (b, a)
+ Universum.Container.Reexport: uncurry :: () => a -> b -> c -> (a, b) -> c
+ Universum.DeepSeq: ($!!) :: NFData a => a -> b -> a -> b
+ Universum.DeepSeq: class NFData a
+ Universum.DeepSeq: deepseq :: NFData a => a -> b -> b
+ Universum.DeepSeq: force :: NFData a => a -> a
+ Universum.DeepSeq: infixr 0 $!!
+ Universum.DeepSeq: rnf :: NFData a => a -> ()
+ Universum.Exception: [SomeException] :: SomeException
+ Universum.Exception: bracket :: MonadMask m => m a -> a -> m b -> a -> m c -> m c
+ Universum.Exception: bracketOnError :: MonadMask m => m a -> a -> m b -> a -> m c -> m c
+ Universum.Exception: bracket_ :: MonadMask m => m a -> m b -> m c -> m c
+ Universum.Exception: catch :: (MonadCatch m, Exception e) => m a -> e -> m a -> m a
+ Universum.Exception: catchAny :: MonadCatch m => m a -> SomeException -> m a -> m a
+ Universum.Exception: class (Typeable e, Show e) => Exception e
+ Universum.Exception: class MonadThrow m => MonadCatch (m :: * -> *)
+ Universum.Exception: class MonadCatch m => MonadMask (m :: * -> *)
+ Universum.Exception: class Monad m => MonadThrow (m :: * -> *)
+ Universum.Exception: data SomeException
+ Universum.Exception: displayException :: Exception e => e -> String
+ Universum.Exception: finally :: MonadMask m => m a -> m b -> m a
+ Universum.Exception: fromException :: Exception e => SomeException -> Maybe e
+ Universum.Exception: generalBracket :: MonadMask m => m a -> a -> ExitCase b -> m c -> a -> m b -> m (b, c)
+ Universum.Exception: handleAny :: MonadCatch m => SomeException -> m a -> m a -> m a
+ Universum.Exception: mask :: MonadMask m => forall a. () => m a -> m a -> m b -> m b
+ Universum.Exception: mask_ :: MonadMask m => m a -> m a
+ Universum.Exception: onException :: MonadMask m => m a -> m b -> m a
+ Universum.Exception: throwM :: (MonadThrow m, Exception e) => e -> m a
+ Universum.Exception: toException :: Exception e => e -> SomeException
+ Universum.Exception: try :: (MonadCatch m, Exception e) => m a -> m Either e a
+ Universum.Exception: tryAny :: MonadCatch m => m a -> m Either SomeException a
+ Universum.Exception: uninterruptibleMask :: MonadMask m => forall a. () => m a -> m a -> m b -> m b
+ Universum.Function: ($) :: () => a -> b -> a -> b
+ Universum.Function: (.) :: () => b -> c -> a -> b -> a -> c
+ Universum.Function: const :: () => a -> b -> a
+ Universum.Function: fix :: () => a -> a -> a
+ Universum.Function: flip :: () => a -> b -> c -> b -> a -> c
+ Universum.Function: id :: () => a -> a
+ Universum.Function: infixl 0 `on`
+ Universum.Function: infixr 0 $
+ Universum.Function: infixr 9 .
+ Universum.Function: on :: () => b -> b -> c -> a -> b -> a -> a -> c
+ Universum.Functor.Reexport: ($>) :: Functor f => f a -> b -> f b
+ Universum.Functor.Reexport: (&&&) :: Arrow a => a b c -> a b c' -> a b (c, c')
+ Universum.Functor.Reexport: (<$) :: Functor f => a -> f b -> f a
+ Universum.Functor.Reexport: (<$>) :: Functor f => a -> b -> f a -> f b
+ Universum.Functor.Reexport: Compose :: f g a -> Compose
+ Universum.Functor.Reexport: Identity :: a -> Identity a
+ Universum.Functor.Reexport: [getCompose] :: Compose -> f g a
+ Universum.Functor.Reexport: [runIdentity] :: Identity a -> a
+ Universum.Functor.Reexport: bimap :: Bifunctor p => a -> b -> c -> d -> p a c -> p b d
+ Universum.Functor.Reexport: class Bifunctor (p :: * -> * -> *)
+ Universum.Functor.Reexport: class Functor (f :: * -> *)
+ Universum.Functor.Reexport: first :: Bifunctor p => a -> b -> p a c -> p b c
+ Universum.Functor.Reexport: fmap :: Functor f => a -> b -> f a -> f b
+ Universum.Functor.Reexport: infixl 4 <$>
+ Universum.Functor.Reexport: infixr 3 &&&
+ Universum.Functor.Reexport: newtype Identity a
+ Universum.Functor.Reexport: newtype Compose (f :: k -> *) (g :: k1 -> k) (a :: k1) :: forall k k1. () => k -> * -> k1 -> k -> k1 -> *
+ Universum.Functor.Reexport: second :: Bifunctor p => b -> c -> p a b -> p a c
+ Universum.Functor.Reexport: void :: Functor f => f a -> f ()
+ Universum.List.Reexport: (++) :: () => [a] -> [a] -> [a]
+ Universum.List.Reexport: (:|) :: a -> [a] -> NonEmpty a
+ Universum.List.Reexport: break :: () => a -> Bool -> [a] -> ([a], [a])
+ Universum.List.Reexport: cycle :: () => [a] -> [a]
+ Universum.List.Reexport: data NonEmpty a
+ Universum.List.Reexport: drop :: () => Int -> [a] -> [a]
+ Universum.List.Reexport: dropWhile :: () => a -> Bool -> [a] -> [a]
+ Universum.List.Reexport: filter :: () => a -> Bool -> [a] -> [a]
+ Universum.List.Reexport: genericDrop :: Integral i => i -> [a] -> [a]
+ Universum.List.Reexport: genericLength :: Num i => [a] -> i
+ Universum.List.Reexport: genericReplicate :: Integral i => i -> a -> [a]
+ Universum.List.Reexport: genericSplitAt :: Integral i => i -> [a] -> ([a], [a])
+ Universum.List.Reexport: genericTake :: Integral i => i -> [a] -> [a]
+ Universum.List.Reexport: group :: Eq a => [a] -> [[a]]
+ Universum.List.Reexport: head :: () => NonEmpty a -> a
+ Universum.List.Reexport: infixr 5 ++
+ Universum.List.Reexport: init :: () => NonEmpty a -> [a]
+ Universum.List.Reexport: inits :: () => [a] -> [[a]]
+ Universum.List.Reexport: intercalate :: () => [a] -> [[a]] -> [a]
+ Universum.List.Reexport: intersperse :: () => a -> [a] -> [a]
+ Universum.List.Reexport: isPrefixOf :: Eq a => [a] -> [a] -> Bool
+ Universum.List.Reexport: iterate :: () => a -> a -> a -> [a]
+ Universum.List.Reexport: last :: () => NonEmpty a -> a
+ Universum.List.Reexport: nonEmpty :: () => [a] -> Maybe NonEmpty a
+ Universum.List.Reexport: permutations :: () => [a] -> [[a]]
+ Universum.List.Reexport: repeat :: () => a -> [a]
+ Universum.List.Reexport: replicate :: () => Int -> a -> [a]
+ Universum.List.Reexport: reverse :: () => [a] -> [a]
+ Universum.List.Reexport: scanl :: () => b -> a -> b -> b -> [a] -> [b]
+ Universum.List.Reexport: scanr :: () => a -> b -> b -> b -> [a] -> [b]
+ Universum.List.Reexport: sort :: Ord a => [a] -> [a]
+ Universum.List.Reexport: sortBy :: () => a -> a -> Ordering -> [a] -> [a]
+ Universum.List.Reexport: sortOn :: Ord b => a -> b -> [a] -> [a]
+ Universum.List.Reexport: sortWith :: Ord b => a -> b -> [a] -> [a]
+ Universum.List.Reexport: splitAt :: () => Int -> [a] -> ([a], [a])
+ Universum.List.Reexport: subsequences :: () => [a] -> [[a]]
+ Universum.List.Reexport: tail :: () => NonEmpty a -> [a]
+ Universum.List.Reexport: tails :: () => [a] -> [[a]]
+ Universum.List.Reexport: take :: () => Int -> [a] -> [a]
+ Universum.List.Reexport: takeWhile :: () => a -> Bool -> [a] -> [a]
+ Universum.List.Reexport: transpose :: () => [[a]] -> [[a]]
+ Universum.List.Reexport: unfoldr :: () => b -> Maybe (a, b) -> b -> [a]
+ Universum.List.Reexport: unzip :: () => [(a, b)] -> ([a], [b])
+ Universum.List.Reexport: unzip3 :: () => [(a, b, c)] -> ([a], [b], [c])
+ Universum.List.Reexport: zip :: () => [a] -> [b] -> [(a, b)]
+ Universum.List.Reexport: zip3 :: () => [a] -> [b] -> [c] -> [(a, b, c)]
+ Universum.List.Reexport: zipWith :: () => a -> b -> c -> [a] -> [b] -> [c]
+ Universum.Monad.Reexport: ExceptT :: m Either e a -> ExceptT e a
+ Universum.Monad.Reexport: Just :: a -> Maybe a
+ Universum.Monad.Reexport: Left :: a -> Either a b
+ Universum.Monad.Reexport: MaybeT :: m Maybe a -> MaybeT a
+ Universum.Monad.Reexport: Nothing :: Maybe a
+ Universum.Monad.Reexport: ReaderT :: r -> m a -> ReaderT r
+ Universum.Monad.Reexport: Right :: b -> Either a b
+ Universum.Monad.Reexport: StateT :: s -> m (a, s) -> StateT s a
+ Universum.Monad.Reexport: [runMaybeT] :: MaybeT a -> m Maybe a
+ Universum.Monad.Reexport: [runReaderT] :: ReaderT r -> r -> m a
+ Universum.Monad.Reexport: [runStateT] :: StateT s a -> s -> m (a, s)
+ Universum.Monad.Reexport: ask :: MonadReader r m => m r
+ Universum.Monad.Reexport: asks :: MonadReader r m => r -> a -> m a
+ Universum.Monad.Reexport: catMaybes :: () => [Maybe a] -> [a]
+ Universum.Monad.Reexport: class Monad m => MonadIO (m :: * -> *)
+ Universum.Monad.Reexport: class Monad m => MonadReader r (m :: * -> *) | m -> r
+ Universum.Monad.Reexport: class Monad m => MonadState s (m :: * -> *) | m -> s
+ Universum.Monad.Reexport: class MonadTrans (t :: * -> * -> * -> *)
+ Universum.Monad.Reexport: data Either a b
+ Universum.Monad.Reexport: data Maybe a
+ Universum.Monad.Reexport: data IdentityT (f :: k -> *) (a :: k) :: forall k. () => k -> * -> k -> *
+ Universum.Monad.Reexport: either :: () => a -> c -> b -> c -> Either a b -> c
+ Universum.Monad.Reexport: evalState :: () => State s a -> s -> a
+ Universum.Monad.Reexport: evalStateT :: Monad m => StateT s m a -> s -> m a
+ Universum.Monad.Reexport: exceptToMaybeT :: Functor m => ExceptT e m a -> MaybeT m a
+ Universum.Monad.Reexport: execState :: () => State s a -> s -> s
+ Universum.Monad.Reexport: execStateT :: Monad m => StateT s m a -> s -> m s
+ Universum.Monad.Reexport: fromMaybe :: () => a -> Maybe a -> a
+ Universum.Monad.Reexport: get :: MonadState s m => m s
+ Universum.Monad.Reexport: gets :: MonadState s m => s -> a -> m a
+ Universum.Monad.Reexport: isJust :: () => Maybe a -> Bool
+ Universum.Monad.Reexport: isLeft :: () => Either a b -> Bool
+ Universum.Monad.Reexport: isNothing :: () => Maybe a -> Bool
+ Universum.Monad.Reexport: isRight :: () => Either a b -> Bool
+ Universum.Monad.Reexport: lefts :: () => [Either a b] -> [a]
+ Universum.Monad.Reexport: lift :: (MonadTrans t, Monad m) => m a -> t m a
+ Universum.Monad.Reexport: liftIO :: MonadIO m => IO a -> m a
+ Universum.Monad.Reexport: listToMaybe :: () => [a] -> Maybe a
+ Universum.Monad.Reexport: local :: MonadReader r m => r -> r -> m a -> m a
+ Universum.Monad.Reexport: mapMaybe :: () => a -> Maybe b -> [a] -> [b]
+ Universum.Monad.Reexport: maybe :: () => b -> a -> b -> Maybe a -> b
+ Universum.Monad.Reexport: maybeToExceptT :: Functor m => e -> MaybeT m a -> ExceptT e m a
+ Universum.Monad.Reexport: maybeToList :: () => Maybe a -> [a]
+ Universum.Monad.Reexport: modify :: MonadState s m => s -> s -> m ()
+ Universum.Monad.Reexport: modify' :: MonadState s m => s -> s -> m ()
+ Universum.Monad.Reexport: newtype ReaderT r (m :: k -> *) (a :: k) :: forall k. () => * -> k -> * -> k -> *
+ Universum.Monad.Reexport: newtype ExceptT e (m :: * -> *) a
+ Universum.Monad.Reexport: newtype MaybeT (m :: * -> *) a
+ Universum.Monad.Reexport: newtype StateT s (m :: * -> *) a
+ Universum.Monad.Reexport: partitionEithers :: () => [Either a b] -> ([a], [b])
+ Universum.Monad.Reexport: put :: MonadState s m => s -> m ()
+ Universum.Monad.Reexport: reader :: MonadReader r m => r -> a -> m a
+ Universum.Monad.Reexport: rights :: () => [Either a b] -> [b]
+ Universum.Monad.Reexport: runExceptT :: () => ExceptT e m a -> m Either e a
+ Universum.Monad.Reexport: runReader :: () => Reader r a -> r -> a
+ Universum.Monad.Reexport: runState :: () => State s a -> s -> (a, s)
+ Universum.Monad.Reexport: state :: MonadState s m => s -> (a, s) -> m a
+ Universum.Monad.Reexport: type Reader r = ReaderT r Identity
+ Universum.Monad.Reexport: type State s = StateT s Identity
+ Universum.Monad.Reexport: withState :: () => s -> s -> State s a -> State s a
+ Universum.Monoid: (<>) :: Semigroup a => a -> a -> a
+ Universum.Monoid: All :: Bool -> All
+ Universum.Monoid: Alt :: f a -> Alt
+ Universum.Monoid: Any :: Bool -> Any
+ Universum.Monoid: Dual :: a -> Dual a
+ Universum.Monoid: Endo :: a -> a -> Endo a
+ Universum.Monoid: First :: Maybe a -> First a
+ Universum.Monoid: Last :: Maybe a -> Last a
+ Universum.Monoid: Option :: Maybe a -> Option a
+ Universum.Monoid: Product :: a -> Product a
+ Universum.Monoid: Sum :: a -> Sum a
+ Universum.Monoid: [appEndo] :: Endo a -> a -> a
+ Universum.Monoid: [getAll] :: All -> Bool
+ Universum.Monoid: [getAlt] :: Alt -> f a
+ Universum.Monoid: [getAny] :: Any -> Bool
+ Universum.Monoid: [getDual] :: Dual a -> a
+ Universum.Monoid: [getFirst] :: First a -> Maybe a
+ Universum.Monoid: [getLast] :: Last a -> Maybe a
+ Universum.Monoid: [getOption] :: Option a -> Maybe a
+ Universum.Monoid: [getProduct] :: Product a -> a
+ Universum.Monoid: [getSum] :: Sum a -> a
+ Universum.Monoid: class Semigroup a => Monoid a
+ Universum.Monoid: class Semigroup a
+ Universum.Monoid: cycle1 :: Semigroup m => m -> m
+ Universum.Monoid: data WrappedMonoid m
+ Universum.Monoid: mappend :: Monoid a => a -> a -> a
+ Universum.Monoid: mconcat :: Monoid a => [a] -> a
+ Universum.Monoid: mempty :: Monoid a => a
+ Universum.Monoid: mtimesDefault :: (Integral b, Monoid a) => b -> a -> a
+ Universum.Monoid: newtype All
+ Universum.Monoid: newtype Any
+ Universum.Monoid: newtype Dual a
+ Universum.Monoid: newtype Endo a
+ Universum.Monoid: newtype First a
+ Universum.Monoid: newtype Last a
+ Universum.Monoid: newtype Option a
+ Universum.Monoid: newtype Product a
+ Universum.Monoid: newtype Sum a
+ Universum.Monoid: newtype Alt (f :: k -> *) (a :: k) :: forall k. () => k -> * -> k -> *
+ Universum.Monoid: sconcat :: Semigroup a => NonEmpty a -> a
+ Universum.Monoid: stimes :: (Semigroup a, Integral b) => b -> a -> a
+ Universum.Monoid: stimesIdempotent :: Integral b => b -> a -> a
+ Universum.Monoid: stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a
+ Universum.Monoid: stimesMonoid :: (Integral b, Monoid a) => b -> a -> a
+ Universum.String.Reexport: class IsString a
+ Universum.String.Reexport: class Read a
+ Universum.String.Reexport: data ByteString
+ Universum.String.Reexport: data Text
+ Universum.String.Reexport: data UnicodeException
+ Universum.String.Reexport: decodeUtf8' :: ByteString -> Either UnicodeException Text
+ Universum.String.Reexport: decodeUtf8With :: OnDecodeError -> ByteString -> Text
+ Universum.String.Reexport: fromStrict :: Text -> Text
+ Universum.String.Reexport: fromString :: IsString a => String -> a
+ Universum.String.Reexport: lenientDecode :: OnDecodeError
+ Universum.String.Reexport: lines :: Text -> [Text]
+ Universum.String.Reexport: readMaybe :: Read a => String -> Maybe a
+ Universum.String.Reexport: reads :: Read a => ReadS a
+ Universum.String.Reexport: strictDecode :: OnDecodeError
+ Universum.String.Reexport: toStrict :: Text -> Text
+ Universum.String.Reexport: type OnDecodeError = OnError Word8 Char
+ Universum.String.Reexport: type OnError a b = String -> Maybe a -> Maybe b
+ Universum.String.Reexport: unlines :: [Text] -> Text
+ Universum.String.Reexport: unwords :: [Text] -> Text
+ Universum.String.Reexport: words :: Text -> [Text]
+ Universum.TypeOps: type f $ a = f a
- Universum.Base: data Natural :: *
+ Universum.Base: data Natural
- Universum.Container.Class: elem :: (Container t, Foldable f, t ~ f a, Element t ~ a, ElementConstraint t ~ Eq, ElementConstraint t (Element t)) => Element t -> t -> Bool
+ Universum.Container.Class: elem :: (Container t, Foldable f, t ~ f a, Element t ~ a, Eq a) => Element t -> t -> Bool
- Universum.Container.Class: notElem :: (Container t, ElementConstraint t (Element t)) => Element t -> t -> Bool
+ Universum.Container.Class: notElem :: (Container t, Eq (Element t)) => Element t -> t -> Bool
- Universum.Lifted.Concurrent: data MVar a :: * -> *
+ Universum.Lifted.Concurrent: data MVar a
- Universum.Lifted.Concurrent: data STM a :: * -> *
+ Universum.Lifted.Concurrent: data STM a
- Universum.Lifted.Concurrent: data TVar a :: * -> *
+ Universum.Lifted.Concurrent: data TVar a
- Universum.Lifted.Concurrent: modifyTVar' :: () => TVar a -> (a -> a) -> STM ()
+ Universum.Lifted.Concurrent: modifyTVar' :: () => TVar a -> a -> a -> STM ()
- Universum.Lifted.IORef: data IORef a :: * -> *
+ Universum.Lifted.IORef: data IORef a
- Universum.Monad.Reexport: (<$!>) :: Monad m => (a -> b) -> m a -> m b
+ Universum.Monad.Reexport: (<$!>) :: Monad m => a -> b -> m a -> m b
- Universum.Monad.Reexport: (<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
+ Universum.Monad.Reexport: (<=<) :: Monad m => b -> m c -> a -> m b -> a -> m c
- Universum.Monad.Reexport: (=<<) :: Monad m => (a -> m b) -> m a -> m b
+ Universum.Monad.Reexport: (=<<) :: Monad m => a -> m b -> m a -> m b
- Universum.Monad.Reexport: (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
+ Universum.Monad.Reexport: (>=>) :: Monad m => a -> m b -> b -> m c -> a -> m c
- Universum.Monad.Reexport: (>>=) :: Monad m => m a -> (a -> m b) -> m b
+ Universum.Monad.Reexport: (>>=) :: Monad m => m a -> a -> m b -> m b
- Universum.Monad.Reexport: ap :: Monad m => m (a -> b) -> m a -> m b
+ Universum.Monad.Reexport: ap :: Monad m => m a -> b -> m a -> m b
- Universum.Monad.Reexport: filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
+ Universum.Monad.Reexport: filterM :: Applicative m => a -> m Bool -> [a] -> m [a]
- Universum.Monad.Reexport: foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
+ Universum.Monad.Reexport: foldM :: (Foldable t, Monad m) => b -> a -> m b -> b -> t a -> m b
- Universum.Monad.Reexport: foldM_ :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m ()
+ Universum.Monad.Reexport: foldM_ :: (Foldable t, Monad m) => b -> a -> m b -> b -> t a -> m ()
- Universum.Monad.Reexport: liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
+ Universum.Monad.Reexport: liftM2 :: Monad m => a1 -> a2 -> r -> m a1 -> m a2 -> m r
- Universum.Monad.Reexport: liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r
+ Universum.Monad.Reexport: liftM3 :: Monad m => a1 -> a2 -> a3 -> r -> m a1 -> m a2 -> m a3 -> m r
- Universum.Monad.Reexport: liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r
+ Universum.Monad.Reexport: liftM4 :: Monad m => a1 -> a2 -> a3 -> a4 -> r -> m a1 -> m a2 -> m a3 -> m a4 -> m r
- Universum.Monad.Reexport: liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r
+ Universum.Monad.Reexport: liftM5 :: Monad m => a1 -> a2 -> a3 -> a4 -> a5 -> r -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r
- Universum.Monad.Reexport: mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])
+ Universum.Monad.Reexport: mapAndUnzipM :: Applicative m => a -> m (b, c) -> [a] -> m ([b], [c])
- Universum.Monad.Reexport: mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
+ Universum.Monad.Reexport: mfilter :: MonadPlus m => a -> Bool -> m a -> m a
- Universum.Monad.Reexport: zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c]
+ Universum.Monad.Reexport: zipWithM :: Applicative m => a -> b -> m c -> [a] -> [b] -> m [c]
- Universum.Monad.Reexport: zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m ()
+ Universum.Monad.Reexport: zipWithM_ :: Applicative m => a -> b -> m c -> [a] -> [b] -> m ()

Files

CHANGES.md view
@@ -1,9 +1,46 @@+1.3.0+=====++* [#167](https://github.com/serokell/universum/issues/164):+  `identity` has been deprecated.++  _Migration guide:_ use `Universum.id` instead.+* [#170](https://github.com/serokell/universum/pull/170):+  Remove `ElementConstraint` from the `Container` class.+  +  _Migration guide:_ remove `ElementConstraint` from every instance and every type signature.+* [#174](https://github.com/serokell/universum/issues/174)+  The `type-operators` dependency has been removed.+* [#177](https://github.com/serokell/universum/issues/177):+  The `mask_` reexport from `safe-exceptions` has been deprecated.++  _Migration_guide:_ use `Control.Exception.Safe.mask_` from `safe-exceptions`+  instead.+* [#178](https://github.com/serokell/universum/issues/178):+  `getArgs` has been deprecated. To be removed in a future version.++  _Migration guide:_ use `liftIO` directly with `System.Environment.getArgs`+  from `base`.+* [#179](https://github.com/serokell/universum/issues/179):+  `getContents` and `interact` have been deprecated.++  _Migration guide:_ use `liftIO` directly with `Data.Text.Lazy.IO.getContents`+  and `Data.Text.Lazy.IO.interact`, both from the `text` package.+* [#180](https://github.com/serokell/universum/issues/180):+  The `Lifted.ST` module has been deprecated. To be removed in a future+  version.+  +  _Migration guide:_ use `liftIO` directly with functions from+  `Control.Monad.ST` instead.+* [#181](https://github.com/serokell/universum/issues/181):+  `list` has been deprecated. To be removed in a future version.+ 1.2.0 =====  * [#159](https://github.com/serokell/universum/issues/159) **Breaking change**:   Remove `text-format` dependency.-  +   _Migration guide:_ import `Buildable` type class either from `text-format` or `formatting` or `fmt` library. Instead of `pretty` you can use [`fmt`](https://hackage.haskell.org/package/fmt-0.6/docs/Fmt.html#v:fmt) function. * [#164](https://github.com/serokell/universum/issues/164):   Don't reexport `log :: Floating a => a -> a`.
README.md view
@@ -346,8 +346,14 @@ Projects that use Universum [↑](#structure-of-this-tutorial) --------------------------- -- [cardano-report-server](https://github.com/input-output-hk/cardano-report-server)-- [cardano-sl](https://github.com/input-output-hk/cardano-sl)-- [importify](https://github.com/serokell/importify)-- [log-warper](https://github.com/serokell/log-warper)-- [orgstat](https://github.com/volhovm/orgstat)+Please submit a PR if you are using Universum!++| λ |+|---|+| [cardano-report-server](https://github.com/input-output-hk/cardano-report-server) |+| [cardano-sl](https://github.com/input-output-hk/cardano-sl) |+| [importify](https://github.com/serokell/importify) |+| [log-warper](https://github.com/serokell/log-warper) |+| [orgstat](https://github.com/volhovm/orgstat) |+| [tintin](https://github.com/theam/tintin) |+| [require](https://theam.github.io/require/) |
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
src/Universum/Container/Class.hs view
@@ -46,7 +46,7 @@                 product, sequence_, sum)  import Universum.Applicative (Alternative (..), Const, ZipList, pass)-import Universum.Base (Constraint, Word8)+import Universum.Base (Word8) import Universum.Container.Reexport (HashMap, HashSet, Hashable, IntMap, IntSet, Map, Seq, Set,                                      Vector) import Universum.Functor (Identity)@@ -198,11 +198,6 @@     type Element t :: *     type Element t = ElementDefault t -    -- | Constraint for elements. This can be used to implement more efficient-    -- implementation of some methods. For example 'elem' for 'Set' and 'HashSet'.-    type ElementConstraint t :: * -> Constraint-    type ElementConstraint t = Eq-     -- | Convert container to list of elements.     --     -- >>> toList @Text "aba"@@ -245,12 +240,11 @@     length = Foldable.length     {-# INLINE length #-} -    elem :: ElementConstraint t (Element t) => Element t -> t -> Bool+    elem :: Eq (Element t) => Element t -> t -> Bool     default elem :: ( Foldable f                     , t ~ f a                     , Element t ~ a-                    , ElementConstraint t ~ Eq-                    , ElementConstraint t (Element t)+                    , Eq a                     ) => Element t -> t -> Bool     elem = Foldable.elem     {-# INLINE elem #-}@@ -308,7 +302,7 @@                            Just x  -> f x y)     {-# INLINE foldl1 #-} -    notElem :: ElementConstraint t (Element t) => Element t -> t -> Bool+    notElem :: Eq (Element t) => Element t -> t -> Bool     notElem x = not . elem x     {-# INLINE notElem #-} @@ -502,18 +496,13 @@ -- Efficient instances ---------------------------------------------------------------------------- -instance Container (Set v) where-    type ElementConstraint (Set v) = Ord+instance Ord v => Container (Set v) where     elem = Set.member     {-# INLINE elem #-}     notElem = Set.notMember     {-# INLINE notElem #-} -class (Eq a, Hashable a) => CanHash a-instance (Eq a, Hashable a) => CanHash a--instance Container (HashSet v) where-    type ElementConstraint (HashSet v) = CanHash+instance (Eq v, Hashable v) => Container (HashSet v) where     elem = HashSet.member     {-# INLINE elem #-} 
src/Universum/Exception.hs view
@@ -15,14 +15,15 @@        , pattern Exc #endif        , note+       , mask_        ) where  -- exceptions from safe-exceptions import Control.Exception.Safe (Exception (..), MonadCatch, MonadMask (..), MonadThrow,                                SomeException (..), bracket, bracketOnError, bracket_, catch,-                               catchAny, displayException, finally, handleAny, mask_, onException,+                               catchAny, displayException, finally, handleAny, onException,                                throwM, try, tryAny)-+import qualified Control.Exception.Safe as Safe (mask_) import Control.Monad.Except (MonadError, throwError) import Universum.Applicative (Applicative (pure)) import Universum.Monad (Maybe (..), maybe)@@ -48,6 +49,10 @@ bug :: (HasCallStack, Exception e) => e -> a bug e = Safe.impureThrow (Bug (Safe.toException e) callStack) #endif++mask_ :: MonadMask m => m a -> m a+mask_ = Safe.mask_+{-# DEPRECATED mask_ "This function will be removed in a future version of this package, use `Control.Exception.Safe.mask_` from `safe-exceptions` instead." #-}  -- To suppress redundant applicative constraint warning on GHC 8.0 -- | Throws error for 'Maybe' if 'Data.Maybe.Nothing' is given.
src/Universum/Function.hs view
@@ -11,3 +11,4 @@ identity :: a -> a identity = id {-# INLINE identity #-}+{-# DEPRECATED identity "Use `id` instead" #-}
src/Universum/Lifted/Env.hs view
@@ -24,6 +24,7 @@ getArgs :: MonadIO m => m [String] getArgs = liftIO (XIO.getArgs) {-# INLINE getArgs #-}+{-# DEPRECATED getArgs "This function will be removed in a future version of this package, use `liftIO` directly with `System.Environment.getArgs` from `base`." #-}  -- | Lifted version of 'System.Exit.exitWith'. exitWith :: MonadIO m => ExitCode -> m a
src/Universum/Lifted/File.hs view
@@ -37,6 +37,7 @@ getContents :: MonadIO m => m L.Text getContents = liftIO LIO.getContents {-# INLINE getContents #-}+{-# DEPRECATED getContents "This function will be removed in a future version of this package, use `liftIO` with `Data.Text.Lazy.IO.getContents` from `text` instead." #-}  -- | Lifted version of 'Data.Text.getLine'. getLine :: MonadIO m => m Text@@ -47,6 +48,7 @@ interact :: MonadIO m => (L.Text -> L.Text) -> m () interact a = liftIO (LIO.interact a) {-# INLINE interact #-}+{-# DEPRECATED interact "This function will be removed in a future version of this package, use `liftIO` with `Data.Text.Lazy.IO.interact` from `text` instead." #-}  -- | Lifted version of 'Data.Text.readFile'. readFile :: MonadIO m => FilePath -> m Text
src/Universum/Lifted/ST.hs view
@@ -1,6 +1,6 @@ -- | This module contains lifted version of 'XIO.stToIO' function. -module Universum.Lifted.ST+module Universum.Lifted.ST {-# DEPRECATED "This module will be removed in a future version of this package, use `liftIO` directly with functions from `Control.Monad.ST` instead." #-}        ( stToIO        ) where 
src/Universum/List/Safe.hs view
@@ -1,5 +1,5 @@-{-# LANGUAGE CPP         #-}-{-# LANGUAGE Trustworthy #-}+{-# LANGUAGE CPP  #-}+{-# LANGUAGE Safe #-}  -- | This module contains safe functions to work with list type (mostly with 'NonEmpty'). @@ -40,6 +40,7 @@ list def f xs = case xs of     [] -> def     _  -> fmap f xs+{-# DEPRECATED list "This function will be removed in a future version of this package, do not use it." #-}  -- | Destructuring list into its head and tail if possible. This function is total. --
src/Universum/Nub.hs view
@@ -1,7 +1,7 @@ {-| Functions to remove duplicates from a list.   = Performance- To check the performance there was done a bunch of benchmarks.+ To check the performance many benchmarks were done.  Benchmarks were made on lists of 'Prelude.Int's and 'Data.Text.Text's.  There were two types of list to use: @@ -32,7 +32,6 @@ import Data.Hashable (Hashable) import Data.HashSet as HashSet import Data.Ord (Ord)-import Data.Set (Set) import Prelude (Bool, Char, (.))  import qualified Data.Set as Set@@ -42,7 +41,7 @@  {-@ predicate NoDups L = Set_emp (dups L) @-} -{-@ measure dups :: [a] -> (Set a)+{-@ measure dups :: [a] -> (Set.Set a)     dups ([])   = {v | Set_emp v}     dups (x:xs) = {v | v =       if (Set_mem x (listElts xs))@@ -50,7 +49,7 @@       else (dups xs)} @-} -{-@ Set.toList :: Set a -> ListUnique a @-}+{-@ Set.toList :: Set.Set a -> ListUnique a @-}  -- | Like 'Prelude.nub' but runs in @O(n * log n)@ time and requires 'Ord'. --
src/Universum/TypeOps.hs view
@@ -28,7 +28,27 @@ import Data.Kind (Constraint) #endif -import Control.Type.Operator (type ($), type (<+>))+-- | Infix application.+--+-- @+-- f :: Either String $ Maybe Int+-- =+-- f :: Either String (Maybe Int)+-- @+type f $ a = f a+infixr 2 $++-- | Map several constraints over a single variable.+--+-- @+-- a :: [Show, Read] \<+> a => a -> a+-- =+-- a :: (Show a, Read a) => a -> a+-- @+type family (<+>) (c :: [k -> Constraint]) (a :: k) where+    (<+>) '[] a = (() :: Constraint)+    (<+>) (ch ': ct) a = (ch a, (<+>) ct a)+infixl 9 <+>  -- | Map several constraints over several variables. --
universum.cabal view
@@ -1,5 +1,5 @@ name:                universum-version:             1.2.0+version:             1.3.0 synopsis:            Custom prelude used in Serokell description:         See README.md file for more details. homepage:            https://github.com/serokell/universum@@ -11,7 +11,7 @@ category:            Prelude stability:           stable build-type:          Simple-cabal-version:       2.0+cabal-version:       >=1.18 bug-reports:         https://github.com/serokell/universum/issues tested-with:         GHC == 7.10.3                    , GHC == 8.0.2@@ -84,7 +84,6 @@                      , stm                      , text                      , transformers-                     , type-operators                      , unordered-containers                      , utf8-string                      , vector