| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Polysemy.Test.Prelude
Synopsis
- type (++) a b = Append a b
- dbg :: Monad m => Text -> m ()
- dbgs :: Monad m => Show a => a -> m ()
- dbgs_ :: Monad m => Show a => a -> m a
- unit :: Applicative f => f ()
- tuple :: Applicative f => f a -> f b -> f (a, b)
- unsafeLogSAnd :: Show a => a -> b -> b
- unsafeLogAnd :: Text -> b -> b
- unsafeLogS :: Show a => a -> a
- liftT :: forall m f r e a. Functor f => Sem r a -> Sem (WithTactics e f m r) (f a)
- hoistEither :: Member (Error e2) r => (e1 -> e2) -> Either e1 a -> Sem r a
- hoistEitherWith :: (e -> Sem r a) -> Either e a -> Sem r a
- hoistEitherShow :: Show e1 => Member (Error e2) r => (Text -> e2) -> Either e1 a -> Sem r a
- hoistErrorWith :: (e -> Sem r a) -> Sem (Error e ': r) a -> Sem r a
- tryAny :: Member (Embed IO) r => IO a -> Sem r (Either Text a)
- tryHoist :: Member (Embed IO) r => (Text -> e) -> IO a -> Sem r (Either e a)
- tryThrow :: Members [Embed IO, Error e] r => (Text -> e) -> IO a -> Sem r a
- throwTextIO :: Text -> IO a
- throwEitherIO :: Either Text a -> IO a
- rightOr :: (a -> b) -> Either a b -> b
- traverseLeft :: Applicative m => (a -> m b) -> Either a b -> m b
- as :: Functor m => a -> m b -> m a
- mneToList :: Maybe (NonEmpty a) -> [a]
- mapLeft :: (a -> c) -> Either a b -> Either c b
- foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b
- traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
- lookup :: Ord k => k -> Map k a -> Maybe a
- data Map k a
- i :: QuasiQuoter
- trace :: String -> a -> a
- traceShow :: Show a => a -> b -> b
- undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
- type Member (e :: k) (r :: [k]) = MemberNoError e r
- type EffectRow = [Effect]
- type Effect = (Type -> Type) -> Type -> Type
- data Sem (r :: EffectRow) a
- embed :: forall m (r :: [(Type -> Type) -> Type -> Type]) a. Member (Embed m) r => m a -> Sem r a
- raise :: forall (e :: Effect) (r :: EffectRow) a. Sem r a -> Sem (e ': r) a
- raiseUnder :: forall (e2 :: Effect) (e1 :: Effect) (r :: [Effect]) a. Sem (e1 ': r) a -> Sem (e1 ': (e2 ': r)) a
- raiseUnder2 :: forall (e2 :: Effect) (e3 :: Effect) (e1 :: Effect) (r :: [Effect]) a. Sem (e1 ': r) a -> Sem (e1 ': (e2 ': (e3 ': r))) a
- raiseUnder3 :: forall (e2 :: Effect) (e3 :: Effect) (e4 :: Effect) (e1 :: Effect) (r :: [Effect]) a. Sem (e1 ': r) a -> Sem (e1 ': (e2 ': (e3 ': (e4 ': r)))) a
- data Embed (m :: Type -> Type) (z :: Type -> Type) a
- type InterpreterFor (e :: Effect) (r :: [Effect]) = forall a. Sem (e ': r) a -> Sem r a
- type family Members (es :: [k]) (r :: [k]) where ...
- embedToFinal :: forall (m :: Type -> Type) (r :: [(Type -> Type) -> Type -> Type]) a. (Member (Final m) r, Functor m) => Sem (Embed m ': r) a -> Sem r a
- runFinal :: Monad m => Sem '[Final m] a -> m a
- interpret :: forall e (r :: [Effect]) a. FirstOrder e "interpret" => (forall x (rInitial :: EffectRow). e (Sem rInitial) x -> Sem r x) -> Sem (e ': r) a -> Sem r a
- reinterpret :: forall e1 (e2 :: Effect) (r :: [Effect]) a. FirstOrder e1 "reinterpret" => (forall (rInitial :: EffectRow) x. e1 (Sem rInitial) x -> Sem (e2 ': r) x) -> Sem (e1 ': r) a -> Sem (e2 ': r) a
- makeSem :: Name -> Q [Dec]
- pureT :: forall a (e :: Effect) (m :: Type -> Type) (r :: [Effect]). a -> Tactical e m r a
- data Final (m :: Type -> Type) (z :: Type -> Type) a
- type WithTactics (e :: Effect) (f :: Type -> Type) (m :: Type -> Type) (r :: [Effect]) = (Tactics f m (e ': r) :: (Type -> Type) -> Type -> Type) ': r
- atomicGet :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => Sem r s
- atomicGets :: forall s s' (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> s') -> Sem r s'
- atomicModify' :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r ()
- atomicPut :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => s -> Sem r ()
- runAtomicStateTVar :: forall (r :: [(Type -> Type) -> Type -> Type]) s a. Member (Embed IO) r => TVar s -> Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a
- data AtomicState s (m :: k) a
- fromEither :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => Either e a -> Sem r a
- mapError :: forall e1 e2 (r :: [(Type -> Type) -> Type -> Type]) a. Member (Error e2 :: (Type -> Type) -> Type -> Type) r => (e1 -> e2) -> Sem ((Error e1 :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a
- note :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => e -> Maybe a -> Sem r a
- runError :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. Sem ((Error e :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r (Either e a)
- throw :: forall e (r :: [Effect]) a. MemberWithError (Error e :: (Type -> Type) -> Type -> Type) r => e -> Sem r a
- data Error e (m :: k -> Type) (a :: k)
- type family Append (l :: [a]) (r :: [a]) :: [a] where ...
- data Reader i (m :: Type -> Type) a
- data State s (m :: k) a
- evalState :: forall s (r :: [(Type -> Type) -> Type -> Type]) a. s -> Sem ((State s :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a
- get :: forall s (r :: [Effect]). MemberWithError (State s :: (Type -> Type) -> Type -> Type) r => Sem r s
- gets :: forall s a (r :: [(Type -> Type) -> Type -> Type]). Member (State s :: (Type -> Type) -> Type -> Type) r => (s -> a) -> Sem r a
- modify :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (State s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r ()
- modify' :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (State s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r ()
- put :: forall s (r :: [Effect]). MemberWithError (State s :: (Type -> Type) -> Type -> Type) r => s -> Sem r ()
- runState :: forall s (r :: [(Type -> Type) -> Type -> Type]) a. s -> Sem ((State s :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r (s, a)
- (++) :: [a] -> [a] -> [a]
- seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b
- filter :: (a -> Bool) -> [a] -> [a]
- zip :: [a] -> [b] -> [(a, b)]
- fst :: (a, b) -> a
- snd :: (a, b) -> b
- otherwise :: Bool
- map :: (a -> b) -> [a] -> [b]
- ($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- coerce :: forall (k :: RuntimeRep) (a :: TYPE k) (b :: TYPE k). Coercible a b => a -> b
- fromIntegral :: (Integral a, Num b) => a -> b
- realToFrac :: (Real a, Fractional b) => a -> b
- guard :: Alternative f => Bool -> f ()
- class IsList l where
- join :: Monad m => m (m a) -> m a
- class Bounded a where
- class Enum a where
- succ :: a -> a
- pred :: a -> a
- toEnum :: Int -> a
- fromEnum :: a -> Int
- enumFrom :: a -> [a]
- enumFromThen :: a -> a -> [a]
- enumFromTo :: a -> a -> [a]
- enumFromThenTo :: a -> a -> a -> [a]
- class Eq a where
- class Fractional a => Floating a where
- class Num a => Fractional a where
- (/) :: a -> a -> a
- recip :: a -> a
- fromRational :: Rational -> a
- class (Real a, Enum a) => Integral a where
- class Applicative m => Monad (m :: Type -> Type) where
- class Functor (f :: Type -> Type) where
- class Num a where
- class Eq a => Ord a where
- class Read a
- class (Num a, Ord a) => Real a where
- toRational :: a -> Rational
- class (RealFrac a, Floating a) => RealFloat a where
- floatRadix :: a -> Integer
- floatDigits :: a -> Int
- floatRange :: a -> (Int, Int)
- decodeFloat :: a -> (Integer, Int)
- encodeFloat :: Integer -> Int -> a
- isNaN :: a -> Bool
- isInfinite :: a -> Bool
- isDenormalized :: a -> Bool
- isNegativeZero :: a -> Bool
- isIEEE :: a -> Bool
- atan2 :: a -> a -> a
- class (Real a, Fractional a) => RealFrac a where
- class Show a
- class Typeable (a :: k)
- class Monad m => MonadFail (m :: Type -> Type) where
- class IsString a where
- fromString :: String -> a
- class Functor f => Applicative (f :: Type -> Type) where
- class Foldable (t :: Type -> Type) where
- class (Functor t, Foldable t) => Traversable (t :: Type -> Type) where
- traverse :: Applicative f => (a -> f b) -> t a -> f (t b)
- sequenceA :: Applicative f => t (f a) -> f (t a)
- mapM :: Monad m => (a -> m b) -> t a -> m (t b)
- sequence :: Monad m => t (m a) -> m (t a)
- class Generic a
- class KnownNat (n :: Nat)
- class IsLabel (x :: Symbol) a where
- fromLabel :: a
- class Semigroup a where
- class Semigroup a => Monoid a where
- data Bool
- data Char
- data Double = D# Double#
- data Float = F# Float#
- data Int
- data Int8
- data Int16
- data Int32
- data Int64
- data Integer
- data Natural
- data Maybe a
- data Ordering
- data Ratio a
- type Rational = Ratio Integer
- data IO a
- data Word
- data Word8
- data Word16
- data Word32
- data Word64
- data Either a b
- data Constraint
- data Nat
- type family CmpNat (a :: Nat) (b :: Nat) :: Ordering where ...
- class a ~R# b => Coercible (a :: k) (b :: k)
- data CallStack
- data Handle
- comparisonEquivalence :: Comparison a -> Equivalence a
- defaultEquivalence :: Eq a => Equivalence a
- defaultComparison :: Ord a => Comparison a
- (>$$<) :: Contravariant f => f b -> (a -> b) -> f a
- (>$<) :: Contravariant f => (a -> b) -> f b -> f a
- ($<) :: Contravariant f => f b -> b -> f a
- phantom :: (Functor f, Contravariant f) => f a -> f b
- class Contravariant (f :: Type -> Type) where
- newtype Predicate a = Predicate {
- getPredicate :: a -> Bool
- newtype Comparison a = Comparison {
- getComparison :: a -> a -> Ordering
- newtype Equivalence a = Equivalence {
- getEquivalence :: a -> a -> Bool
- newtype Op a b = Op {
- getOp :: b -> a
- newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1) = Compose {
- getCompose :: f (g a)
- vacuous :: Functor f => f Void -> f a
- absurd :: Void -> a
- data Void
- mtimesDefault :: (Integral b, Monoid a) => b -> a -> a
- cycle1 :: Semigroup m => m -> m
- data WrappedMonoid m
- newtype Option a = Option {}
- sortWith :: Ord b => (a -> b) -> [a] -> [a]
- bifoldMapDefault :: (Bitraversable t, Monoid m) => (a -> m) -> (b -> m) -> t a b -> m
- bimapDefault :: Bitraversable t => (a -> b) -> (c -> d) -> t a c -> t b d
- bifor :: (Bitraversable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f (t c d)
- bisequence :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b)
- class (Bifunctor t, Bifoldable t) => Bitraversable (t :: Type -> Type -> Type) where
- bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> t a b -> f (t c d)
- bifind :: Bifoldable t => (a -> Bool) -> t a a -> Maybe a
- biall :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool
- biany :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool
- bior :: Bifoldable t => t Bool Bool -> Bool
- biand :: Bifoldable t => t Bool Bool -> Bool
- bielem :: (Bifoldable t, Eq a) => a -> t a a -> Bool
- bilength :: Bifoldable t => t a b -> Int
- binull :: Bifoldable t => t a b -> Bool
- biList :: Bifoldable t => t a a -> [a]
- biasum :: (Bifoldable t, Alternative f) => t (f a) (f a) -> f a
- bisequence_ :: (Bifoldable t, Applicative f) => t (f a) (f b) -> f ()
- bifor_ :: (Bifoldable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f ()
- bitraverse_ :: (Bifoldable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f ()
- bifoldlM :: (Bifoldable t, Monad m) => (a -> b -> m a) -> (a -> c -> m a) -> a -> t b c -> m a
- bifoldl' :: Bifoldable t => (a -> b -> a) -> (a -> c -> a) -> a -> t b c -> a
- bifoldrM :: (Bifoldable t, Monad m) => (a -> c -> m c) -> (b -> c -> m c) -> c -> t a b -> m c
- bifoldr' :: Bifoldable t => (a -> c -> c) -> (b -> c -> c) -> c -> t a b -> c
- class Bifoldable (p :: Type -> Type -> Type) where
- class Bifunctor (p :: Type -> Type -> Type) where
- nonEmpty :: [a] -> Maybe (NonEmpty a)
- showStackTrace :: IO (Maybe String)
- getStackTrace :: IO (Maybe [Location])
- class Monad m => MonadIO (m :: Type -> Type) where
- mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
- (<$!>) :: Monad m => (a -> b) -> m a -> m b
- unless :: Applicative f => Bool -> f () -> f ()
- replicateM_ :: Applicative m => Int -> m a -> m ()
- replicateM :: Applicative m => Int -> m a -> m [a]
- zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m ()
- zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c]
- mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])
- forever :: Applicative f => f a -> f b
- (<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
- (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
- mapAccumR :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
- mapAccumL :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
- forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b)
- optional :: Alternative f => f a -> f (Maybe a)
- newtype ZipList a = ZipList {
- getZipList :: [a]
- (&&&) :: Arrow a => a b c -> a b c' -> a b (c, c')
- newtype Identity a = Identity {
- runIdentity :: a
- withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
- stderr :: Handle
- stdin :: Handle
- withFrozenCallStack :: HasCallStack => (HasCallStack => a) -> a
- callStack :: HasCallStack => CallStack
- writeTVar :: TVar a -> a -> STM ()
- readTVar :: TVar a -> STM a
- newTVar :: a -> STM (TVar a)
- catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a
- throwSTM :: Exception e => e -> STM a
- data STM a
- data TVar a
- stdout :: Handle
- data IORef a
- type FilePath = String
- prettyCallStack :: CallStack -> String
- prettySrcLoc :: SrcLoc -> String
- class (Typeable e, Show e) => Exception e where
- toException :: e -> SomeException
- fromException :: SomeException -> Maybe e
- displayException :: e -> String
- newtype Const a (b :: k) = Const {
- getConst :: a
- find :: Foldable t => (a -> Bool) -> t a -> Maybe a
- all :: Foldable t => (a -> Bool) -> t a -> Bool
- any :: Foldable t => (a -> Bool) -> t a -> Bool
- or :: Foldable t => t Bool -> Bool
- and :: Foldable t => t Bool -> Bool
- concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
- concat :: Foldable t => t [a] -> [a]
- asum :: (Foldable t, Alternative f) => t (f a) -> f a
- sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
- sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f ()
- forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m ()
- mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
- for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
- traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
- foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- newtype First a = First {}
- newtype Last a = Last {}
- newtype Ap (f :: k -> Type) (a :: k) = Ap {
- getAp :: f a
- stimesMonoid :: (Integral b, Monoid a) => b -> a -> a
- stimesIdempotent :: Integral b => b -> a -> a
- newtype Dual a = Dual {
- getDual :: a
- newtype Endo a = Endo {
- appEndo :: a -> a
- newtype All = All {}
- newtype Any = Any {}
- newtype Sum a = Sum {
- getSum :: a
- newtype Product a = Product {
- getProduct :: a
- newtype Alt (f :: k -> Type) (a :: k) = Alt {
- getAlt :: f a
- someNatVal :: Natural -> SomeNat
- natVal :: forall (n :: Nat) proxy. KnownNat n => proxy n -> Natural
- data SomeNat = KnownNat n => SomeNat (Proxy n)
- unfoldr :: (b -> Maybe (a, b)) -> b -> [a]
- sortOn :: Ord b => (a -> b) -> [a] -> [a]
- sortBy :: (a -> a -> Ordering) -> [a] -> [a]
- sort :: Ord a => [a] -> [a]
- permutations :: [a] -> [[a]]
- subsequences :: [a] -> [[a]]
- tails :: [a] -> [[a]]
- inits :: [a] -> [[a]]
- group :: Eq a => [a] -> [[a]]
- genericReplicate :: Integral i => i -> a -> [a]
- genericSplitAt :: Integral i => i -> [a] -> ([a], [a])
- genericDrop :: Integral i => i -> [a] -> [a]
- genericTake :: Integral i => i -> [a] -> [a]
- genericLength :: Num i => [a] -> i
- transpose :: [[a]] -> [[a]]
- intercalate :: [a] -> [[a]] -> [a]
- intersperse :: a -> [a] -> [a]
- isPrefixOf :: Eq a => [a] -> [a] -> Bool
- readMaybe :: Read a => String -> Maybe a
- reads :: Read a => ReadS a
- fromRight :: b -> Either a b -> b
- fromLeft :: a -> Either a b -> a
- isRight :: Either a b -> Bool
- isLeft :: Either a b -> Bool
- partitionEithers :: [Either a b] -> ([a], [b])
- rights :: [Either a b] -> [b]
- lefts :: [Either a b] -> [a]
- either :: (a -> c) -> (b -> c) -> Either a b -> c
- comparing :: Ord a => (b -> a) -> b -> b -> Ordering
- newtype Down a = Down {
- getDown :: a
- data Proxy (t :: k) = Proxy
- (>>>) :: forall k cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c
- (<<<) :: forall k cat (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c
- data IOMode
- byteSwap64 :: Word64 -> Word64
- byteSwap32 :: Word32 -> Word32
- byteSwap16 :: Word16 -> Word16
- toIntegralSized :: (Integral a, Integral b, Bits a, Bits b) => a -> Maybe b
- xor :: Bits a => a -> a -> a
- lcm :: Integral a => a -> a -> a
- gcd :: Integral a => a -> a -> a
- (^^) :: (Fractional a, Integral b) => a -> b -> a
- (^) :: (Num a, Integral b) => a -> b -> a
- odd :: Integral a => a -> Bool
- even :: Integral a => a -> Bool
- denominator :: Ratio a -> a
- numerator :: Ratio a -> a
- boundedEnumFromThen :: (Enum a, Bounded a) => a -> a -> [a]
- boundedEnumFrom :: (Enum a, Bounded a) => a -> [a]
- chr :: Int -> Char
- unzip3 :: [(a, b, c)] -> ([a], [b], [c])
- unzip :: [(a, b)] -> ([a], [b])
- zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
- zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
- reverse :: [a] -> [a]
- break :: (a -> Bool) -> [a] -> ([a], [a])
- splitAt :: Int -> [a] -> ([a], [a])
- drop :: Int -> [a] -> [a]
- take :: Int -> [a] -> [a]
- dropWhile :: (a -> Bool) -> [a] -> [a]
- takeWhile :: (a -> Bool) -> [a] -> [a]
- replicate :: Int -> a -> [a]
- repeat :: a -> [a]
- iterate :: (a -> a) -> a -> [a]
- scanr1 :: (a -> a -> a) -> [a] -> [a]
- scanr :: (a -> b -> b) -> b -> [a] -> [b]
- scanl' :: (b -> a -> b) -> b -> [a] -> [b]
- scanl1 :: (a -> a -> a) -> [a] -> [a]
- scanl :: (b -> a -> b) -> b -> [a] -> [b]
- uncons :: [a] -> Maybe (a, [a])
- mapMaybe :: (a -> Maybe b) -> [a] -> [b]
- catMaybes :: [Maybe a] -> [a]
- listToMaybe :: [a] -> Maybe a
- maybeToList :: Maybe a -> [a]
- fromMaybe :: a -> Maybe a -> a
- isNothing :: Maybe a -> Bool
- isJust :: Maybe a -> Bool
- maybe :: b -> (a -> b) -> Maybe a -> b
- bool :: a -> a -> Bool -> a
- (&) :: a -> (a -> b) -> b
- on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
- fix :: (a -> a) -> a
- void :: Functor f => f a -> f ()
- ($>) :: Functor f => f a -> b -> f b
- (<&>) :: Functor f => f a -> (a -> b) -> f b
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- swap :: (a, b) -> (b, a)
- uncurry :: (a -> b -> c) -> (a, b) -> c
- curry :: ((a, b) -> c) -> a -> b -> c
- data MVar a
- subtract :: Num a => a -> a -> a
- currentCallStack :: IO [String]
- asTypeOf :: a -> a -> a
- ($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- flip :: (a -> b -> c) -> b -> a -> c
- (.) :: (b -> c) -> (a -> b) -> a -> c
- const :: a -> b -> a
- id :: a -> a
- maxInt :: Int
- minInt :: Int
- ord :: Char -> Int
- when :: Applicative f => Bool -> f () -> f ()
- (=<<) :: Monad m => (a -> m b) -> m a -> m b
- liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- (<**>) :: Applicative f => f a -> f (a -> b) -> f b
- class Applicative f => Alternative (f :: Type -> Type) where
- class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where
- data NonEmpty a = a :| [a]
- type String = [Char]
- getCallStack :: CallStack -> [([Char], SrcLoc)]
- type HasCallStack = ?callStack :: CallStack
- stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a
- data SomeException = Exception e => SomeException e
- (&&) :: Bool -> Bool -> Bool
- (||) :: Bool -> Bool -> Bool
- not :: Bool -> Bool
- fromShort :: ShortByteString -> ByteString
- data ShortByteString
- data ByteString
- toShort :: ByteString -> ShortByteString
- data IntMap a
- data IntSet
- data Map k a
- data Seq a
- data Set a
- force :: NFData a => a -> a
- ($!!) :: NFData a => (a -> b) -> a -> b
- deepseq :: NFData a => a -> b -> b
- class NFData a where
- rnf :: a -> ()
- newtype MaybeT (m :: Type -> Type) a = MaybeT {}
- newtype ExceptT e (m :: Type -> Type) a = ExceptT (m (Either e a))
- class MonadTrans (t :: (Type -> Type) -> Type -> Type) where
- data IdentityT (f :: k -> Type) (a :: k)
- class Monad m => MonadState s (m :: Type -> Type) | m -> s
- class Monad m => MonadReader r (m :: Type -> Type) | m -> r where
- runExceptT :: ExceptT e m a -> m (Either e a)
- newtype ReaderT r (m :: Type -> Type) a = ReaderT {
- runReaderT :: r -> m a
- withReader :: (r' -> r) -> Reader r a -> Reader r' a
- withReaderT :: forall r' r (m :: Type -> Type) a. (r' -> r) -> ReaderT r m a -> ReaderT r' m a
- newtype StateT s (m :: Type -> Type) a = StateT {
- runStateT :: s -> m (a, s)
- execState :: State s a -> s -> s
- withState :: (s -> s) -> State s a -> State s a
- evalStateT :: Monad m => StateT s m a -> s -> m a
- execStateT :: Monad m => StateT s m a -> s -> m s
- modifyTVar' :: TVar a -> (a -> a) -> STM ()
- mkWeakTMVar :: TMVar a -> IO () -> IO (Weak (TMVar a))
- isEmptyTMVar :: TMVar a -> STM Bool
- swapTMVar :: TMVar a -> a -> STM a
- tryReadTMVar :: TMVar a -> STM (Maybe a)
- readTMVar :: TMVar a -> STM a
- tryPutTMVar :: TMVar a -> a -> STM Bool
- putTMVar :: TMVar a -> a -> STM ()
- tryTakeTMVar :: TMVar a -> STM (Maybe a)
- takeTMVar :: TMVar a -> STM a
- newEmptyTMVar :: STM (TMVar a)
- newTMVar :: a -> STM (TMVar a)
- data TMVar a
- decodeUtf8' :: ByteString -> Either UnicodeException Text
- decodeUtf8With :: OnDecodeError -> ByteString -> Text
- data Text
- lenientDecode :: OnDecodeError
- strictDecode :: OnDecodeError
- type OnError a b = String -> Maybe a -> Maybe b
- type OnDecodeError = OnError Word8 Char
- data UnicodeException
- exceptToMaybeT :: forall (m :: Type -> Type) e a. Functor m => ExceptT e m a -> MaybeT m a
- maybeToExceptT :: forall (m :: Type -> Type) e a. Functor m => e -> MaybeT m a -> ExceptT e m a
- appliedTo :: Applicative f => f a -> f (a -> b) -> f b
- pass :: Applicative f => f ()
- (&&^) :: Monad m => m Bool -> m Bool -> m Bool
- guardM :: MonadPlus m => m Bool -> m ()
- guarded :: Alternative f => (a -> Bool) -> a -> f a
- ifM :: Monad m => m Bool -> m a -> m a -> m a
- unlessM :: Monad m => m Bool -> m () -> m ()
- whenM :: Monad m => m Bool -> m () -> m ()
- (||^) :: Monad m => m Bool -> m Bool -> m Bool
- error :: forall (r :: RuntimeRep) (a :: TYPE r) t. (HasCallStack, IsText t) => t -> a
- traceId :: String -> String
- traceM :: Applicative f => String -> f ()
- traceShowId :: Show a => a -> a
- traceShowM :: (Show a, Applicative f) => a -> f ()
- evaluateNF :: (NFData a, MonadIO m) => a -> m a
- evaluateNF_ :: (NFData a, MonadIO m) => a -> m ()
- evaluateWHNF :: MonadIO m => a -> m a
- evaluateWHNF_ :: MonadIO m => a -> m ()
- pattern Exc :: Exception e => e -> SomeException
- bug :: (HasCallStack, Exception e) => e -> a
- appendFileBS :: MonadIO m => FilePath -> ByteString -> m ()
- appendFileLBS :: MonadIO m => FilePath -> LByteString -> m ()
- appendFileLText :: MonadIO m => FilePath -> LText -> m ()
- appendFileText :: MonadIO m => FilePath -> Text -> m ()
- readFileBS :: MonadIO m => FilePath -> m ByteString
- readFileLBS :: MonadIO m => FilePath -> m LByteString
- readFileLText :: MonadIO m => FilePath -> m LText
- readFileText :: MonadIO m => FilePath -> m Text
- writeFileBS :: MonadIO m => FilePath -> ByteString -> m ()
- writeFileLBS :: MonadIO m => FilePath -> LByteString -> m ()
- writeFileLText :: MonadIO m => FilePath -> LText -> m ()
- writeFileText :: MonadIO m => FilePath -> Text -> m ()
- allM :: (Foldable f, Monad m) => (a -> m Bool) -> f a -> m Bool
- andM :: (Foldable f, Monad m) => f (m Bool) -> m Bool
- anyM :: (Foldable f, Monad m) => (a -> m Bool) -> f a -> m Bool
- asumMap :: forall b m f a. (Foldable f, Alternative m) => (a -> m b) -> f a -> m b
- elem :: (Foldable f, DisallowElem f, Eq a) => a -> f a -> Bool
- flipfoldl' :: Foldable f => (a -> b -> b) -> b -> f a -> b
- foldMapA :: (Semigroup b, Monoid b, Applicative m, Foldable f) => (a -> m b) -> f a -> m b
- foldMapM :: (Monoid b, Monad m, Foldable f) => (a -> m b) -> f a -> m b
- notElem :: (Foldable f, DisallowElem f, Eq a) => a -> f a -> Bool
- orM :: (Foldable f, Monad m) => f (m Bool) -> m Bool
- product :: forall a f. (Foldable f, Num a) => f a -> a
- sum :: forall a f. (Foldable f, Num a) => f a -> a
- identity :: a -> a
- (<<$>>) :: (Functor f, Functor g) => (a -> b) -> f (g a) -> f (g b)
- (??) :: Functor f => f (a -> b) -> a -> f b
- flap :: Functor f => f (a -> b) -> a -> f b
- atomically :: MonadIO m => STM a -> m a
- newEmptyMVar :: MonadIO m => m (MVar a)
- newEmptyTMVarIO :: MonadIO m => m (TMVar a)
- newMVar :: MonadIO m => a -> m (MVar a)
- newTMVarIO :: MonadIO m => a -> m (TMVar a)
- newTVarIO :: MonadIO m => a -> m (TVar a)
- putMVar :: MonadIO m => MVar a -> a -> m ()
- readMVar :: MonadIO m => MVar a -> m a
- readTVarIO :: MonadIO m => TVar a -> m a
- swapMVar :: MonadIO m => MVar a -> a -> m a
- takeMVar :: MonadIO m => MVar a -> m a
- tryPutMVar :: MonadIO m => MVar a -> a -> m Bool
- tryReadMVar :: MonadIO m => MVar a -> m (Maybe a)
- tryTakeMVar :: MonadIO m => MVar a -> m (Maybe a)
- die :: MonadIO m => String -> m a
- exitFailure :: MonadIO m => m a
- exitSuccess :: MonadIO m => m a
- exitWith :: MonadIO m => ExitCode -> m a
- appendFile :: MonadIO m => FilePath -> String -> m ()
- writeFile :: MonadIO m => FilePath -> String -> m ()
- atomicModifyIORef :: MonadIO m => IORef a -> (a -> (a, b)) -> m b
- atomicModifyIORef' :: MonadIO m => IORef a -> (a -> (a, b)) -> m b
- atomicModifyIORef'_ :: MonadIO m => IORef a -> (a -> a) -> m ()
- atomicModifyIORef_ :: MonadIO m => IORef a -> (a -> a) -> m ()
- atomicWriteIORef :: MonadIO m => IORef a -> a -> m ()
- modifyIORef :: MonadIO m => IORef a -> (a -> a) -> m ()
- modifyIORef' :: MonadIO m => IORef a -> (a -> a) -> m ()
- newIORef :: MonadIO m => a -> m (IORef a)
- readIORef :: MonadIO m => IORef a -> m a
- writeIORef :: MonadIO m => IORef a -> a -> m ()
- getLine :: MonadIO m => m Text
- print :: forall a m. (MonadIO m, Show a) => a -> m ()
- putStr :: MonadIO m => String -> m ()
- putStrLn :: MonadIO m => String -> m ()
- (!!?) :: [a] -> Int -> Maybe a
- head :: IsNonEmpty f a a "head" => f a -> a
- init :: IsNonEmpty f a [a] "init" => f a -> [a]
- last :: IsNonEmpty f a a "last" => f a -> a
- tail :: IsNonEmpty f a [a] "tail" => f a -> [a]
- viaNonEmpty :: (NonEmpty a -> b) -> [a] -> Maybe b
- whenNotNull :: Applicative f => [a] -> (NonEmpty a -> f ()) -> f ()
- whenNotNullM :: Monad m => m [a] -> (NonEmpty a -> m ()) -> m ()
- cycle :: [a] -> [a]
- chainedTo :: Monad m => (a -> m b) -> m a -> m b
- leftToMaybe :: Either l r -> Maybe l
- maybeToLeft :: r -> Maybe l -> Either l r
- maybeToRight :: l -> Maybe r -> Either l r
- rightToMaybe :: Either l r -> Maybe r
- whenLeft :: Applicative f => a -> Either l r -> (l -> f a) -> f a
- whenLeftM :: Monad m => a -> m (Either l r) -> (l -> m a) -> m a
- whenLeftM_ :: Monad m => m (Either l r) -> (l -> m ()) -> m ()
- whenLeft_ :: Applicative f => Either l r -> (l -> f ()) -> f ()
- whenRight :: Applicative f => a -> Either l r -> (r -> f a) -> f a
- whenRightM :: Monad m => a -> m (Either l r) -> (r -> m a) -> m a
- whenRightM_ :: Monad m => m (Either l r) -> (r -> m ()) -> m ()
- whenRight_ :: Applicative f => Either l r -> (r -> f ()) -> f ()
- (?:) :: Maybe a -> a -> a
- mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]
- whenJust :: Applicative f => Maybe a -> (a -> f ()) -> f ()
- whenJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m ()
- whenNothing :: Applicative f => Maybe a -> f a -> f a
- whenNothingM :: Monad m => m (Maybe a) -> m a -> m a
- whenNothingM_ :: Monad m => m (Maybe a) -> m () -> m ()
- whenNothing_ :: Applicative f => Maybe a -> f () -> f ()
- etaReaderT :: forall r (m :: Type -> Type) a. ReaderT r m a -> ReaderT r m a
- evaluatingState :: s -> State s a -> a
- evaluatingStateT :: Functor f => s -> StateT s f a -> f a
- executingState :: s -> State s a -> s
- executingStateT :: Functor f => s -> StateT s f a -> f s
- hoistMaybe :: forall (m :: Type -> Type) a. Applicative m => Maybe a -> MaybeT m a
- usingReader :: r -> Reader r a -> a
- usingReaderT :: r -> ReaderT r m a -> m a
- usingState :: s -> State s a -> (a, s)
- usingStateT :: s -> StateT s m a -> m (a, s)
- maybeToMonoid :: Monoid m => Maybe m -> m
- memptyIfFalse :: Monoid m => Bool -> m -> m
- memptyIfTrue :: Monoid m => Bool -> m -> m
- hashNub :: (Eq a, Hashable a) => [a] -> [a]
- ordNub :: Ord a => [a] -> [a]
- sortNub :: Ord a => [a] -> [a]
- unstableNub :: (Eq a, Hashable a) => [a] -> [a]
- integerToBounded :: (Integral a, Bounded a) => Integer -> Maybe a
- integerToNatural :: Integer -> Maybe Natural
- putBS :: MonadIO m => ByteString -> m ()
- putBSLn :: MonadIO m => ByteString -> m ()
- putLBS :: MonadIO m => LByteString -> m ()
- putLBSLn :: MonadIO m => LByteString -> m ()
- putLText :: MonadIO m => LText -> m ()
- putLTextLn :: MonadIO m => LText -> m ()
- putText :: MonadIO m => Text -> m ()
- putTextLn :: MonadIO m => Text -> m ()
- fromLazy :: LazyStrict l s => l -> s
- fromStrict :: LazyStrict l s => s -> l
- readEither :: Read a => String -> Either Text a
- show :: forall b a. (Show a, IsString b) => a -> b
- lines :: IsText t "lines" => t -> [t]
- unlines :: IsText t "unlines" => [t] -> t
- unwords :: IsText t "unwords" => [t] -> t
- words :: IsText t "words" => t -> [t]
- class Hashable a where
- hashWithSalt :: Int -> a -> Int
- class One x where
- type family OneItem x
- data Undefined = Undefined
- data Bug = Bug SomeException CallStack
- class ConvertUtf8 a b where
- encodeUtf8 :: a -> b
- decodeUtf8 :: b -> a
- decodeUtf8Strict :: b -> Either UnicodeException a
- type LByteString = ByteString
- type LText = Text
- class LazyStrict l s | l -> s, s -> l where
- class ToLText a where
- class ToString a where
- class ToText a where
- data HashMap k v
- data HashSet a
Documentation
unit :: Applicative f => f () Source #
tuple :: Applicative f => f a -> f b -> f (a, b) Source #
unsafeLogSAnd :: Show a => a -> b -> b Source #
unsafeLogAnd :: Text -> b -> b Source #
unsafeLogS :: Show a => a -> a Source #
hoistEitherShow :: Show e1 => Member (Error e2) r => (Text -> e2) -> Either e1 a -> Sem r a Source #
throwTextIO :: Text -> IO a Source #
traverseLeft :: Applicative m => (a -> m b) -> Either a b -> m b Source #
foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b #
Left-associative fold of a structure.
In the case of lists, foldl, when applied to a binary
operator, a starting value (typically the left-identity of the operator),
and a list, reduces the list using the binary operator, from left to
right:
foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn
Note that to produce the outermost application of the operator the
entire input list must be traversed. This means that foldl' will
diverge if given an infinite list.
Also note that if you want an efficient left-fold, you probably want to
use foldl' instead of foldl. The reason for this is that latter does
not force the "inner" results (e.g. z `f` x1 in the above example)
before applying them to the operator (e.g. to (`f` x2)). This results
in a thunk chain \(\mathcal{O}(n)\) elements long, which then must be
evaluated from the outside-in.
For a general Foldable structure this should be semantically identical
to,
foldl f z =foldlf z .toList
traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f () #
Map each element of a structure to an action, evaluate these
actions from left to right, and ignore the results. For a version
that doesn't ignore the results see traverse.
lookup :: Ord k => k -> Map k a -> Maybe a #
O(log n). Lookup the value at a key in the map.
The function will return the corresponding value as (,
or Just value)Nothing if the key isn't in the map.
An example of using lookup:
import Prelude hiding (lookup)
import Data.Map
employeeDept = fromList([("John","Sales"), ("Bob","IT")])
deptCountry = fromList([("IT","USA"), ("Sales","France")])
countryCurrency = fromList([("USA", "Dollar"), ("France", "Euro")])
employeeCurrency :: String -> Maybe String
employeeCurrency name = do
dept <- lookup name employeeDept
country <- lookup dept deptCountry
lookup country countryCurrency
main = do
putStrLn $ "John's currency: " ++ (show (employeeCurrency "John"))
putStrLn $ "Pete's currency: " ++ (show (employeeCurrency "Pete"))The output of this program:
John's currency: Just "Euro" Pete's currency: Nothing
A Map from keys k to values a.
The Semigroup operation for Map is union, which prefers
values from the left operand. If m1 maps a key k to a value
a1, and m2 maps the same key to a different value a2, then
their union m1 <> m2 maps k to a1.
Instances
| Eq2 Map | Since: containers-0.5.9 |
| Ord2 Map | Since: containers-0.5.9 |
Defined in Data.Map.Internal | |
| Show2 Map | Since: containers-0.5.9 |
| Functor (Map k) | |
| Foldable (Map k) | Folds in order of increasing key. |
Defined in Data.Map.Internal Methods fold :: Monoid m => Map k m -> m # foldMap :: Monoid m => (a -> m) -> Map k a -> m # foldMap' :: Monoid m => (a -> m) -> Map k a -> m # foldr :: (a -> b -> b) -> b -> Map k a -> b # foldr' :: (a -> b -> b) -> b -> Map k a -> b # foldl :: (b -> a -> b) -> b -> Map k a -> b # foldl' :: (b -> a -> b) -> b -> Map k a -> b # foldr1 :: (a -> a -> a) -> Map k a -> a # foldl1 :: (a -> a -> a) -> Map k a -> a # elem :: Eq a => a -> Map k a -> Bool # maximum :: Ord a => Map k a -> a # minimum :: Ord a => Map k a -> a # | |
| Traversable (Map k) | Traverses in order of increasing key. |
| Eq k => Eq1 (Map k) | Since: containers-0.5.9 |
| Ord k => Ord1 (Map k) | Since: containers-0.5.9 |
Defined in Data.Map.Internal | |
| (Ord k, Read k) => Read1 (Map k) | Since: containers-0.5.9 |
Defined in Data.Map.Internal | |
| Show k => Show1 (Map k) | Since: containers-0.5.9 |
| Ord k => IsList (Map k v) | Since: containers-0.5.6.2 |
| (Eq k, Eq a) => Eq (Map k a) | |
| (Data k, Data a, Ord k) => Data (Map k a) | |
Defined in Data.Map.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Map k a -> c (Map k a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Map k a) # toConstr :: Map k a -> Constr # dataTypeOf :: Map k a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Map k a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Map k a)) # gmapT :: (forall b. Data b => b -> b) -> Map k a -> Map k a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r # gmapQ :: (forall d. Data d => d -> u) -> Map k a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Map k a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) # | |
| (Ord k, Ord v) => Ord (Map k v) | |
| (Ord k, Read k, Read e) => Read (Map k e) | |
| (Show k, Show a) => Show (Map k a) | |
| Ord k => Semigroup (Map k v) | |
| Ord k => Monoid (Map k v) | |
| (NFData k, NFData a) => NFData (Map k a) | |
Defined in Data.Map.Internal | |
| One (Map k v) | |
| type Item (Map k v) | |
Defined in Data.Map.Internal | |
| type OneItem (Map k v) | |
Defined in Relude.Container.One | |
i :: QuasiQuoter #
The trace function outputs the trace message given as its first argument,
before returning the second argument as its result.
For example, this returns the value of f x but first outputs the message.
>>>let x = 123; f = show>>>trace ("calling f with x = " ++ show x) (f x)"calling f with x = 123 123"
The trace function should only be used for debugging, or for monitoring
execution. The function is not referentially transparent: its type indicates
that it is a pure function but it has the side effect of outputting the
trace message.
undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a #
Instances
| Monad (Sem f) | |
| Functor (Sem f) | |
| Member Fixpoint r => MonadFix (Sem r) | |
Defined in Polysemy.Internal | |
| Member (Fail :: (Type -> Type) -> Type -> Type) r => MonadFail (Sem r) | |
Defined in Polysemy.Internal | |
| Applicative (Sem f) | |
| Member (Embed IO) r => MonadIO (Sem r) | |
Defined in Polysemy.Internal | |
| Member NonDet r => Alternative (Sem r) | |
| Member NonDet r => MonadPlus (Sem r) | |
raiseUnder :: forall (e2 :: Effect) (e1 :: Effect) (r :: [Effect]) a. Sem (e1 ': r) a -> Sem (e1 ': (e2 ': r)) a #
raiseUnder2 :: forall (e2 :: Effect) (e3 :: Effect) (e1 :: Effect) (r :: [Effect]) a. Sem (e1 ': r) a -> Sem (e1 ': (e2 ': (e3 ': r))) a #
raiseUnder3 :: forall (e2 :: Effect) (e3 :: Effect) (e4 :: Effect) (e1 :: Effect) (r :: [Effect]) a. Sem (e1 ': r) a -> Sem (e1 ': (e2 ': (e3 ': (e4 ': r)))) a #
embedToFinal :: forall (m :: Type -> Type) (r :: [(Type -> Type) -> Type -> Type]) a. (Member (Final m) r, Functor m) => Sem (Embed m ': r) a -> Sem r a #
interpret :: forall e (r :: [Effect]) a. FirstOrder e "interpret" => (forall x (rInitial :: EffectRow). e (Sem rInitial) x -> Sem r x) -> Sem (e ': r) a -> Sem r a #
reinterpret :: forall e1 (e2 :: Effect) (r :: [Effect]) a. FirstOrder e1 "reinterpret" => (forall (rInitial :: EffectRow) x. e1 (Sem rInitial) x -> Sem (e2 ': r) x) -> Sem (e1 ': r) a -> Sem (e2 ': r) a #
data Final (m :: Type -> Type) (z :: Type -> Type) a #
Instances
| type DefiningModule Final | |
Defined in Polysemy.Final type DefiningModule Final = "Polysemy.Final" | |
type WithTactics (e :: Effect) (f :: Type -> Type) (m :: Type -> Type) (r :: [Effect]) = (Tactics f m (e ': r) :: (Type -> Type) -> Type -> Type) ': r #
atomicGet :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => Sem r s #
atomicGets :: forall s s' (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> s') -> Sem r s' #
atomicModify' :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r () #
atomicPut :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (AtomicState s :: (Type -> Type) -> Type -> Type) r => s -> Sem r () #
runAtomicStateTVar :: forall (r :: [(Type -> Type) -> Type -> Type]) s a. Member (Embed IO) r => TVar s -> Sem ((AtomicState s :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a #
data AtomicState s (m :: k) a #
Instances
| type DefiningModule (AtomicState :: Type -> k -> Type -> Type) | |
Defined in Polysemy.AtomicState | |
fromEither :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => Either e a -> Sem r a #
mapError :: forall e1 e2 (r :: [(Type -> Type) -> Type -> Type]) a. Member (Error e2 :: (Type -> Type) -> Type -> Type) r => (e1 -> e2) -> Sem ((Error e1 :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a #
note :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. Member (Error e :: (Type -> Type) -> Type -> Type) r => e -> Maybe a -> Sem r a #
runError :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. Sem ((Error e :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r (Either e a) #
throw :: forall e (r :: [Effect]) a. MemberWithError (Error e :: (Type -> Type) -> Type -> Type) r => e -> Sem r a #
data Reader i (m :: Type -> Type) a #
Instances
| type DefiningModule Reader | |
Defined in Polysemy.Reader type DefiningModule Reader = "Polysemy.Reader" | |
evalState :: forall s (r :: [(Type -> Type) -> Type -> Type]) a. s -> Sem ((State s :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r a #
get :: forall s (r :: [Effect]). MemberWithError (State s :: (Type -> Type) -> Type -> Type) r => Sem r s #
gets :: forall s a (r :: [(Type -> Type) -> Type -> Type]). Member (State s :: (Type -> Type) -> Type -> Type) r => (s -> a) -> Sem r a #
modify :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (State s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r () #
modify' :: forall s (r :: [(Type -> Type) -> Type -> Type]). Member (State s :: (Type -> Type) -> Type -> Type) r => (s -> s) -> Sem r () #
put :: forall s (r :: [Effect]). MemberWithError (State s :: (Type -> Type) -> Type -> Type) r => s -> Sem r () #
runState :: forall s (r :: [(Type -> Type) -> Type -> Type]) a. s -> Sem ((State s :: (Type -> Type) -> Type -> Type) ': r) a -> Sem r (s, a) #
(++) :: [a] -> [a] -> [a] infixr 5 #
Append two lists, i.e.,
[x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn] [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
If the first list is not finite, the result is the first list.
seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b infixr 0 #
The value of seq a b is bottom if a is bottom, and
otherwise equal to b. In other words, it evaluates the first
argument a to weak head normal form (WHNF). seq is usually
introduced to improve performance by avoiding unneeded laziness.
A note on evaluation order: the expression seq a b does
not guarantee that a will be evaluated before b.
The only guarantee given by seq is that the both a
and b will be evaluated before seq returns a value.
In particular, this means that b may be evaluated before
a. If you need to guarantee a specific order of evaluation,
you must use the function pseq from the "parallel" package.
filter :: (a -> Bool) -> [a] -> [a] #
\(\mathcal{O}(n)\). filter, applied to a predicate and a list, returns
the list of those elements that satisfy the predicate; i.e.,
filter p xs = [ x | x <- xs, p x]
>>>filter odd [1, 2, 3][1,3]
zip :: [a] -> [b] -> [(a, b)] #
\(\mathcal{O}(\min(m,n))\). zip takes two lists and returns a list of
corresponding pairs.
zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]
If one input list is short, excess elements of the longer list are discarded:
zip [1] ['a', 'b'] = [(1, 'a')] zip [1, 2] ['a'] = [(1, 'a')]
zip is right-lazy:
zip [] _|_ = [] zip _|_ [] = _|_
zip is capable of list fusion, but it is restricted to its
first list argument and its resulting list.
map :: (a -> b) -> [a] -> [b] #
\(\mathcal{O}(n)\). map f xs is the list obtained by applying f to
each element of xs, i.e.,
map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] map f [x1, x2, ...] == [f x1, f x2, ...]
>>>map (+1) [1, 2, 3]
($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b infixr 0 #
Application operator. This operator is redundant, since ordinary
application (f x) means the same as (f . However, $ x)$ has
low, right-associative binding precedence, so it sometimes allows
parentheses to be omitted; for example:
f $ g $ h x = f (g (h x))
It is also useful in higher-order situations, such as ,
or map ($ 0) xs.zipWith ($) fs xs
Note that ( is levity-polymorphic in its result type, so that
$)foo where $ Truefoo :: Bool -> Int# is well-typed.
coerce :: forall (k :: RuntimeRep) (a :: TYPE k) (b :: TYPE k). Coercible a b => a -> b #
The function coerce allows you to safely convert between values of
types that have the same representation with no run-time overhead. In the
simplest case you can use it instead of a newtype constructor, to go from
the newtype's concrete type to the abstract type. But it also works in
more complicated settings, e.g. converting a list of newtypes to a list of
concrete types.
This function is runtime-representation polymorphic, but the
RuntimeRep type argument is marked as Inferred, meaning
that it is not available for visible type application. This means
the typechecker will accept coerce @Int @Age 42.
fromIntegral :: (Integral a, Num b) => a -> b #
general coercion from integral types
realToFrac :: (Real a, Fractional b) => a -> b #
general coercion to fractional types
guard :: Alternative f => Bool -> f () #
Conditional failure of Alternative computations. Defined by
guard True =pure() guard False =empty
Examples
Common uses of guard include conditionally signaling an error in
an error monad and conditionally rejecting the current choice in an
Alternative-based parser.
As an example of signaling an error in the error monad Maybe,
consider a safe division function safeDiv x y that returns
Nothing when the denominator y is zero and otherwise. For example:Just (x `div`
y)
>>> safeDiv 4 0 Nothing >>> safeDiv 4 2 Just 2
A definition of safeDiv using guards, but not guard:
safeDiv :: Int -> Int -> Maybe Int
safeDiv x y | y /= 0 = Just (x `div` y)
| otherwise = Nothing
A definition of safeDiv using guard and Monad do-notation:
safeDiv :: Int -> Int -> Maybe Int safeDiv x y = do guard (y /= 0) return (x `div` y)
The IsList class and its methods are intended to be used in
conjunction with the OverloadedLists extension.
Since: base-4.7.0.0
Methods
The fromList function constructs the structure l from the given
list of Item l
fromListN :: Int -> [Item l] -> l #
The fromListN function takes the input list's length as a hint. Its
behaviour should be equivalent to fromList. The hint can be used to
construct the structure l more efficiently compared to fromList. If
the given hint does not equal to the input list's length the behaviour of
fromListN is not specified.
Instances
| IsList CallStack | Be aware that 'fromList . toList = id' only for unfrozen Since: base-4.9.0.0 |
| IsList Version | Since: base-4.8.0.0 |
| IsList IntSet | Since: containers-0.5.6.2 |
| IsList ByteArray | |
| IsList [a] | Since: base-4.7.0.0 |
| IsList (ZipList a) | Since: base-4.15.0.0 |
| IsList (NonEmpty a) | Since: base-4.9.0.0 |
| IsList (IntMap a) | Since: containers-0.5.6.2 |
| IsList (Seq a) | |
| Ord a => IsList (Set a) | Since: containers-0.5.6.2 |
| (Eq a, Hashable a) => IsList (HashSet a) | |
| IsList (Vector a) | |
| Storable a => IsList (Vector a) | |
| Prim a => IsList (Vector a) | |
| IsList (Array a) | |
| Prim a => IsList (PrimArray a) | |
| IsList (SmallArray a) | |
| IsList (DList a) | |
| Ord k => IsList (Map k v) | Since: containers-0.5.6.2 |
| (Eq k, Hashable k) => IsList (HashMap k v) | |
join :: Monad m => m (m a) -> m a #
The join function is the conventional monad join operator. It
is used to remove one level of monadic structure, projecting its
bound argument into the outer level.
'' can be understood as the join bssdo expression
do bs <- bss bs
Examples
A common use of join is to run an IO computation returned from
an STM transaction, since STM transactions
can't perform IO directly. Recall that
atomically :: STM a -> IO a
is used to run STM transactions atomically. So, by
specializing the types of atomically and join to
atomically:: STM (IO b) -> IO (IO b)join:: IO (IO b) -> IO b
we can compose them as
join.atomically:: STM (IO b) -> IO b
The Bounded class is used to name the upper and lower limits of a
type. Ord is not a superclass of Bounded since types that are not
totally ordered may also have upper and lower bounds.
The Bounded class may be derived for any enumeration type;
minBound is the first constructor listed in the data declaration
and maxBound is the last.
Bounded may also be derived for single-constructor datatypes whose
constituent types are in Bounded.
Instances
| Bounded Bool | Since: base-2.1 |
| Bounded Char | Since: base-2.1 |
| Bounded Int | Since: base-2.1 |
| Bounded Int8 | Since: base-2.1 |
| Bounded Int16 | Since: base-2.1 |
| Bounded Int32 | Since: base-2.1 |
| Bounded Int64 | Since: base-2.1 |
| Bounded Ordering | Since: base-2.1 |
| Bounded Word | Since: base-2.1 |
| Bounded Word8 | Since: base-2.1 |
| Bounded Word16 | Since: base-2.1 |
| Bounded Word32 | Since: base-2.1 |
| Bounded Word64 | Since: base-2.1 |
| Bounded VecCount | Since: base-4.10.0.0 |
| Bounded VecElem | Since: base-4.10.0.0 |
| Bounded () | Since: base-2.1 |
| Bounded All | Since: base-2.1 |
| Bounded Any | Since: base-2.1 |
| Bounded Associativity | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| Bounded SourceUnpackedness | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| Bounded SourceStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| Bounded DecidedStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| Bounded Extension | |
| Bounded Undefined | |
| Bounded a => Bounded (Min a) | Since: base-4.9.0.0 |
| Bounded a => Bounded (Max a) | Since: base-4.9.0.0 |
| Bounded a => Bounded (First a) | Since: base-4.9.0.0 |
| Bounded a => Bounded (Last a) | Since: base-4.9.0.0 |
| Bounded m => Bounded (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup | |
| Bounded a => Bounded (Identity a) | Since: base-4.9.0.0 |
| Bounded a => Bounded (Dual a) | Since: base-2.1 |
| Bounded a => Bounded (Sum a) | Since: base-2.1 |
| Bounded a => Bounded (Product a) | Since: base-2.1 |
| Bounded a => Bounded (Down a) | Since: base-4.14.0.0 |
| (Bounded a, Bounded b) => Bounded (a, b) | Since: base-2.1 |
| Bounded (Proxy t) | Since: base-4.7.0.0 |
| (Bounded a, Bounded b, Bounded c) => Bounded (a, b, c) | Since: base-2.1 |
| Bounded a => Bounded (Const a b) | Since: base-4.9.0.0 |
| (Applicative f, Bounded a) => Bounded (Ap f a) | Since: base-4.12.0.0 |
| Bounded b => Bounded (Tagged s b) | |
Defined in Data.Tagged | |
| (Bounded a, Bounded b, Bounded c, Bounded d) => Bounded (a, b, c, d) | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e) => Bounded (a, b, c, d, e) | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f) => Bounded (a, b, c, d, e, f) | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g) => Bounded (a, b, c, d, e, f, g) | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h) => Bounded (a, b, c, d, e, f, g, h) | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i) => Bounded (a, b, c, d, e, f, g, h, i) | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j) => Bounded (a, b, c, d, e, f, g, h, i, j) | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k) => Bounded (a, b, c, d, e, f, g, h, i, j, k) | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l) | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m) | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | Since: base-2.1 |
| (Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n, Bounded o) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | Since: base-2.1 |
Class Enum defines operations on sequentially ordered types.
The enumFrom... methods are used in Haskell's translation of
arithmetic sequences.
Instances of Enum may be derived for any enumeration type (types
whose constructors have no fields). The nullary constructors are
assumed to be numbered left-to-right by fromEnum from 0 through n-1.
See Chapter 10 of the Haskell Report for more details.
For any type that is an instance of class Bounded as well as Enum,
the following should hold:
- The calls
andsuccmaxBoundshould result in a runtime error.predminBound fromEnumandtoEnumshould give a runtime error if the result value is not representable in the result type. For example,is an error.toEnum7 ::BoolenumFromandenumFromThenshould be defined with an implicit bound, thus:
enumFrom x = enumFromTo x maxBound
enumFromThen x y = enumFromThenTo x y bound
where
bound | fromEnum y >= fromEnum x = maxBound
| otherwise = minBoundMethods
the successor of a value. For numeric types, succ adds 1.
the predecessor of a value. For numeric types, pred subtracts 1.
Convert from an Int.
Convert to an Int.
It is implementation-dependent what fromEnum returns when
applied to a value that is too large to fit in an Int.
Used in Haskell's translation of [n..] with [n..] = enumFrom n,
a possible implementation being enumFrom n = n : enumFrom (succ n).
For example:
enumFrom 4 :: [Integer] = [4,5,6,7,...]
enumFrom 6 :: [Int] = [6,7,8,9,...,maxBound :: Int]
enumFromThen :: a -> a -> [a] #
Used in Haskell's translation of [n,n'..]
with [n,n'..] = enumFromThen n n', a possible implementation being
enumFromThen n n' = n : n' : worker (f x) (f x n'),
worker s v = v : worker s (s v), x = fromEnum n' - fromEnum n and
f n y
| n > 0 = f (n - 1) (succ y)
| n < 0 = f (n + 1) (pred y)
| otherwise = y
For example:
enumFromThen 4 6 :: [Integer] = [4,6,8,10...]
enumFromThen 6 2 :: [Int] = [6,2,-2,-6,...,minBound :: Int]
enumFromTo :: a -> a -> [a] #
Used in Haskell's translation of [n..m] with
[n..m] = enumFromTo n m, a possible implementation being
enumFromTo n m
| n <= m = n : enumFromTo (succ n) m
| otherwise = [].
For example:
enumFromTo 6 10 :: [Int] = [6,7,8,9,10]
enumFromTo 42 1 :: [Integer] = []
enumFromThenTo :: a -> a -> a -> [a] #
Used in Haskell's translation of [n,n'..m] with
[n,n'..m] = enumFromThenTo n n' m, a possible implementation
being enumFromThenTo n n' m = worker (f x) (c x) n m,
x = fromEnum n' - fromEnum n, c x = bool (>=) ((x 0)
f n y
| n > 0 = f (n - 1) (succ y)
| n < 0 = f (n + 1) (pred y)
| otherwise = y and
worker s c v m
| c v m = v : worker s c (s v) m
| otherwise = []
For example:
enumFromThenTo 4 2 -6 :: [Integer] = [4,2,0,-2,-4,-6]
enumFromThenTo 6 8 2 :: [Int] = []
Instances
| Enum Bool | Since: base-2.1 |
| Enum Char | Since: base-2.1 |
| Enum Int | Since: base-2.1 |
| Enum Int8 | Since: base-2.1 |
| Enum Int16 | Since: base-2.1 |
| Enum Int32 | Since: base-2.1 |
| Enum Int64 | Since: base-2.1 |
| Enum Integer | Since: base-2.1 |
| Enum Natural | Since: base-4.8.0.0 |
| Enum Ordering | Since: base-2.1 |
| Enum Word | Since: base-2.1 |
| Enum Word8 | Since: base-2.1 |
| Enum Word16 | Since: base-2.1 |
Defined in GHC.Word | |
| Enum Word32 | Since: base-2.1 |
Defined in GHC.Word | |
| Enum Word64 | Since: base-2.1 |
Defined in GHC.Word | |
| Enum VecCount | Since: base-4.10.0.0 |
| Enum VecElem | Since: base-4.10.0.0 |
| Enum () | Since: base-2.1 |
| Enum Associativity | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods succ :: Associativity -> Associativity # pred :: Associativity -> Associativity # toEnum :: Int -> Associativity # fromEnum :: Associativity -> Int # enumFrom :: Associativity -> [Associativity] # enumFromThen :: Associativity -> Associativity -> [Associativity] # enumFromTo :: Associativity -> Associativity -> [Associativity] # enumFromThenTo :: Associativity -> Associativity -> Associativity -> [Associativity] # | |
| Enum SourceUnpackedness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods succ :: SourceUnpackedness -> SourceUnpackedness # pred :: SourceUnpackedness -> SourceUnpackedness # toEnum :: Int -> SourceUnpackedness # fromEnum :: SourceUnpackedness -> Int # enumFrom :: SourceUnpackedness -> [SourceUnpackedness] # enumFromThen :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] # enumFromTo :: SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] # enumFromThenTo :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness -> [SourceUnpackedness] # | |
| Enum SourceStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods succ :: SourceStrictness -> SourceStrictness # pred :: SourceStrictness -> SourceStrictness # toEnum :: Int -> SourceStrictness # fromEnum :: SourceStrictness -> Int # enumFrom :: SourceStrictness -> [SourceStrictness] # enumFromThen :: SourceStrictness -> SourceStrictness -> [SourceStrictness] # enumFromTo :: SourceStrictness -> SourceStrictness -> [SourceStrictness] # enumFromThenTo :: SourceStrictness -> SourceStrictness -> SourceStrictness -> [SourceStrictness] # | |
| Enum DecidedStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods succ :: DecidedStrictness -> DecidedStrictness # pred :: DecidedStrictness -> DecidedStrictness # toEnum :: Int -> DecidedStrictness # fromEnum :: DecidedStrictness -> Int # enumFrom :: DecidedStrictness -> [DecidedStrictness] # enumFromThen :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] # enumFromTo :: DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] # enumFromThenTo :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness -> [DecidedStrictness] # | |
| Enum IOMode | Since: base-4.2.0.0 |
Defined in GHC.IO.IOMode | |
| Enum Extension | |
Defined in GHC.LanguageExtensions.Type Methods succ :: Extension -> Extension # pred :: Extension -> Extension # fromEnum :: Extension -> Int # enumFrom :: Extension -> [Extension] # enumFromThen :: Extension -> Extension -> [Extension] # enumFromTo :: Extension -> Extension -> [Extension] # enumFromThenTo :: Extension -> Extension -> Extension -> [Extension] # | |
| Enum Undefined | |
Defined in Relude.Debug Methods succ :: Undefined -> Undefined # pred :: Undefined -> Undefined # fromEnum :: Undefined -> Int # enumFrom :: Undefined -> [Undefined] # enumFromThen :: Undefined -> Undefined -> [Undefined] # enumFromTo :: Undefined -> Undefined -> [Undefined] # enumFromThenTo :: Undefined -> Undefined -> Undefined -> [Undefined] # | |
| Enum DiscardLimit | |
Defined in Hedgehog.Internal.Property Methods succ :: DiscardLimit -> DiscardLimit # pred :: DiscardLimit -> DiscardLimit # toEnum :: Int -> DiscardLimit # fromEnum :: DiscardLimit -> Int # enumFrom :: DiscardLimit -> [DiscardLimit] # enumFromThen :: DiscardLimit -> DiscardLimit -> [DiscardLimit] # enumFromTo :: DiscardLimit -> DiscardLimit -> [DiscardLimit] # enumFromThenTo :: DiscardLimit -> DiscardLimit -> DiscardLimit -> [DiscardLimit] # | |
| Enum ShrinkLimit | |
Defined in Hedgehog.Internal.Property Methods succ :: ShrinkLimit -> ShrinkLimit # pred :: ShrinkLimit -> ShrinkLimit # toEnum :: Int -> ShrinkLimit # fromEnum :: ShrinkLimit -> Int # enumFrom :: ShrinkLimit -> [ShrinkLimit] # enumFromThen :: ShrinkLimit -> ShrinkLimit -> [ShrinkLimit] # enumFromTo :: ShrinkLimit -> ShrinkLimit -> [ShrinkLimit] # enumFromThenTo :: ShrinkLimit -> ShrinkLimit -> ShrinkLimit -> [ShrinkLimit] # | |
| Enum ShrinkRetries | |
Defined in Hedgehog.Internal.Property Methods succ :: ShrinkRetries -> ShrinkRetries # pred :: ShrinkRetries -> ShrinkRetries # toEnum :: Int -> ShrinkRetries # fromEnum :: ShrinkRetries -> Int # enumFrom :: ShrinkRetries -> [ShrinkRetries] # enumFromThen :: ShrinkRetries -> ShrinkRetries -> [ShrinkRetries] # enumFromTo :: ShrinkRetries -> ShrinkRetries -> [ShrinkRetries] # enumFromThenTo :: ShrinkRetries -> ShrinkRetries -> ShrinkRetries -> [ShrinkRetries] # | |
| Enum TestLimit | |
Defined in Hedgehog.Internal.Property Methods succ :: TestLimit -> TestLimit # pred :: TestLimit -> TestLimit # fromEnum :: TestLimit -> Int # enumFrom :: TestLimit -> [TestLimit] # enumFromThen :: TestLimit -> TestLimit -> [TestLimit] # enumFromTo :: TestLimit -> TestLimit -> [TestLimit] # enumFromThenTo :: TestLimit -> TestLimit -> TestLimit -> [TestLimit] # | |
| Enum DiscardCount | |
Defined in Hedgehog.Internal.Property Methods succ :: DiscardCount -> DiscardCount # pred :: DiscardCount -> DiscardCount # toEnum :: Int -> DiscardCount # fromEnum :: DiscardCount -> Int # enumFrom :: DiscardCount -> [DiscardCount] # enumFromThen :: DiscardCount -> DiscardCount -> [DiscardCount] # enumFromTo :: DiscardCount -> DiscardCount -> [DiscardCount] # enumFromThenTo :: DiscardCount -> DiscardCount -> DiscardCount -> [DiscardCount] # | |
| Enum PropertyCount | |
Defined in Hedgehog.Internal.Property Methods succ :: PropertyCount -> PropertyCount # pred :: PropertyCount -> PropertyCount # toEnum :: Int -> PropertyCount # fromEnum :: PropertyCount -> Int # enumFrom :: PropertyCount -> [PropertyCount] # enumFromThen :: PropertyCount -> PropertyCount -> [PropertyCount] # enumFromTo :: PropertyCount -> PropertyCount -> [PropertyCount] # enumFromThenTo :: PropertyCount -> PropertyCount -> PropertyCount -> [PropertyCount] # | |
| Enum ShrinkCount | |
Defined in Hedgehog.Internal.Property Methods succ :: ShrinkCount -> ShrinkCount # pred :: ShrinkCount -> ShrinkCount # toEnum :: Int -> ShrinkCount # fromEnum :: ShrinkCount -> Int # enumFrom :: ShrinkCount -> [ShrinkCount] # enumFromThen :: ShrinkCount -> ShrinkCount -> [ShrinkCount] # enumFromTo :: ShrinkCount -> ShrinkCount -> [ShrinkCount] # enumFromThenTo :: ShrinkCount -> ShrinkCount -> ShrinkCount -> [ShrinkCount] # | |
| Enum TestCount | |
Defined in Hedgehog.Internal.Property Methods succ :: TestCount -> TestCount # pred :: TestCount -> TestCount # fromEnum :: TestCount -> Int # enumFrom :: TestCount -> [TestCount] # enumFromThen :: TestCount -> TestCount -> [TestCount] # enumFromTo :: TestCount -> TestCount -> [TestCount] # enumFromThenTo :: TestCount -> TestCount -> TestCount -> [TestCount] # | |
| Enum Clock | |
Defined in System.Clock | |
| Integral a => Enum (Ratio a) | Since: base-2.0.1 |
| Enum a => Enum (Min a) | Since: base-4.9.0.0 |
| Enum a => Enum (Max a) | Since: base-4.9.0.0 |
| Enum a => Enum (First a) | Since: base-4.9.0.0 |
| Enum a => Enum (Last a) | Since: base-4.9.0.0 |
Defined in Data.Semigroup | |
| Enum a => Enum (WrappedMonoid a) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods succ :: WrappedMonoid a -> WrappedMonoid a # pred :: WrappedMonoid a -> WrappedMonoid a # toEnum :: Int -> WrappedMonoid a # fromEnum :: WrappedMonoid a -> Int # enumFrom :: WrappedMonoid a -> [WrappedMonoid a] # enumFromThen :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # enumFromTo :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # enumFromThenTo :: WrappedMonoid a -> WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # | |
| Enum a => Enum (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods succ :: Identity a -> Identity a # pred :: Identity a -> Identity a # fromEnum :: Identity a -> Int # enumFrom :: Identity a -> [Identity a] # enumFromThen :: Identity a -> Identity a -> [Identity a] # enumFromTo :: Identity a -> Identity a -> [Identity a] # enumFromThenTo :: Identity a -> Identity a -> Identity a -> [Identity a] # | |
| Enum a => Enum (Down a) | Since: base-4.14.0.0 |
Defined in Data.Ord | |
| Enum (Proxy s) | Since: base-4.7.0.0 |
| Enum a => Enum (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods succ :: Const a b -> Const a b # pred :: Const a b -> Const a b # fromEnum :: Const a b -> Int # enumFrom :: Const a b -> [Const a b] # enumFromThen :: Const a b -> Const a b -> [Const a b] # enumFromTo :: Const a b -> Const a b -> [Const a b] # enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] # | |
| Enum (f a) => Enum (Ap f a) | Since: base-4.12.0.0 |
Defined in Data.Monoid | |
| Enum (f a) => Enum (Alt f a) | Since: base-4.8.0.0 |
| Enum a => Enum (Tagged s a) | |
Defined in Data.Tagged Methods succ :: Tagged s a -> Tagged s a # pred :: Tagged s a -> Tagged s a # fromEnum :: Tagged s a -> Int # enumFrom :: Tagged s a -> [Tagged s a] # enumFromThen :: Tagged s a -> Tagged s a -> [Tagged s a] # enumFromTo :: Tagged s a -> Tagged s a -> [Tagged s a] # enumFromThenTo :: Tagged s a -> Tagged s a -> Tagged s a -> [Tagged s a] # | |
The Eq class defines equality (==) and inequality (/=).
All the basic datatypes exported by the Prelude are instances of Eq,
and Eq may be derived for any datatype whose constituents are also
instances of Eq.
The Haskell Report defines no laws for Eq. However, == is customarily
expected to implement an equivalence relationship where two values comparing
equal are indistinguishable by "public" functions, with a "public" function
being one not allowing to see implementation details. For example, for a
type representing non-normalised natural numbers modulo 100, a "public"
function doesn't make the difference between 1 and 201. It is expected to
have the following properties:
Instances
| Eq Bool | |
| Eq Char | |
| Eq Double | Note that due to the presence of
Also note that
|
| Eq Float | Note that due to the presence of
Also note that
|
| Eq Int | |
| Eq Int8 | Since: base-2.1 |
| Eq Int16 | Since: base-2.1 |
| Eq Int32 | Since: base-2.1 |
| Eq Int64 | Since: base-2.1 |
| Eq Integer | |
| Eq Natural | Since: base-4.8.0.0 |
| Eq Ordering | |
| Eq Word | |
| Eq Word8 | Since: base-2.1 |
| Eq Word16 | Since: base-2.1 |
| Eq Word32 | Since: base-2.1 |
| Eq Word64 | Since: base-2.1 |
| Eq SomeTypeRep | |
Defined in Data.Typeable.Internal | |
| Eq Exp | |
| Eq Match | |
| Eq Clause | |
| Eq Pat | |
| Eq Type | |
| Eq Dec | |
| Eq Name | |
| Eq FunDep | |
| Eq InjectivityAnn | |
Defined in Language.Haskell.TH.Syntax Methods (==) :: InjectivityAnn -> InjectivityAnn -> Bool # (/=) :: InjectivityAnn -> InjectivityAnn -> Bool # | |
| Eq Overlap | |
| Eq () | |
| Eq TyCon | |
| Eq Module | |
| Eq TrName | |
| Eq Handle | Since: base-4.1.0.0 |
| Eq BigNat | |
| Eq Void | Since: base-4.8.0.0 |
| Eq SpecConstrAnnotation | Since: base-4.3.0.0 |
Defined in GHC.Exts Methods (==) :: SpecConstrAnnotation -> SpecConstrAnnotation -> Bool # (/=) :: SpecConstrAnnotation -> SpecConstrAnnotation -> Bool # | |
| Eq Version | Since: base-2.1 |
| Eq ThreadId | Since: base-4.2.0.0 |
| Eq BlockReason | Since: base-4.3.0.0 |
Defined in GHC.Conc.Sync | |
| Eq ThreadStatus | Since: base-4.3.0.0 |
Defined in GHC.Conc.Sync | |
| Eq AsyncException | Since: base-4.2.0.0 |
Defined in GHC.IO.Exception Methods (==) :: AsyncException -> AsyncException -> Bool # (/=) :: AsyncException -> AsyncException -> Bool # | |
| Eq ArrayException | Since: base-4.2.0.0 |
Defined in GHC.IO.Exception Methods (==) :: ArrayException -> ArrayException -> Bool # (/=) :: ArrayException -> ArrayException -> Bool # | |
| Eq ExitCode | |
| Eq IOErrorType | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception | |
| Eq BufferMode | Since: base-4.2.0.0 |
Defined in GHC.IO.Handle.Types | |
| Eq Newline | Since: base-4.2.0.0 |
| Eq NewlineMode | Since: base-4.2.0.0 |
Defined in GHC.IO.Handle.Types | |
| Eq MaskingState | Since: base-4.3.0.0 |
Defined in GHC.IO | |
| Eq IOException | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception | |
| Eq ErrorCall | Since: base-4.7.0.0 |
| Eq ArithException | Since: base-3.0 |
Defined in GHC.Exception.Type Methods (==) :: ArithException -> ArithException -> Bool # (/=) :: ArithException -> ArithException -> Bool # | |
| Eq All | Since: base-2.1 |
| Eq Any | Since: base-2.1 |
| Eq Fixity | Since: base-4.6.0.0 |
| Eq Associativity | Since: base-4.6.0.0 |
Defined in GHC.Generics Methods (==) :: Associativity -> Associativity -> Bool # (/=) :: Associativity -> Associativity -> Bool # | |
| Eq SourceUnpackedness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods (==) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (/=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # | |
| Eq SourceStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods (==) :: SourceStrictness -> SourceStrictness -> Bool # (/=) :: SourceStrictness -> SourceStrictness -> Bool # | |
| Eq DecidedStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods (==) :: DecidedStrictness -> DecidedStrictness -> Bool # (/=) :: DecidedStrictness -> DecidedStrictness -> Bool # | |
| Eq SomeSymbol | Since: base-4.7.0.0 |
Defined in GHC.TypeLits | |
| Eq SomeNat | Since: base-4.7.0.0 |
| Eq IOMode | Since: base-4.2.0.0 |
| Eq SrcLoc | Since: base-4.9.0.0 |
| Eq ShortByteString | |
Defined in Data.ByteString.Short.Internal Methods (==) :: ShortByteString -> ShortByteString -> Bool # (/=) :: ShortByteString -> ShortByteString -> Bool # | |
| Eq ByteString | |
Defined in Data.ByteString.Internal | |
| Eq IntSet | |
| Eq TyVarBndr | |
| Eq Extension | |
| Eq ForeignSrcLang | |
Defined in GHC.ForeignSrcLang.Type Methods (==) :: ForeignSrcLang -> ForeignSrcLang -> Bool # (/=) :: ForeignSrcLang -> ForeignSrcLang -> Bool # | |
| Eq Doc | |
| Eq TextDetails | |
Defined in Text.PrettyPrint.Annotated.HughesPJ | |
| Eq Style | |
| Eq Mode | |
| Eq ModName | |
| Eq PkgName | |
| Eq Module | |
| Eq OccName | |
| Eq NameFlavour | |
Defined in Language.Haskell.TH.Syntax | |
| Eq NameSpace | |
| Eq Loc | |
| Eq Info | |
| Eq ModuleInfo | |
Defined in Language.Haskell.TH.Syntax | |
| Eq Fixity | |
| Eq FixityDirection | |
Defined in Language.Haskell.TH.Syntax Methods (==) :: FixityDirection -> FixityDirection -> Bool # (/=) :: FixityDirection -> FixityDirection -> Bool # | |
| Eq Lit | |
| Eq Bytes | |
| Eq Body | |
| Eq Guard | |
| Eq Stmt | |
| Eq Range | |
| Eq DerivClause | |
Defined in Language.Haskell.TH.Syntax | |
| Eq DerivStrategy | |
Defined in Language.Haskell.TH.Syntax Methods (==) :: DerivStrategy -> DerivStrategy -> Bool # (/=) :: DerivStrategy -> DerivStrategy -> Bool # | |
| Eq TypeFamilyHead | |
Defined in Language.Haskell.TH.Syntax Methods (==) :: TypeFamilyHead -> TypeFamilyHead -> Bool # (/=) :: TypeFamilyHead -> TypeFamilyHead -> Bool # | |
| Eq TySynEqn | |
| Eq Foreign | |
| Eq Callconv | |
| Eq Safety | |
| Eq Pragma | |
| Eq Inline | |
| Eq RuleMatch | |
| Eq Phases | |
| Eq RuleBndr | |
| Eq AnnTarget | |
| Eq SourceUnpackedness | |
Defined in Language.Haskell.TH.Syntax Methods (==) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (/=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # | |
| Eq SourceStrictness | |
Defined in Language.Haskell.TH.Syntax Methods (==) :: SourceStrictness -> SourceStrictness -> Bool # (/=) :: SourceStrictness -> SourceStrictness -> Bool # | |
| Eq DecidedStrictness | |
Defined in Language.Haskell.TH.Syntax Methods (==) :: DecidedStrictness -> DecidedStrictness -> Bool # (/=) :: DecidedStrictness -> DecidedStrictness -> Bool # | |
| Eq Con | |
| Eq Bang | |
| Eq PatSynDir | |
| Eq PatSynArgs | |
Defined in Language.Haskell.TH.Syntax | |
| Eq FamilyResultSig | |
Defined in Language.Haskell.TH.Syntax Methods (==) :: FamilyResultSig -> FamilyResultSig -> Bool # (/=) :: FamilyResultSig -> FamilyResultSig -> Bool # | |
| Eq TyLit | |
| Eq Role | |
| Eq AnnLookup | |
| Eq UnicodeException | |
Defined in Data.Text.Encoding.Error Methods (==) :: UnicodeException -> UnicodeException -> Bool # (/=) :: UnicodeException -> UnicodeException -> Bool # | |
| Eq LocalTime | |
| Eq Undefined | |
| Eq SrcSpanInfo | |
| Eq SrcLoc | |
| Eq SrcSpan | |
| Eq ConstructorInfo | |
| Eq DatatypeInfo | |
| Eq ByteArray | |
| Eq ConstructorVariant | |
| Eq DatatypeVariant | |
| Eq FieldStrictness | |
| Eq Strictness | |
| Eq Unpackedness | |
| Eq Boxed | |
| Eq Tool | |
| Eq CodePoint | |
| Eq DecoderState | |
| Eq PathException | |
| Eq More | |
| Eq Pos | |
| Eq Scientific | |
| Eq DotNetTime | |
| Eq JSONPathElement | |
| Eq SumEncoding | |
| Eq Value | |
| Eq UUID | |
| Eq UnpackedUUID | |
| Eq TestError Source # | |
| Eq Confidence | |
| Eq DiscardLimit | |
| Eq GroupName | |
| Eq LabelName | |
| Eq PropertyName | |
| Eq ShrinkLimit | |
| Eq ShrinkRetries | |
| Eq TestLimit | |
| Eq Cover | |
| Eq CoverCount | |
| Eq CoverPercentage | |
| Eq Diff | |
| Eq DiscardCount | |
| Eq Failure | |
| Eq Journal | |
| Eq Log | |
| Eq PropertyConfig | |
| Eq PropertyCount | |
| Eq ShrinkCount | |
| Eq TerminationCriteria | |
| Eq TestCount | |
| Eq DependencyType | |
| Eq HedgehogDiscardLimit | |
| Eq HedgehogShrinkLimit | |
| Eq HedgehogShrinkRetries | |
| Eq HedgehogTestLimit | |
| Eq Clock | |
| Eq TimeSpec | |
| Eq a => Eq [a] | |
| Eq a => Eq (Maybe a) | Since: base-2.1 |
| Eq a => Eq (Ratio a) | Since: base-2.1 |
| Eq (Ptr a) | Since: base-2.1 |
| Eq (FunPtr a) | |
| Eq p => Eq (Par1 p) | Since: base-4.7.0.0 |
| Eq a => Eq (Complex a) | Since: base-2.1 |
| Eq a => Eq (Min a) | Since: base-4.9.0.0 |
| Eq a => Eq (Max a) | Since: base-4.9.0.0 |
| Eq a => Eq (First a) | Since: base-4.9.0.0 |
| Eq a => Eq (Last a) | Since: base-4.9.0.0 |
| Eq m => Eq (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods (==) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (/=) :: WrappedMonoid m -> WrappedMonoid m -> Bool # | |
| Eq a => Eq (Option a) | Since: base-4.9.0.0 |
| Eq a => Eq (ZipList a) | Since: base-4.7.0.0 |
| Eq a => Eq (Identity a) | Since: base-4.8.0.0 |
| Eq (TVar a) | Since: base-4.8.0.0 |
| Eq (IORef a) | Pointer equality. Since: base-4.0.0.0 |
| Eq a => Eq (First a) | Since: base-2.1 |
| Eq a => Eq (Last a) | Since: base-2.1 |
| Eq a => Eq (Dual a) | Since: base-2.1 |
| Eq a => Eq (Sum a) | Since: base-2.1 |
| Eq a => Eq (Product a) | Since: base-2.1 |
| Eq a => Eq (Down a) | Since: base-4.6.0.0 |
| Eq (MVar a) | Since: base-4.1.0.0 |
| Eq a => Eq (NonEmpty a) | Since: base-4.9.0.0 |
| Eq a => Eq (IntMap a) | |
| Eq vertex => Eq (SCC vertex) | Since: containers-0.5.9 |
| Eq a => Eq (Tree a) | |
| Eq a => Eq (Seq a) | |
| Eq a => Eq (ViewL a) | |
| Eq a => Eq (ViewR a) | |
| Eq a => Eq (Set a) | |
| Eq (Doc a) | |
| Eq a => Eq (AnnotDetails a) | |
Defined in Text.PrettyPrint.Annotated.HughesPJ Methods (==) :: AnnotDetails a -> AnnotDetails a -> Bool # (/=) :: AnnotDetails a -> AnnotDetails a -> Bool # | |
| Eq a => Eq (Span a) | |
| Eq (TMVar a) | |
| Eq a => Eq (HashSet a) | |
| Eq a => Eq (ListOf a) | |
| Eq l => Eq (ModuleHeadAndImports l) | |
| Eq a => Eq (NonGreedy a) | |
| Eq l => Eq (PragmasAndModuleHead l) | |
| Eq l => Eq (PragmasAndModuleName l) | |
| Eq l => Eq (ModulePragma l) | |
| Eq l => Eq (ModuleHead l) | |
| Eq l => Eq (ImportDecl l) | |
| Eq l => Eq (ModuleName l) | |
| Eq l => Eq (Decl l) | |
| Eq l => Eq (Exp l) | |
| Eq l => Eq (Module l) | |
| Eq l => Eq (Pat l) | |
| Eq l => Eq (Stmt l) | |
| Eq l => Eq (Type l) | |
| Eq a => Eq (Vector a) | |
| (Storable a, Eq a) => Eq (Vector a) | |
| (Prim a, Eq a) => Eq (Vector a) | |
| Eq a => Eq (Array a) | |
| (Eq a, Prim a) => Eq (PrimArray a) | |
| Eq a => Eq (SmallArray a) | |
| Eq a => Eq (Loc a) | |
| Eq a => Eq (Hashed a) | |
| Eq l => Eq (Activation l) | |
| Eq l => Eq (Alt l) | |
| Eq l => Eq (Annotation l) | |
| Eq l => Eq (Assoc l) | |
| Eq l => Eq (Asst l) | |
| Eq l => Eq (BangType l) | |
| Eq l => Eq (Binds l) | |
| Eq l => Eq (BooleanFormula l) | |
| Eq l => Eq (Bracket l) | |
| Eq l => Eq (CName l) | |
| Eq l => Eq (CallConv l) | |
| Eq l => Eq (ClassDecl l) | |
| Eq l => Eq (ConDecl l) | |
| Eq l => Eq (Context l) | |
| Eq l => Eq (DataOrNew l) | |
| Eq l => Eq (DeclHead l) | |
| Eq l => Eq (DerivStrategy l) | |
| Eq l => Eq (Deriving l) | |
| Eq l => Eq (EWildcard l) | |
| Eq l => Eq (ExportSpec l) | |
| Eq l => Eq (ExportSpecList l) | |
| Eq l => Eq (FieldDecl l) | |
| Eq l => Eq (FieldUpdate l) | |
| Eq l => Eq (FunDep l) | |
| Eq l => Eq (GadtDecl l) | |
| Eq l => Eq (GuardedRhs l) | |
| Eq l => Eq (IPBind l) | |
| Eq l => Eq (IPName l) | |
| Eq l => Eq (ImportSpec l) | |
| Eq l => Eq (ImportSpecList l) | |
| Eq l => Eq (InjectivityInfo l) | |
| Eq l => Eq (InstDecl l) | |
| Eq l => Eq (InstHead l) | |
| Eq l => Eq (InstRule l) | |
| Eq l => Eq (Literal l) | |
| Eq l => Eq (Match l) | |
| Eq l => Eq (MaybePromotedName l) | |
| Eq l => Eq (Name l) | |
| Eq l => Eq (Namespace l) | |
| Eq l => Eq (Op l) | |
| Eq l => Eq (Overlap l) | |
| Eq l => Eq (PXAttr l) | |
| Eq l => Eq (PatField l) | |
| Eq l => Eq (PatternSynDirection l) | |
| Eq l => Eq (Promoted l) | |
| Eq l => Eq (QName l) | |
| Eq l => Eq (QOp l) | |
| Eq l => Eq (QualConDecl l) | |
| Eq l => Eq (QualStmt l) | |
| Eq l => Eq (RPat l) | |
| Eq l => Eq (RPatOp l) | |
| Eq l => Eq (ResultSig l) | |
| Eq l => Eq (Rhs l) | |
| Eq l => Eq (Role l) | |
| Eq l => Eq (Rule l) | |
| Eq l => Eq (RuleVar l) | |
| Eq l => Eq (Safety l) | |
| Eq l => Eq (Sign l) | |
| Eq l => Eq (SpecialCon l) | |
| Eq l => Eq (Splice l) | |
| Eq l => Eq (TyVarBind l) | |
| Eq l => Eq (TypeEqn l) | |
| Eq l => Eq (Unpackedness l) | |
| Eq l => Eq (WarningText l) | |
| Eq l => Eq (XAttr l) | |
| Eq l => Eq (XName l) | |
| Eq (WalkAction b) | |
| Eq a => Eq (DList a) | |
| Eq a => Eq (IResult a) | |
| Eq a => Eq (Result a) | |
| Eq a => Eq (Coverage a) | |
| Eq a => Eq (Label a) | |
| Eq a => Eq (Window a) | |
| (Eq a, Eq b) => Eq (Either a b) | Since: base-2.1 |
| Eq (V1 p) | Since: base-4.9.0.0 |
| Eq (U1 p) | Since: base-4.9.0.0 |
| Eq (TypeRep a) | Since: base-2.1 |
| (Eq a, Eq b) => Eq (a, b) | |
| Eq a => Eq (Arg a b) | Since: base-4.9.0.0 |
| Eq (Proxy s) | Since: base-4.7.0.0 |
| (Eq k, Eq a) => Eq (Map k a) | |
| (Eq1 m, Eq a) => Eq (MaybeT m a) | |
| (Eq1 m, Eq a) => Eq (ListT m a) | |
| (Eq k, Eq v) => Eq (HashMap k v) | |
| Eq a => Eq (B dst a) | |
| Eq (MutableArray s a) | |
| Eq (SmallMutableArray s a) | |
| (Eq k, Eq v) => Eq (Leaf k v) | |
| Eq (Path b t) | |
| (Eq a, Eq1 m) => Eq (NodeT m a) | |
| (Eq1 m, Eq a) => Eq (TreeT m a) | |
| Eq (f p) => Eq (Rec1 f p) | Since: base-4.7.0.0 |
| Eq (URec (Ptr ()) p) | Since: base-4.9.0.0 |
| Eq (URec Char p) | Since: base-4.9.0.0 |
| Eq (URec Double p) | Since: base-4.9.0.0 |
| Eq (URec Float p) | |
| Eq (URec Int p) | Since: base-4.9.0.0 |
| Eq (URec Word p) | Since: base-4.9.0.0 |
| (Eq a, Eq b, Eq c) => Eq (a, b, c) | |
| Eq a => Eq (Const a b) | Since: base-4.9.0.0 |
| Eq (f a) => Eq (Ap f a) | Since: base-4.12.0.0 |
| Eq (f a) => Eq (Alt f a) | Since: base-4.8.0.0 |
| (Eq e, Eq1 m, Eq a) => Eq (ExceptT e m a) | |
| (Eq1 f, Eq a) => Eq (IdentityT f a) | |
| (Eq e, Eq1 m, Eq a) => Eq (ErrorT e m a) | |
| (Eq w, Eq1 m, Eq a) => Eq (WriterT w m a) | |
| (Eq w, Eq1 m, Eq a) => Eq (WriterT w m a) | |
| Eq b => Eq (Tagged s b) | |
| Eq c => Eq (K1 i c p) | Since: base-4.7.0.0 |
| (Eq (f p), Eq (g p)) => Eq ((f :+: g) p) | Since: base-4.7.0.0 |
| (Eq (f p), Eq (g p)) => Eq ((f :*: g) p) | Since: base-4.7.0.0 |
| (Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) | |
| (Eq1 f, Eq1 g, Eq a) => Eq (Product f g a) | Since: base-4.9.0.0 |
| (Eq1 f, Eq1 g, Eq a) => Eq (Sum f g a) | Since: base-4.9.0.0 |
| Eq (f p) => Eq (M1 i c f p) | Since: base-4.7.0.0 |
| Eq (f (g p)) => Eq ((f :.: g) p) | Since: base-4.7.0.0 |
| (Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e) | |
| (Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a) | Since: base-4.9.0.0 |
| (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f) | |
| (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq (a, b, c, d, e, f, g) | |
| (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) => Eq (a, b, c, d, e, f, g, h) | |
| (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) => Eq (a, b, c, d, e, f, g, h, i) | |
| (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j) => Eq (a, b, c, d, e, f, g, h, i, j) | |
| (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k) => Eq (a, b, c, d, e, f, g, h, i, j, k) | |
| (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l) => Eq (a, b, c, d, e, f, g, h, i, j, k, l) | |
| (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m) | |
| (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | |
| (Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | |
class Fractional a => Floating a where #
Trigonometric and hyperbolic functions and related functions.
The Haskell Report defines no laws for Floating. However, (, +)(
and *)exp are customarily expected to define an exponential field and have
the following properties:
exp (a + b)=exp a * exp bexp (fromInteger 0)=fromInteger 1
Minimal complete definition
pi, exp, log, sin, cos, asin, acos, atan, sinh, cosh, asinh, acosh, atanh
Instances
| Floating Double | Since: base-2.1 |
| Floating Float | Since: base-2.1 |
| RealFloat a => Floating (Complex a) | Since: base-2.1 |
Defined in Data.Complex Methods exp :: Complex a -> Complex a # log :: Complex a -> Complex a # sqrt :: Complex a -> Complex a # (**) :: Complex a -> Complex a -> Complex a # logBase :: Complex a -> Complex a -> Complex a # sin :: Complex a -> Complex a # cos :: Complex a -> Complex a # tan :: Complex a -> Complex a # asin :: Complex a -> Complex a # acos :: Complex a -> Complex a # atan :: Complex a -> Complex a # sinh :: Complex a -> Complex a # cosh :: Complex a -> Complex a # tanh :: Complex a -> Complex a # asinh :: Complex a -> Complex a # acosh :: Complex a -> Complex a # atanh :: Complex a -> Complex a # log1p :: Complex a -> Complex a # expm1 :: Complex a -> Complex a # | |
| Floating a => Floating (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods exp :: Identity a -> Identity a # log :: Identity a -> Identity a # sqrt :: Identity a -> Identity a # (**) :: Identity a -> Identity a -> Identity a # logBase :: Identity a -> Identity a -> Identity a # sin :: Identity a -> Identity a # cos :: Identity a -> Identity a # tan :: Identity a -> Identity a # asin :: Identity a -> Identity a # acos :: Identity a -> Identity a # atan :: Identity a -> Identity a # sinh :: Identity a -> Identity a # cosh :: Identity a -> Identity a # tanh :: Identity a -> Identity a # asinh :: Identity a -> Identity a # acosh :: Identity a -> Identity a # atanh :: Identity a -> Identity a # log1p :: Identity a -> Identity a # expm1 :: Identity a -> Identity a # | |
| Floating a => Floating (Down a) | Since: base-4.14.0.0 |
| Floating a => Floating (Op a b) | |
| Floating a => Floating (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods exp :: Const a b -> Const a b # log :: Const a b -> Const a b # sqrt :: Const a b -> Const a b # (**) :: Const a b -> Const a b -> Const a b # logBase :: Const a b -> Const a b -> Const a b # sin :: Const a b -> Const a b # cos :: Const a b -> Const a b # tan :: Const a b -> Const a b # asin :: Const a b -> Const a b # acos :: Const a b -> Const a b # atan :: Const a b -> Const a b # sinh :: Const a b -> Const a b # cosh :: Const a b -> Const a b # tanh :: Const a b -> Const a b # asinh :: Const a b -> Const a b # acosh :: Const a b -> Const a b # atanh :: Const a b -> Const a b # log1p :: Const a b -> Const a b # expm1 :: Const a b -> Const a b # | |
| Floating a => Floating (Tagged s a) | |
Defined in Data.Tagged Methods exp :: Tagged s a -> Tagged s a # log :: Tagged s a -> Tagged s a # sqrt :: Tagged s a -> Tagged s a # (**) :: Tagged s a -> Tagged s a -> Tagged s a # logBase :: Tagged s a -> Tagged s a -> Tagged s a # sin :: Tagged s a -> Tagged s a # cos :: Tagged s a -> Tagged s a # tan :: Tagged s a -> Tagged s a # asin :: Tagged s a -> Tagged s a # acos :: Tagged s a -> Tagged s a # atan :: Tagged s a -> Tagged s a # sinh :: Tagged s a -> Tagged s a # cosh :: Tagged s a -> Tagged s a # tanh :: Tagged s a -> Tagged s a # asinh :: Tagged s a -> Tagged s a # acosh :: Tagged s a -> Tagged s a # atanh :: Tagged s a -> Tagged s a # log1p :: Tagged s a -> Tagged s a # expm1 :: Tagged s a -> Tagged s a # | |
class Num a => Fractional a where #
Fractional numbers, supporting real division.
The Haskell Report defines no laws for Fractional. However, ( and
+)( are customarily expected to define a division ring and have the
following properties:*)
recipgives the multiplicative inversex * recip x=recip x * x=fromInteger 1
Note that it isn't customarily expected that a type instance of
Fractional implement a field. However, all instances in base do.
Minimal complete definition
fromRational, (recip | (/))
Methods
Fractional division.
Reciprocal fraction.
fromRational :: Rational -> a #
Conversion from a Rational (that is ).
A floating literal stands for an application of Ratio IntegerfromRational
to a value of type Rational, so such literals have type
(.Fractional a) => a
Instances
| Fractional Scientific | |
Defined in Data.Scientific | |
| Fractional CoverPercentage | |
Defined in Hedgehog.Internal.Property | |
| Integral a => Fractional (Ratio a) | Since: base-2.0.1 |
| RealFloat a => Fractional (Complex a) | Since: base-2.1 |
| Fractional a => Fractional (Identity a) | Since: base-4.9.0.0 |
| Fractional a => Fractional (Down a) | Since: base-4.14.0.0 |
| Fractional a => Fractional (Op a b) | |
| Fractional a => Fractional (Const a b) | Since: base-4.9.0.0 |
| Fractional a => Fractional (Tagged s a) | |
Defined in Data.Tagged | |
class (Real a, Enum a) => Integral a where #
Integral numbers, supporting integer division.
The Haskell Report defines no laws for Integral. However, Integral
instances are customarily expected to define a Euclidean domain and have the
following properties for the div/mod and quot/rem pairs, given
suitable Euclidean functions f and g:
x=y * quot x y + rem x ywithrem x y=fromInteger 0org (rem x y)<g yx=y * div x y + mod x ywithmod x y=fromInteger 0orf (mod x y)<f y
An example of a suitable Euclidean function, for Integer's instance, is
abs.
Methods
quot :: a -> a -> a infixl 7 #
integer division truncated toward zero
integer remainder, satisfying
(x `quot` y)*y + (x `rem` y) == x
integer division truncated toward negative infinity
integer modulus, satisfying
(x `div` y)*y + (x `mod` y) == x
conversion to Integer
Instances
| Integral Int | Since: base-2.0.1 |
| Integral Int8 | Since: base-2.1 |
| Integral Int16 | Since: base-2.1 |
| Integral Int32 | Since: base-2.1 |
| Integral Int64 | Since: base-2.1 |
| Integral Integer | Since: base-2.0.1 |
Defined in GHC.Real | |
| Integral Natural | Since: base-4.8.0.0 |
Defined in GHC.Real | |
| Integral Word | Since: base-2.1 |
| Integral Word8 | Since: base-2.1 |
| Integral Word16 | Since: base-2.1 |
| Integral Word32 | Since: base-2.1 |
| Integral Word64 | Since: base-2.1 |
| Integral DiscardLimit | |
Defined in Hedgehog.Internal.Property Methods quot :: DiscardLimit -> DiscardLimit -> DiscardLimit # rem :: DiscardLimit -> DiscardLimit -> DiscardLimit # div :: DiscardLimit -> DiscardLimit -> DiscardLimit # mod :: DiscardLimit -> DiscardLimit -> DiscardLimit # quotRem :: DiscardLimit -> DiscardLimit -> (DiscardLimit, DiscardLimit) # divMod :: DiscardLimit -> DiscardLimit -> (DiscardLimit, DiscardLimit) # | |
| Integral ShrinkLimit | |
Defined in Hedgehog.Internal.Property Methods quot :: ShrinkLimit -> ShrinkLimit -> ShrinkLimit # rem :: ShrinkLimit -> ShrinkLimit -> ShrinkLimit # div :: ShrinkLimit -> ShrinkLimit -> ShrinkLimit # mod :: ShrinkLimit -> ShrinkLimit -> ShrinkLimit # quotRem :: ShrinkLimit -> ShrinkLimit -> (ShrinkLimit, ShrinkLimit) # divMod :: ShrinkLimit -> ShrinkLimit -> (ShrinkLimit, ShrinkLimit) # | |
| Integral ShrinkRetries | |
Defined in Hedgehog.Internal.Property Methods quot :: ShrinkRetries -> ShrinkRetries -> ShrinkRetries # rem :: ShrinkRetries -> ShrinkRetries -> ShrinkRetries # div :: ShrinkRetries -> ShrinkRetries -> ShrinkRetries # mod :: ShrinkRetries -> ShrinkRetries -> ShrinkRetries # quotRem :: ShrinkRetries -> ShrinkRetries -> (ShrinkRetries, ShrinkRetries) # divMod :: ShrinkRetries -> ShrinkRetries -> (ShrinkRetries, ShrinkRetries) # | |
| Integral TestLimit | |
Defined in Hedgehog.Internal.Property Methods quot :: TestLimit -> TestLimit -> TestLimit # rem :: TestLimit -> TestLimit -> TestLimit # div :: TestLimit -> TestLimit -> TestLimit # mod :: TestLimit -> TestLimit -> TestLimit # quotRem :: TestLimit -> TestLimit -> (TestLimit, TestLimit) # divMod :: TestLimit -> TestLimit -> (TestLimit, TestLimit) # | |
| Integral DiscardCount | |
Defined in Hedgehog.Internal.Property Methods quot :: DiscardCount -> DiscardCount -> DiscardCount # rem :: DiscardCount -> DiscardCount -> DiscardCount # div :: DiscardCount -> DiscardCount -> DiscardCount # mod :: DiscardCount -> DiscardCount -> DiscardCount # quotRem :: DiscardCount -> DiscardCount -> (DiscardCount, DiscardCount) # divMod :: DiscardCount -> DiscardCount -> (DiscardCount, DiscardCount) # | |
| Integral PropertyCount | |
Defined in Hedgehog.Internal.Property Methods quot :: PropertyCount -> PropertyCount -> PropertyCount # rem :: PropertyCount -> PropertyCount -> PropertyCount # div :: PropertyCount -> PropertyCount -> PropertyCount # mod :: PropertyCount -> PropertyCount -> PropertyCount # quotRem :: PropertyCount -> PropertyCount -> (PropertyCount, PropertyCount) # divMod :: PropertyCount -> PropertyCount -> (PropertyCount, PropertyCount) # | |
| Integral ShrinkCount | |
Defined in Hedgehog.Internal.Property Methods quot :: ShrinkCount -> ShrinkCount -> ShrinkCount # rem :: ShrinkCount -> ShrinkCount -> ShrinkCount # div :: ShrinkCount -> ShrinkCount -> ShrinkCount # mod :: ShrinkCount -> ShrinkCount -> ShrinkCount # quotRem :: ShrinkCount -> ShrinkCount -> (ShrinkCount, ShrinkCount) # divMod :: ShrinkCount -> ShrinkCount -> (ShrinkCount, ShrinkCount) # | |
| Integral TestCount | |
Defined in Hedgehog.Internal.Property Methods quot :: TestCount -> TestCount -> TestCount # rem :: TestCount -> TestCount -> TestCount # div :: TestCount -> TestCount -> TestCount # mod :: TestCount -> TestCount -> TestCount # quotRem :: TestCount -> TestCount -> (TestCount, TestCount) # divMod :: TestCount -> TestCount -> (TestCount, TestCount) # | |
| Integral a => Integral (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods quot :: Identity a -> Identity a -> Identity a # rem :: Identity a -> Identity a -> Identity a # div :: Identity a -> Identity a -> Identity a # mod :: Identity a -> Identity a -> Identity a # quotRem :: Identity a -> Identity a -> (Identity a, Identity a) # divMod :: Identity a -> Identity a -> (Identity a, Identity a) # | |
| Integral a => Integral (Down a) | Since: base-4.14.0.0 |
| Integral a => Integral (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods quot :: Const a b -> Const a b -> Const a b # rem :: Const a b -> Const a b -> Const a b # div :: Const a b -> Const a b -> Const a b # mod :: Const a b -> Const a b -> Const a b # quotRem :: Const a b -> Const a b -> (Const a b, Const a b) # divMod :: Const a b -> Const a b -> (Const a b, Const a b) # | |
| Integral a => Integral (Tagged s a) | |
Defined in Data.Tagged Methods quot :: Tagged s a -> Tagged s a -> Tagged s a # rem :: Tagged s a -> Tagged s a -> Tagged s a # div :: Tagged s a -> Tagged s a -> Tagged s a # mod :: Tagged s a -> Tagged s a -> Tagged s a # quotRem :: Tagged s a -> Tagged s a -> (Tagged s a, Tagged s a) # divMod :: Tagged s a -> Tagged s a -> (Tagged s a, Tagged s a) # | |
class Applicative m => Monad (m :: Type -> Type) where #
The Monad class defines the basic operations over a monad,
a concept from a branch of mathematics known as category theory.
From the perspective of a Haskell programmer, however, it is best to
think of a monad as an abstract datatype of actions.
Haskell's do expressions provide a convenient syntax for writing
monadic expressions.
Instances of Monad should satisfy the following:
- Left identity
returna>>=k = k a- Right identity
m>>=return= m- Associativity
m>>=(\x -> k x>>=h) = (m>>=k)>>=h
Furthermore, the Monad and Applicative operations should relate as follows:
The above laws imply:
and that pure and (<*>) satisfy the applicative functor laws.
The instances of Monad for lists, Maybe and IO
defined in the Prelude satisfy these laws.
Minimal complete definition
Methods
(>>=) :: m a -> (a -> m b) -> m b infixl 1 #
Sequentially compose two actions, passing any value produced by the first as an argument to the second.
'as ' can be understood as the >>= bsdo expression
do a <- as bs a
(>>) :: m a -> m b -> m b infixl 1 #
Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages.
'as ' can be understood as the >> bsdo expression
do as bs
Inject a value into the monadic type.
Instances
| Monad [] | Since: base-2.1 |
| Monad Maybe | Since: base-2.1 |
| Monad IO | Since: base-2.1 |
| Monad Par1 | Since: base-4.9.0.0 |
| Monad Q | |
| Monad Complex | Since: base-4.9.0.0 |
| Monad Min | Since: base-4.9.0.0 |
| Monad Max | Since: base-4.9.0.0 |
| Monad First | Since: base-4.9.0.0 |
| Monad Last | Since: base-4.9.0.0 |
| Monad Option | Since: base-4.9.0.0 |
| Monad Identity | Since: base-4.8.0.0 |
| Monad STM | Since: base-4.3.0.0 |
| Monad First | Since: base-4.8.0.0 |
| Monad Last | Since: base-4.8.0.0 |
| Monad Dual | Since: base-4.8.0.0 |
| Monad Sum | Since: base-4.8.0.0 |
| Monad Product | Since: base-4.8.0.0 |
| Monad Down | Since: base-4.11.0.0 |
| Monad ReadP | Since: base-2.1 |
| Monad NonEmpty | Since: base-4.9.0.0 |
| Monad Tree | |
| Monad Seq | |
| Monad P | Since: base-2.1 |
| Monad Vector | |
| Monad Array | |
| Monad SmallArray | |
| Monad DList | |
| Monad IResult | |
| Monad Parser | |
| Monad Result | |
| Monad (Either e) | Since: base-4.4.0.0 |
| Monad (U1 :: Type -> Type) | Since: base-4.9.0.0 |
| Monoid a => Monad ((,) a) | Since: base-4.9.0.0 |
| Monad (ST s) | Since: base-2.1 |
| Monad m => Monad (WrappedMonad m) | Since: base-4.7.0.0 |
Defined in Control.Applicative Methods (>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b # (>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # return :: a -> WrappedMonad m a # | |
| ArrowApply a => Monad (ArrowMonad a) | Since: base-2.1 |
Defined in Control.Arrow Methods (>>=) :: ArrowMonad a a0 -> (a0 -> ArrowMonad a b) -> ArrowMonad a b # (>>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b # return :: a0 -> ArrowMonad a a0 # | |
| Monad (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
| Monad m => Monad (MaybeT m) | |
| Monad m => Monad (ListT m) | |
| Monad (Sem f) | |
| Monad (Parser i) | |
| Monad m => Monad (GenT m) | |
| Monad m => Monad (PropertyT m) | |
| Monad m => Monad (TestT m) | |
| Monad m => Monad (NodeT m) | |
| Monad m => Monad (TreeT m) | |
| Monad m => Monad (ResourceT m) | |
| Monad (SetM s) | |
| Monad f => Monad (Rec1 f) | Since: base-4.9.0.0 |
| (Monoid a, Monoid b) => Monad ((,,) a b) | Since: base-4.14.0.0 |
| Monad m => Monad (Kleisli m a) | Since: base-4.14.0.0 |
| Monad f => Monad (Ap f) | Since: base-4.12.0.0 |
| Monad f => Monad (Alt f) | Since: base-4.8.0.0 |
| (Applicative f, Monad f) => Monad (WhenMissing f x) | Equivalent to Since: containers-0.5.9 |
Defined in Data.IntMap.Internal Methods (>>=) :: WhenMissing f x a -> (a -> WhenMissing f x b) -> WhenMissing f x b # (>>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b # return :: a -> WhenMissing f x a # | |
| Monad m => Monad (ExceptT e m) | |
| Monad m => Monad (IdentityT m) | |
| (Monad m, Error e) => Monad (ErrorT e m) | |
| Monad m => Monad (ReaderT r m) | |
| Monad m => Monad (StateT s m) | |
| Monad m => Monad (StateT s m) | |
| (Monoid w, Monad m) => Monad (WriterT w m) | |
| (Monoid w, Monad m) => Monad (WriterT w m) | |
| Monad (Tagged s) | |
| Monad ((->) r :: Type -> Type) | Since: base-2.1 |
| (Monad f, Monad g) => Monad (f :*: g) | Since: base-4.9.0.0 |
| (Monoid a, Monoid b, Monoid c) => Monad ((,,,) a b c) | Since: base-4.14.0.0 |
| (Monad f, Monad g) => Monad (Product f g) | Since: base-4.9.0.0 |
| (Monad f, Applicative f) => Monad (WhenMatched f x y) | Equivalent to Since: containers-0.5.9 |
Defined in Data.IntMap.Internal Methods (>>=) :: WhenMatched f x y a -> (a -> WhenMatched f x y b) -> WhenMatched f x y b # (>>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b # return :: a -> WhenMatched f x y a # | |
| (Applicative f, Monad f) => Monad (WhenMissing f k x) | Equivalent to Since: containers-0.5.9 |
Defined in Data.Map.Internal Methods (>>=) :: WhenMissing f k x a -> (a -> WhenMissing f k x b) -> WhenMissing f k x b # (>>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b # return :: a -> WhenMissing f k x a # | |
| Monad (ContT r m) | |
| Monad f => Monad (M1 i c f) | Since: base-4.9.0.0 |
| (Monad f, Applicative f) => Monad (WhenMatched f k x y) | Equivalent to Since: containers-0.5.9 |
Defined in Data.Map.Internal Methods (>>=) :: WhenMatched f k x y a -> (a -> WhenMatched f k x y b) -> WhenMatched f k x y b # (>>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b # return :: a -> WhenMatched f k x y a # | |
| (Monoid w, Monad m) => Monad (RWST r w s m) | |
| (Monoid w, Monad m) => Monad (RWST r w s m) | |
class Functor (f :: Type -> Type) where #
A type f is a Functor if it provides a function fmap which, given any types a and b
lets you apply any function from (a -> b) to turn an f a into an f b, preserving the
structure of f. Furthermore f needs to adhere to the following:
Note, that the second law follows from the free theorem of the type fmap and
the first law, so you need only check that the former condition holds.
Minimal complete definition
Methods
fmap :: (a -> b) -> f a -> f b #
Using ApplicativeDo: '' can be understood as
the fmap f asdo expression
do a <- as pure (f a)
with an inferred Functor constraint.
Instances
Basic numeric class.
The Haskell Report defines no laws for Num. However, ( and +)( are
customarily expected to define a ring and have the following properties:*)
- Associativity of
(+) (x + y) + z=x + (y + z)- Commutativity of
(+) x + y=y + xis the additive identityfromInteger0x + fromInteger 0=xnegategives the additive inversex + negate x=fromInteger 0- Associativity of
(*) (x * y) * z=x * (y * z)is the multiplicative identityfromInteger1x * fromInteger 1=xandfromInteger 1 * x=x- Distributivity of
(with respect to*)(+) a * (b + c)=(a * b) + (a * c)and(b + c) * a=(b * a) + (c * a)
Note that it isn't customarily expected that a type instance of both Num
and Ord implement an ordered ring. Indeed, in base only Integer and
Rational do.
Methods
Unary negation.
Absolute value.
Sign of a number.
The functions abs and signum should satisfy the law:
abs x * signum x == x
For real numbers, the signum is either -1 (negative), 0 (zero)
or 1 (positive).
fromInteger :: Integer -> a #
Conversion from an Integer.
An integer literal represents the application of the function
fromInteger to the appropriate value of type Integer,
so such literals have type (.Num a) => a
Instances
| Num Int | Since: base-2.1 |
| Num Int8 | Since: base-2.1 |
| Num Int16 | Since: base-2.1 |
| Num Int32 | Since: base-2.1 |
| Num Int64 | Since: base-2.1 |
| Num Integer | Since: base-2.1 |
| Num Natural | Note that Since: base-4.8.0.0 |
| Num Word | Since: base-2.1 |
| Num Word8 | Since: base-2.1 |
| Num Word16 | Since: base-2.1 |
| Num Word32 | Since: base-2.1 |
| Num Word64 | Since: base-2.1 |
| Num CodePoint | |
Defined in Data.Text.Encoding | |
| Num DecoderState | |
Defined in Data.Text.Encoding Methods (+) :: DecoderState -> DecoderState -> DecoderState # (-) :: DecoderState -> DecoderState -> DecoderState # (*) :: DecoderState -> DecoderState -> DecoderState # negate :: DecoderState -> DecoderState # abs :: DecoderState -> DecoderState # signum :: DecoderState -> DecoderState # fromInteger :: Integer -> DecoderState # | |
| Num Pos | |
| Num Scientific | |
Defined in Data.Scientific | |
| Num Confidence | |
Defined in Hedgehog.Internal.Property | |
| Num DiscardLimit | |
Defined in Hedgehog.Internal.Property Methods (+) :: DiscardLimit -> DiscardLimit -> DiscardLimit # (-) :: DiscardLimit -> DiscardLimit -> DiscardLimit # (*) :: DiscardLimit -> DiscardLimit -> DiscardLimit # negate :: DiscardLimit -> DiscardLimit # abs :: DiscardLimit -> DiscardLimit # signum :: DiscardLimit -> DiscardLimit # fromInteger :: Integer -> DiscardLimit # | |
| Num ShrinkLimit | |
Defined in Hedgehog.Internal.Property Methods (+) :: ShrinkLimit -> ShrinkLimit -> ShrinkLimit # (-) :: ShrinkLimit -> ShrinkLimit -> ShrinkLimit # (*) :: ShrinkLimit -> ShrinkLimit -> ShrinkLimit # negate :: ShrinkLimit -> ShrinkLimit # abs :: ShrinkLimit -> ShrinkLimit # signum :: ShrinkLimit -> ShrinkLimit # fromInteger :: Integer -> ShrinkLimit # | |
| Num ShrinkRetries | |
Defined in Hedgehog.Internal.Property Methods (+) :: ShrinkRetries -> ShrinkRetries -> ShrinkRetries # (-) :: ShrinkRetries -> ShrinkRetries -> ShrinkRetries # (*) :: ShrinkRetries -> ShrinkRetries -> ShrinkRetries # negate :: ShrinkRetries -> ShrinkRetries # abs :: ShrinkRetries -> ShrinkRetries # signum :: ShrinkRetries -> ShrinkRetries # fromInteger :: Integer -> ShrinkRetries # | |
| Num TestLimit | |
Defined in Hedgehog.Internal.Property | |
| Num CoverCount | |
Defined in Hedgehog.Internal.Property | |
| Num CoverPercentage | |
Defined in Hedgehog.Internal.Property Methods (+) :: CoverPercentage -> CoverPercentage -> CoverPercentage # (-) :: CoverPercentage -> CoverPercentage -> CoverPercentage # (*) :: CoverPercentage -> CoverPercentage -> CoverPercentage # negate :: CoverPercentage -> CoverPercentage # abs :: CoverPercentage -> CoverPercentage # signum :: CoverPercentage -> CoverPercentage # fromInteger :: Integer -> CoverPercentage # | |
| Num DiscardCount | |
Defined in Hedgehog.Internal.Property Methods (+) :: DiscardCount -> DiscardCount -> DiscardCount # (-) :: DiscardCount -> DiscardCount -> DiscardCount # (*) :: DiscardCount -> DiscardCount -> DiscardCount # negate :: DiscardCount -> DiscardCount # abs :: DiscardCount -> DiscardCount # signum :: DiscardCount -> DiscardCount # fromInteger :: Integer -> DiscardCount # | |
| Num PropertyCount | |
Defined in Hedgehog.Internal.Property Methods (+) :: PropertyCount -> PropertyCount -> PropertyCount # (-) :: PropertyCount -> PropertyCount -> PropertyCount # (*) :: PropertyCount -> PropertyCount -> PropertyCount # negate :: PropertyCount -> PropertyCount # abs :: PropertyCount -> PropertyCount # signum :: PropertyCount -> PropertyCount # fromInteger :: Integer -> PropertyCount # | |
| Num ShrinkCount | |
Defined in Hedgehog.Internal.Property Methods (+) :: ShrinkCount -> ShrinkCount -> ShrinkCount # (-) :: ShrinkCount -> ShrinkCount -> ShrinkCount # (*) :: ShrinkCount -> ShrinkCount -> ShrinkCount # negate :: ShrinkCount -> ShrinkCount # abs :: ShrinkCount -> ShrinkCount # signum :: ShrinkCount -> ShrinkCount # fromInteger :: Integer -> ShrinkCount # | |
| Num TestCount | |
Defined in Hedgehog.Internal.Property | |
| Num TimeSpec | |
| Integral a => Num (Ratio a) | Since: base-2.0.1 |
| RealFloat a => Num (Complex a) | Since: base-2.1 |
| Num a => Num (Min a) | Since: base-4.9.0.0 |
| Num a => Num (Max a) | Since: base-4.9.0.0 |
| Num a => Num (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity | |
| Num a => Num (Sum a) | Since: base-4.7.0.0 |
| Num a => Num (Product a) | Since: base-4.7.0.0 |
Defined in Data.Semigroup.Internal | |
| Num a => Num (Down a) | Since: base-4.11.0.0 |
| Num a => Num (Op a b) | |
| Num a => Num (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const | |
| (Applicative f, Num a) => Num (Ap f a) | Since: base-4.12.0.0 |
| Num (f a) => Num (Alt f a) | Since: base-4.8.0.0 |
| Num a => Num (Tagged s a) | |
Defined in Data.Tagged | |
The Ord class is used for totally ordered datatypes.
Instances of Ord can be derived for any user-defined datatype whose
constituent types are in Ord. The declared order of the constructors in
the data declaration determines the ordering in derived Ord instances. The
Ordering datatype allows a single comparison to determine the precise
ordering of two objects.
The Haskell Report defines no laws for Ord. However, <= is customarily
expected to implement a non-strict partial order and have the following
properties:
- Transitivity
- if
x <= y && y <= z=True, thenx <= z=True - Reflexivity
x <= x=True- Antisymmetry
- if
x <= y && y <= x=True, thenx == y=True
Note that the following operator interactions are expected to hold:
x >= y=y <= xx < y=x <= y && x /= yx > y=y < xx < y=compare x y == LTx > y=compare x y == GTx == y=compare x y == EQmin x y == if x <= y then x else y=Truemax x y == if x >= y then x else y=True
Note that (7.) and (8.) do not require min and max to return either of
their arguments. The result is merely required to equal one of the
arguments in terms of (==).
Minimal complete definition: either compare or <=.
Using compare can be more efficient for complex types.
Methods
compare :: a -> a -> Ordering #
(<) :: a -> a -> Bool infix 4 #
(<=) :: a -> a -> Bool infix 4 #
(>) :: a -> a -> Bool infix 4 #
Instances
| Ord Bool | |
| Ord Char | |
| Ord Double | Note that due to the presence of
Also note that, due to the same,
|
| Ord Float | Note that due to the presence of
Also note that, due to the same,
|
| Ord Int | |
| Ord Int8 | Since: base-2.1 |
| Ord Int16 | Since: base-2.1 |
| Ord Int32 | Since: base-2.1 |
| Ord Int64 | Since: base-2.1 |
| Ord Integer | |
| Ord Natural | Since: base-4.8.0.0 |
| Ord Ordering | |
Defined in GHC.Classes | |
| Ord Word | |
| Ord Word8 | Since: base-2.1 |
| Ord Word16 | Since: base-2.1 |
| Ord Word32 | Since: base-2.1 |
| Ord Word64 | Since: base-2.1 |
| Ord SomeTypeRep | |
Defined in Data.Typeable.Internal Methods compare :: SomeTypeRep -> SomeTypeRep -> Ordering # (<) :: SomeTypeRep -> SomeTypeRep -> Bool # (<=) :: SomeTypeRep -> SomeTypeRep -> Bool # (>) :: SomeTypeRep -> SomeTypeRep -> Bool # (>=) :: SomeTypeRep -> SomeTypeRep -> Bool # max :: SomeTypeRep -> SomeTypeRep -> SomeTypeRep # min :: SomeTypeRep -> SomeTypeRep -> SomeTypeRep # | |
| Ord Exp | |
| Ord Match | |
| Ord Clause | |
| Ord Pat | |
| Ord Type | |
| Ord Dec | |
| Ord Name | |
| Ord FunDep | |
| Ord InjectivityAnn | |
Defined in Language.Haskell.TH.Syntax Methods compare :: InjectivityAnn -> InjectivityAnn -> Ordering # (<) :: InjectivityAnn -> InjectivityAnn -> Bool # (<=) :: InjectivityAnn -> InjectivityAnn -> Bool # (>) :: InjectivityAnn -> InjectivityAnn -> Bool # (>=) :: InjectivityAnn -> InjectivityAnn -> Bool # max :: InjectivityAnn -> InjectivityAnn -> InjectivityAnn # min :: InjectivityAnn -> InjectivityAnn -> InjectivityAnn # | |
| Ord Overlap | |
Defined in Language.Haskell.TH.Syntax | |
| Ord () | |
| Ord TyCon | |
| Ord BigNat | |
| Ord Void | Since: base-4.8.0.0 |
| Ord Version | Since: base-2.1 |
| Ord ThreadId | Since: base-4.2.0.0 |
Defined in GHC.Conc.Sync | |
| Ord BlockReason | Since: base-4.3.0.0 |
Defined in GHC.Conc.Sync Methods compare :: BlockReason -> BlockReason -> Ordering # (<) :: BlockReason -> BlockReason -> Bool # (<=) :: BlockReason -> BlockReason -> Bool # (>) :: BlockReason -> BlockReason -> Bool # (>=) :: BlockReason -> BlockReason -> Bool # max :: BlockReason -> BlockReason -> BlockReason # min :: BlockReason -> BlockReason -> BlockReason # | |
| Ord ThreadStatus | Since: base-4.3.0.0 |
Defined in GHC.Conc.Sync Methods compare :: ThreadStatus -> ThreadStatus -> Ordering # (<) :: ThreadStatus -> ThreadStatus -> Bool # (<=) :: ThreadStatus -> ThreadStatus -> Bool # (>) :: ThreadStatus -> ThreadStatus -> Bool # (>=) :: ThreadStatus -> ThreadStatus -> Bool # max :: ThreadStatus -> ThreadStatus -> ThreadStatus # min :: ThreadStatus -> ThreadStatus -> ThreadStatus # | |
| Ord AsyncException | Since: base-4.2.0.0 |
Defined in GHC.IO.Exception Methods compare :: AsyncException -> AsyncException -> Ordering # (<) :: AsyncException -> AsyncException -> Bool # (<=) :: AsyncException -> AsyncException -> Bool # (>) :: AsyncException -> AsyncException -> Bool # (>=) :: AsyncException -> AsyncException -> Bool # max :: AsyncException -> AsyncException -> AsyncException # min :: AsyncException -> AsyncException -> AsyncException # | |
| Ord ArrayException | Since: base-4.2.0.0 |
Defined in GHC.IO.Exception Methods compare :: ArrayException -> ArrayException -> Ordering # (<) :: ArrayException -> ArrayException -> Bool # (<=) :: ArrayException -> ArrayException -> Bool # (>) :: ArrayException -> ArrayException -> Bool # (>=) :: ArrayException -> ArrayException -> Bool # max :: ArrayException -> ArrayException -> ArrayException # min :: ArrayException -> ArrayException -> ArrayException # | |
| Ord ExitCode | |
Defined in GHC.IO.Exception | |
| Ord BufferMode | Since: base-4.2.0.0 |
Defined in GHC.IO.Handle.Types Methods compare :: BufferMode -> BufferMode -> Ordering # (<) :: BufferMode -> BufferMode -> Bool # (<=) :: BufferMode -> BufferMode -> Bool # (>) :: BufferMode -> BufferMode -> Bool # (>=) :: BufferMode -> BufferMode -> Bool # max :: BufferMode -> BufferMode -> BufferMode # min :: BufferMode -> BufferMode -> BufferMode # | |
| Ord Newline | Since: base-4.3.0.0 |
| Ord NewlineMode | Since: base-4.3.0.0 |
Defined in GHC.IO.Handle.Types Methods compare :: NewlineMode -> NewlineMode -> Ordering # (<) :: NewlineMode -> NewlineMode -> Bool # (<=) :: NewlineMode -> NewlineMode -> Bool # (>) :: NewlineMode -> NewlineMode -> Bool # (>=) :: NewlineMode -> NewlineMode -> Bool # max :: NewlineMode -> NewlineMode -> NewlineMode # min :: NewlineMode -> NewlineMode -> NewlineMode # | |
| Ord ErrorCall | Since: base-4.7.0.0 |
| Ord ArithException | Since: base-3.0 |
Defined in GHC.Exception.Type Methods compare :: ArithException -> ArithException -> Ordering # (<) :: ArithException -> ArithException -> Bool # (<=) :: ArithException -> ArithException -> Bool # (>) :: ArithException -> ArithException -> Bool # (>=) :: ArithException -> ArithException -> Bool # max :: ArithException -> ArithException -> ArithException # min :: ArithException -> ArithException -> ArithException # | |
| Ord All | Since: base-2.1 |
| Ord Any | Since: base-2.1 |
| Ord Fixity | Since: base-4.6.0.0 |
| Ord Associativity | Since: base-4.6.0.0 |
Defined in GHC.Generics Methods compare :: Associativity -> Associativity -> Ordering # (<) :: Associativity -> Associativity -> Bool # (<=) :: Associativity -> Associativity -> Bool # (>) :: Associativity -> Associativity -> Bool # (>=) :: Associativity -> Associativity -> Bool # max :: Associativity -> Associativity -> Associativity # min :: Associativity -> Associativity -> Associativity # | |
| Ord SourceUnpackedness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods compare :: SourceUnpackedness -> SourceUnpackedness -> Ordering # (<) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (<=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (>) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (>=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # max :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness # min :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness # | |
| Ord SourceStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods compare :: SourceStrictness -> SourceStrictness -> Ordering # (<) :: SourceStrictness -> SourceStrictness -> Bool # (<=) :: SourceStrictness -> SourceStrictness -> Bool # (>) :: SourceStrictness -> SourceStrictness -> Bool # (>=) :: SourceStrictness -> SourceStrictness -> Bool # max :: SourceStrictness -> SourceStrictness -> SourceStrictness # min :: SourceStrictness -> SourceStrictness -> SourceStrictness # | |
| Ord DecidedStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods compare :: DecidedStrictness -> DecidedStrictness -> Ordering # (<) :: DecidedStrictness -> DecidedStrictness -> Bool # (<=) :: DecidedStrictness -> DecidedStrictness -> Bool # (>) :: DecidedStrictness -> DecidedStrictness -> Bool # (>=) :: DecidedStrictness -> DecidedStrictness -> Bool # max :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness # min :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness # | |
| Ord SomeSymbol | Since: base-4.7.0.0 |
Defined in GHC.TypeLits Methods compare :: SomeSymbol -> SomeSymbol -> Ordering # (<) :: SomeSymbol -> SomeSymbol -> Bool # (<=) :: SomeSymbol -> SomeSymbol -> Bool # (>) :: SomeSymbol -> SomeSymbol -> Bool # (>=) :: SomeSymbol -> SomeSymbol -> Bool # max :: SomeSymbol -> SomeSymbol -> SomeSymbol # min :: SomeSymbol -> SomeSymbol -> SomeSymbol # | |
| Ord SomeNat | Since: base-4.7.0.0 |
| Ord IOMode | Since: base-4.2.0.0 |
| Ord ShortByteString | |
Defined in Data.ByteString.Short.Internal Methods compare :: ShortByteString -> ShortByteString -> Ordering # (<) :: ShortByteString -> ShortByteString -> Bool # (<=) :: ShortByteString -> ShortByteString -> Bool # (>) :: ShortByteString -> ShortByteString -> Bool # (>=) :: ShortByteString -> ShortByteString -> Bool # max :: ShortByteString -> ShortByteString -> ShortByteString # min :: ShortByteString -> ShortByteString -> ShortByteString # | |
| Ord ByteString | |
Defined in Data.ByteString.Internal Methods compare :: ByteString -> ByteString -> Ordering # (<) :: ByteString -> ByteString -> Bool # (<=) :: ByteString -> ByteString -> Bool # (>) :: ByteString -> ByteString -> Bool # (>=) :: ByteString -> ByteString -> Bool # max :: ByteString -> ByteString -> ByteString # min :: ByteString -> ByteString -> ByteString # | |
| Ord IntSet | |
| Ord TyVarBndr | |
| Ord ModName | |
Defined in Language.Haskell.TH.Syntax | |
| Ord PkgName | |
Defined in Language.Haskell.TH.Syntax | |
| Ord Module | |
| Ord OccName | |
Defined in Language.Haskell.TH.Syntax | |
| Ord NameFlavour | |
Defined in Language.Haskell.TH.Syntax Methods compare :: NameFlavour -> NameFlavour -> Ordering # (<) :: NameFlavour -> NameFlavour -> Bool # (<=) :: NameFlavour -> NameFlavour -> Bool # (>) :: NameFlavour -> NameFlavour -> Bool # (>=) :: NameFlavour -> NameFlavour -> Bool # max :: NameFlavour -> NameFlavour -> NameFlavour # min :: NameFlavour -> NameFlavour -> NameFlavour # | |
| Ord NameSpace | |
| Ord Loc | |
| Ord Info | |
| Ord ModuleInfo | |
Defined in Language.Haskell.TH.Syntax Methods compare :: ModuleInfo -> ModuleInfo -> Ordering # (<) :: ModuleInfo -> ModuleInfo -> Bool # (<=) :: ModuleInfo -> ModuleInfo -> Bool # (>) :: ModuleInfo -> ModuleInfo -> Bool # (>=) :: ModuleInfo -> ModuleInfo -> Bool # max :: ModuleInfo -> ModuleInfo -> ModuleInfo # min :: ModuleInfo -> ModuleInfo -> ModuleInfo # | |
| Ord Fixity | |
| Ord FixityDirection | |
Defined in Language.Haskell.TH.Syntax Methods compare :: FixityDirection -> FixityDirection -> Ordering # (<) :: FixityDirection -> FixityDirection -> Bool # (<=) :: FixityDirection -> FixityDirection -> Bool # (>) :: FixityDirection -> FixityDirection -> Bool # (>=) :: FixityDirection -> FixityDirection -> Bool # max :: FixityDirection -> FixityDirection -> FixityDirection # min :: FixityDirection -> FixityDirection -> FixityDirection # | |
| Ord Lit | |
| Ord Bytes | |
| Ord Body | |
| Ord Guard | |
| Ord Stmt | |
| Ord Range | |
| Ord DerivClause | |
Defined in Language.Haskell.TH.Syntax Methods compare :: DerivClause -> DerivClause -> Ordering # (<) :: DerivClause -> DerivClause -> Bool # (<=) :: DerivClause -> DerivClause -> Bool # (>) :: DerivClause -> DerivClause -> Bool # (>=) :: DerivClause -> DerivClause -> Bool # max :: DerivClause -> DerivClause -> DerivClause # min :: DerivClause -> DerivClause -> DerivClause # | |
| Ord DerivStrategy | |
Defined in Language.Haskell.TH.Syntax Methods compare :: DerivStrategy -> DerivStrategy -> Ordering # (<) :: DerivStrategy -> DerivStrategy -> Bool # (<=) :: DerivStrategy -> DerivStrategy -> Bool # (>) :: DerivStrategy -> DerivStrategy -> Bool # (>=) :: DerivStrategy -> DerivStrategy -> Bool # max :: DerivStrategy -> DerivStrategy -> DerivStrategy # min :: DerivStrategy -> DerivStrategy -> DerivStrategy # | |
| Ord TypeFamilyHead | |
Defined in Language.Haskell.TH.Syntax Methods compare :: TypeFamilyHead -> TypeFamilyHead -> Ordering # (<) :: TypeFamilyHead -> TypeFamilyHead -> Bool # (<=) :: TypeFamilyHead -> TypeFamilyHead -> Bool # (>) :: TypeFamilyHead -> TypeFamilyHead -> Bool # (>=) :: TypeFamilyHead -> TypeFamilyHead -> Bool # max :: TypeFamilyHead -> TypeFamilyHead -> TypeFamilyHead # min :: TypeFamilyHead -> TypeFamilyHead -> TypeFamilyHead # | |
| Ord TySynEqn | |
Defined in Language.Haskell.TH.Syntax | |
| Ord Foreign | |
Defined in Language.Haskell.TH.Syntax | |
| Ord Callconv | |
Defined in Language.Haskell.TH.Syntax | |
| Ord Safety | |
| Ord Pragma | |
| Ord Inline | |
| Ord RuleMatch | |
| Ord Phases | |
| Ord RuleBndr | |
Defined in Language.Haskell.TH.Syntax | |
| Ord AnnTarget | |
| Ord SourceUnpackedness | |
Defined in Language.Haskell.TH.Syntax Methods compare :: SourceUnpackedness -> SourceUnpackedness -> Ordering # (<) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (<=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (>) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (>=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # max :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness # min :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness # | |
| Ord SourceStrictness | |
Defined in Language.Haskell.TH.Syntax Methods compare :: SourceStrictness -> SourceStrictness -> Ordering # (<) :: SourceStrictness -> SourceStrictness -> Bool # (<=) :: SourceStrictness -> SourceStrictness -> Bool # (>) :: SourceStrictness -> SourceStrictness -> Bool # (>=) :: SourceStrictness -> SourceStrictness -> Bool # max :: SourceStrictness -> SourceStrictness -> SourceStrictness # min :: SourceStrictness -> SourceStrictness -> SourceStrictness # | |
| Ord DecidedStrictness | |
Defined in Language.Haskell.TH.Syntax Methods compare :: DecidedStrictness -> DecidedStrictness -> Ordering # (<) :: DecidedStrictness -> DecidedStrictness -> Bool # (<=) :: DecidedStrictness -> DecidedStrictness -> Bool # (>) :: DecidedStrictness -> DecidedStrictness -> Bool # (>=) :: DecidedStrictness -> DecidedStrictness -> Bool # max :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness # min :: DecidedStrictness -> DecidedStrictness -> DecidedStrictness # | |
| Ord Con | |
| Ord Bang | |
| Ord PatSynDir | |
| Ord PatSynArgs | |
Defined in Language.Haskell.TH.Syntax Methods compare :: PatSynArgs -> PatSynArgs -> Ordering # (<) :: PatSynArgs -> PatSynArgs -> Bool # (<=) :: PatSynArgs -> PatSynArgs -> Bool # (>) :: PatSynArgs -> PatSynArgs -> Bool # (>=) :: PatSynArgs -> PatSynArgs -> Bool # max :: PatSynArgs -> PatSynArgs -> PatSynArgs # min :: PatSynArgs -> PatSynArgs -> PatSynArgs # | |
| Ord FamilyResultSig | |
Defined in Language.Haskell.TH.Syntax Methods compare :: FamilyResultSig -> FamilyResultSig -> Ordering # (<) :: FamilyResultSig -> FamilyResultSig -> Bool # (<=) :: FamilyResultSig -> FamilyResultSig -> Bool # (>) :: FamilyResultSig -> FamilyResultSig -> Bool # (>=) :: FamilyResultSig -> FamilyResultSig -> Bool # max :: FamilyResultSig -> FamilyResultSig -> FamilyResultSig # min :: FamilyResultSig -> FamilyResultSig -> FamilyResultSig # | |
| Ord TyLit | |
| Ord Role | |
| Ord AnnLookup | |
| Ord LocalTime | |
Defined in Data.Time.LocalTime.Internal.LocalTime | |
| Ord Undefined | |
| Ord SrcSpanInfo | |
Defined in Language.Haskell.Exts.SrcLoc | |
| Ord SrcLoc | |
| Ord SrcSpan | |
Defined in Language.Haskell.Exts.SrcLoc | |
| Ord ByteArray | |
| Ord ConstructorVariant | |
Defined in Language.Haskell.TH.Datatype Methods compare :: ConstructorVariant -> ConstructorVariant -> Ordering # (<) :: ConstructorVariant -> ConstructorVariant -> Bool # (<=) :: ConstructorVariant -> ConstructorVariant -> Bool # (>) :: ConstructorVariant -> ConstructorVariant -> Bool # (>=) :: ConstructorVariant -> ConstructorVariant -> Bool # max :: ConstructorVariant -> ConstructorVariant -> ConstructorVariant # min :: ConstructorVariant -> ConstructorVariant -> ConstructorVariant # | |
| Ord DatatypeVariant | |
Defined in Language.Haskell.TH.Datatype Methods compare :: DatatypeVariant -> DatatypeVariant -> Ordering # (<) :: DatatypeVariant -> DatatypeVariant -> Bool # (<=) :: DatatypeVariant -> DatatypeVariant -> Bool # (>) :: DatatypeVariant -> DatatypeVariant -> Bool # (>=) :: DatatypeVariant -> DatatypeVariant -> Bool # max :: DatatypeVariant -> DatatypeVariant -> DatatypeVariant # min :: DatatypeVariant -> DatatypeVariant -> DatatypeVariant # | |
| Ord FieldStrictness | |
Defined in Language.Haskell.TH.Datatype Methods compare :: FieldStrictness -> FieldStrictness -> Ordering # (<) :: FieldStrictness -> FieldStrictness -> Bool # (<=) :: FieldStrictness -> FieldStrictness -> Bool # (>) :: FieldStrictness -> FieldStrictness -> Bool # (>=) :: FieldStrictness -> FieldStrictness -> Bool # max :: FieldStrictness -> FieldStrictness -> FieldStrictness # min :: FieldStrictness -> FieldStrictness -> FieldStrictness # | |
| Ord Strictness | |
Defined in Language.Haskell.TH.Datatype | |
| Ord Unpackedness | |
Defined in Language.Haskell.TH.Datatype | |
| Ord Boxed | |
| Ord Tool | |
| Ord Pos | |
| Ord Scientific | |
| Ord DotNetTime | |
Defined in Data.Aeson.Types.Internal | |
| Ord JSONPathElement | |
Defined in Data.Aeson.Types.Internal Methods compare :: JSONPathElement -> JSONPathElement -> Ordering # (<) :: JSONPathElement -> JSONPathElement -> Bool # (<=) :: JSONPathElement -> JSONPathElement -> Bool # (>) :: JSONPathElement -> JSONPathElement -> Bool # (>=) :: JSONPathElement -> JSONPathElement -> Bool # max :: JSONPathElement -> JSONPathElement -> JSONPathElement # min :: JSONPathElement -> JSONPathElement -> JSONPathElement # | |
| Ord UUID | |
| Ord UnpackedUUID | |
Defined in Data.UUID.Types.Internal | |
| Ord Confidence | |
Defined in Hedgehog.Internal.Property | |
| Ord DiscardLimit | |
Defined in Hedgehog.Internal.Property | |
| Ord GroupName | |
| Ord LabelName | |
| Ord PropertyName | |
Defined in Hedgehog.Internal.Property | |
| Ord ShrinkLimit | |
Defined in Hedgehog.Internal.Property | |
| Ord ShrinkRetries | |
Defined in Hedgehog.Internal.Property Methods compare :: ShrinkRetries -> ShrinkRetries -> Ordering # (<) :: ShrinkRetries -> ShrinkRetries -> Bool # (<=) :: ShrinkRetries -> ShrinkRetries -> Bool # (>) :: ShrinkRetries -> ShrinkRetries -> Bool # (>=) :: ShrinkRetries -> ShrinkRetries -> Bool # | |
| Ord TestLimit | |
| Ord Cover | |
| Ord CoverCount | |
Defined in Hedgehog.Internal.Property | |
| Ord CoverPercentage | |
Defined in Hedgehog.Internal.Property Methods compare :: CoverPercentage -> CoverPercentage -> Ordering # (<) :: CoverPercentage -> CoverPercentage -> Bool # (<=) :: CoverPercentage -> CoverPercentage -> Bool # (>) :: CoverPercentage -> CoverPercentage -> Bool # (>=) :: CoverPercentage -> CoverPercentage -> Bool # max :: CoverPercentage -> CoverPercentage -> CoverPercentage # min :: CoverPercentage -> CoverPercentage -> CoverPercentage # | |
| Ord DiscardCount | |
Defined in Hedgehog.Internal.Property | |
| Ord PropertyConfig | |
Defined in Hedgehog.Internal.Property Methods compare :: PropertyConfig -> PropertyConfig -> Ordering # (<) :: PropertyConfig -> PropertyConfig -> Bool # (<=) :: PropertyConfig -> PropertyConfig -> Bool # (>) :: PropertyConfig -> PropertyConfig -> Bool # (>=) :: PropertyConfig -> PropertyConfig -> Bool # | |
| Ord PropertyCount | |
Defined in Hedgehog.Internal.Property Methods compare :: PropertyCount -> PropertyCount -> Ordering # (<) :: PropertyCount -> PropertyCount -> Bool # (<=) :: PropertyCount -> PropertyCount -> Bool # (>) :: PropertyCount -> PropertyCount -> Bool # (>=) :: PropertyCount -> PropertyCount -> Bool # | |
| Ord ShrinkCount | |
Defined in Hedgehog.Internal.Property | |
| Ord TerminationCriteria | |
Defined in Hedgehog.Internal.Property Methods compare :: TerminationCriteria -> TerminationCriteria -> Ordering # (<) :: TerminationCriteria -> TerminationCriteria -> Bool # (<=) :: TerminationCriteria -> TerminationCriteria -> Bool # (>) :: TerminationCriteria -> TerminationCriteria -> Bool # (>=) :: TerminationCriteria -> TerminationCriteria -> Bool # max :: TerminationCriteria -> TerminationCriteria -> TerminationCriteria # min :: TerminationCriteria -> TerminationCriteria -> TerminationCriteria # | |
| Ord TestCount | |
| Ord HedgehogDiscardLimit | |
Defined in Test.Tasty.Hedgehog Methods compare :: HedgehogDiscardLimit -> HedgehogDiscardLimit -> Ordering # (<) :: HedgehogDiscardLimit -> HedgehogDiscardLimit -> Bool # (<=) :: HedgehogDiscardLimit -> HedgehogDiscardLimit -> Bool # (>) :: HedgehogDiscardLimit -> HedgehogDiscardLimit -> Bool # (>=) :: HedgehogDiscardLimit -> HedgehogDiscardLimit -> Bool # max :: HedgehogDiscardLimit -> HedgehogDiscardLimit -> HedgehogDiscardLimit # min :: HedgehogDiscardLimit -> HedgehogDiscardLimit -> HedgehogDiscardLimit # | |
| Ord HedgehogShrinkLimit | |
Defined in Test.Tasty.Hedgehog Methods compare :: HedgehogShrinkLimit -> HedgehogShrinkLimit -> Ordering # (<) :: HedgehogShrinkLimit -> HedgehogShrinkLimit -> Bool # (<=) :: HedgehogShrinkLimit -> HedgehogShrinkLimit -> Bool # (>) :: HedgehogShrinkLimit -> HedgehogShrinkLimit -> Bool # (>=) :: HedgehogShrinkLimit -> HedgehogShrinkLimit -> Bool # max :: HedgehogShrinkLimit -> HedgehogShrinkLimit -> HedgehogShrinkLimit # min :: HedgehogShrinkLimit -> HedgehogShrinkLimit -> HedgehogShrinkLimit # | |
| Ord HedgehogShrinkRetries | |
Defined in Test.Tasty.Hedgehog Methods compare :: HedgehogShrinkRetries -> HedgehogShrinkRetries -> Ordering # (<) :: HedgehogShrinkRetries -> HedgehogShrinkRetries -> Bool # (<=) :: HedgehogShrinkRetries -> HedgehogShrinkRetries -> Bool # (>) :: HedgehogShrinkRetries -> HedgehogShrinkRetries -> Bool # (>=) :: HedgehogShrinkRetries -> HedgehogShrinkRetries -> Bool # max :: HedgehogShrinkRetries -> HedgehogShrinkRetries -> HedgehogShrinkRetries # min :: HedgehogShrinkRetries -> HedgehogShrinkRetries -> HedgehogShrinkRetries # | |
| Ord HedgehogTestLimit | |
Defined in Test.Tasty.Hedgehog Methods compare :: HedgehogTestLimit -> HedgehogTestLimit -> Ordering # (<) :: HedgehogTestLimit -> HedgehogTestLimit -> Bool # (<=) :: HedgehogTestLimit -> HedgehogTestLimit -> Bool # (>) :: HedgehogTestLimit -> HedgehogTestLimit -> Bool # (>=) :: HedgehogTestLimit -> HedgehogTestLimit -> Bool # max :: HedgehogTestLimit -> HedgehogTestLimit -> HedgehogTestLimit # min :: HedgehogTestLimit -> HedgehogTestLimit -> HedgehogTestLimit # | |
| Ord TimeSpec | |
Defined in System.Clock | |
| Ord a => Ord [a] | |
| Ord a => Ord (Maybe a) | Since: base-2.1 |
| Integral a => Ord (Ratio a) | Since: base-2.0.1 |
| Ord (Ptr a) | Since: base-2.1 |
| Ord (FunPtr a) | |
Defined in GHC.Ptr | |
| Ord p => Ord (Par1 p) | Since: base-4.7.0.0 |
| Ord a => Ord (Min a) | Since: base-4.9.0.0 |
| Ord a => Ord (Max a) | Since: base-4.9.0.0 |
| Ord a => Ord (First a) | Since: base-4.9.0.0 |
| Ord a => Ord (Last a) | Since: base-4.9.0.0 |
| Ord m => Ord (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods compare :: WrappedMonoid m -> WrappedMonoid m -> Ordering # (<) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (<=) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (>) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (>=) :: WrappedMonoid m -> WrappedMonoid m -> Bool # max :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # min :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # | |
| Ord a => Ord (Option a) | Since: base-4.9.0.0 |
Defined in Data.Semigroup | |
| Ord a => Ord (ZipList a) | Since: base-4.7.0.0 |
| Ord a => Ord (Identity a) | Since: base-4.8.0.0 |
Defined in Data.Functor.Identity | |
| Ord a => Ord (First a) | Since: base-2.1 |
| Ord a => Ord (Last a) | Since: base-2.1 |
| Ord a => Ord (Dual a) | Since: base-2.1 |
| Ord a => Ord (Sum a) | Since: base-2.1 |
| Ord a => Ord (Product a) | Since: base-2.1 |
| Ord a => Ord (Down a) | Since: base-4.6.0.0 |
| Ord a => Ord (NonEmpty a) | Since: base-4.9.0.0 |
| Ord a => Ord (IntMap a) | |
Defined in Data.IntMap.Internal | |
| Ord a => Ord (Seq a) | |
| Ord a => Ord (ViewL a) | |
Defined in Data.Sequence.Internal | |
| Ord a => Ord (ViewR a) | |
Defined in Data.Sequence.Internal | |
| Ord a => Ord (Set a) | |
| Ord a => Ord (HashSet a) | |
| Ord a => Ord (ListOf a) | |
Defined in Language.Haskell.Exts.Parser | |
| Ord l => Ord (ModuleHeadAndImports l) | |
Defined in Language.Haskell.Exts.Parser Methods compare :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> Ordering # (<) :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool # (<=) :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool # (>) :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool # (>=) :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool # max :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> ModuleHeadAndImports l # min :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> ModuleHeadAndImports l # | |
| Ord a => Ord (NonGreedy a) | |
Defined in Language.Haskell.Exts.Parser | |
| Ord l => Ord (PragmasAndModuleHead l) | |
Defined in Language.Haskell.Exts.Parser Methods compare :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> Ordering # (<) :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool # (<=) :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool # (>) :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool # (>=) :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool # max :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> PragmasAndModuleHead l # min :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> PragmasAndModuleHead l # | |
| Ord l => Ord (PragmasAndModuleName l) | |
Defined in Language.Haskell.Exts.Parser Methods compare :: PragmasAndModuleName l -> PragmasAndModuleName l -> Ordering # (<) :: PragmasAndModuleName l -> PragmasAndModuleName l -> Bool # (<=) :: PragmasAndModuleName l -> PragmasAndModuleName l -> Bool # (>) :: PragmasAndModuleName l -> PragmasAndModuleName l -> Bool # (>=) :: PragmasAndModuleName l -> PragmasAndModuleName l -> Bool # max :: PragmasAndModuleName l -> PragmasAndModuleName l -> PragmasAndModuleName l # min :: PragmasAndModuleName l -> PragmasAndModuleName l -> PragmasAndModuleName l # | |
| Ord l => Ord (ModulePragma l) | |
Defined in Language.Haskell.Exts.Syntax Methods compare :: ModulePragma l -> ModulePragma l -> Ordering # (<) :: ModulePragma l -> ModulePragma l -> Bool # (<=) :: ModulePragma l -> ModulePragma l -> Bool # (>) :: ModulePragma l -> ModulePragma l -> Bool # (>=) :: ModulePragma l -> ModulePragma l -> Bool # | |
| Ord l => Ord (ModuleHead l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (ImportDecl l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (ModuleName l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (Decl l) | |
| Ord l => Ord (Exp l) | |
| Ord l => Ord (Module l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (Pat l) | |
| Ord l => Ord (Stmt l) | |
| Ord l => Ord (Type l) | |
| Ord a => Ord (Vector a) | |
Defined in Data.Vector | |
| (Storable a, Ord a) => Ord (Vector a) | |
Defined in Data.Vector.Storable | |
| (Prim a, Ord a) => Ord (Vector a) | |
Defined in Data.Vector.Primitive | |
| Ord a => Ord (Array a) | |
Defined in Data.Primitive.Array | |
| (Ord a, Prim a) => Ord (PrimArray a) | |
Defined in Data.Primitive.PrimArray | |
| Ord a => Ord (SmallArray a) | |
Defined in Data.Primitive.SmallArray | |
| Ord a => Ord (Loc a) | |
| Ord a => Ord (Hashed a) | |
Defined in Data.Hashable.Class | |
| Ord l => Ord (Activation l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (Alt l) | |
| Ord l => Ord (Annotation l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (Assoc l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (Asst l) | |
| Ord l => Ord (BangType l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (Binds l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (BooleanFormula l) | |
Defined in Language.Haskell.Exts.Syntax Methods compare :: BooleanFormula l -> BooleanFormula l -> Ordering # (<) :: BooleanFormula l -> BooleanFormula l -> Bool # (<=) :: BooleanFormula l -> BooleanFormula l -> Bool # (>) :: BooleanFormula l -> BooleanFormula l -> Bool # (>=) :: BooleanFormula l -> BooleanFormula l -> Bool # max :: BooleanFormula l -> BooleanFormula l -> BooleanFormula l # min :: BooleanFormula l -> BooleanFormula l -> BooleanFormula l # | |
| Ord l => Ord (Bracket l) | |
| Ord l => Ord (CName l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (CallConv l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (ClassDecl l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (ConDecl l) | |
| Ord l => Ord (Context l) | |
| Ord l => Ord (DataOrNew l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (DeclHead l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (DerivStrategy l) | |
Defined in Language.Haskell.Exts.Syntax Methods compare :: DerivStrategy l -> DerivStrategy l -> Ordering # (<) :: DerivStrategy l -> DerivStrategy l -> Bool # (<=) :: DerivStrategy l -> DerivStrategy l -> Bool # (>) :: DerivStrategy l -> DerivStrategy l -> Bool # (>=) :: DerivStrategy l -> DerivStrategy l -> Bool # max :: DerivStrategy l -> DerivStrategy l -> DerivStrategy l # min :: DerivStrategy l -> DerivStrategy l -> DerivStrategy l # | |
| Ord l => Ord (Deriving l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (EWildcard l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (ExportSpec l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (ExportSpecList l) | |
Defined in Language.Haskell.Exts.Syntax Methods compare :: ExportSpecList l -> ExportSpecList l -> Ordering # (<) :: ExportSpecList l -> ExportSpecList l -> Bool # (<=) :: ExportSpecList l -> ExportSpecList l -> Bool # (>) :: ExportSpecList l -> ExportSpecList l -> Bool # (>=) :: ExportSpecList l -> ExportSpecList l -> Bool # max :: ExportSpecList l -> ExportSpecList l -> ExportSpecList l # min :: ExportSpecList l -> ExportSpecList l -> ExportSpecList l # | |
| Ord l => Ord (FieldDecl l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (FieldUpdate l) | |
Defined in Language.Haskell.Exts.Syntax Methods compare :: FieldUpdate l -> FieldUpdate l -> Ordering # (<) :: FieldUpdate l -> FieldUpdate l -> Bool # (<=) :: FieldUpdate l -> FieldUpdate l -> Bool # (>) :: FieldUpdate l -> FieldUpdate l -> Bool # (>=) :: FieldUpdate l -> FieldUpdate l -> Bool # | |
| Ord l => Ord (FunDep l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (GadtDecl l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (GuardedRhs l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (IPBind l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (IPName l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (ImportSpec l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (ImportSpecList l) | |
Defined in Language.Haskell.Exts.Syntax Methods compare :: ImportSpecList l -> ImportSpecList l -> Ordering # (<) :: ImportSpecList l -> ImportSpecList l -> Bool # (<=) :: ImportSpecList l -> ImportSpecList l -> Bool # (>) :: ImportSpecList l -> ImportSpecList l -> Bool # (>=) :: ImportSpecList l -> ImportSpecList l -> Bool # max :: ImportSpecList l -> ImportSpecList l -> ImportSpecList l # min :: ImportSpecList l -> ImportSpecList l -> ImportSpecList l # | |
| Ord l => Ord (InjectivityInfo l) | |
Defined in Language.Haskell.Exts.Syntax Methods compare :: InjectivityInfo l -> InjectivityInfo l -> Ordering # (<) :: InjectivityInfo l -> InjectivityInfo l -> Bool # (<=) :: InjectivityInfo l -> InjectivityInfo l -> Bool # (>) :: InjectivityInfo l -> InjectivityInfo l -> Bool # (>=) :: InjectivityInfo l -> InjectivityInfo l -> Bool # max :: InjectivityInfo l -> InjectivityInfo l -> InjectivityInfo l # min :: InjectivityInfo l -> InjectivityInfo l -> InjectivityInfo l # | |
| Ord l => Ord (InstDecl l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (InstHead l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (InstRule l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (Literal l) | |
| Ord l => Ord (Match l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (MaybePromotedName l) | |
Defined in Language.Haskell.Exts.Syntax Methods compare :: MaybePromotedName l -> MaybePromotedName l -> Ordering # (<) :: MaybePromotedName l -> MaybePromotedName l -> Bool # (<=) :: MaybePromotedName l -> MaybePromotedName l -> Bool # (>) :: MaybePromotedName l -> MaybePromotedName l -> Bool # (>=) :: MaybePromotedName l -> MaybePromotedName l -> Bool # max :: MaybePromotedName l -> MaybePromotedName l -> MaybePromotedName l # min :: MaybePromotedName l -> MaybePromotedName l -> MaybePromotedName l # | |
| Ord l => Ord (Name l) | |
| Ord l => Ord (Namespace l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (Op l) | |
| Ord l => Ord (Overlap l) | |
| Ord l => Ord (PXAttr l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (PatField l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (PatternSynDirection l) | |
Defined in Language.Haskell.Exts.Syntax Methods compare :: PatternSynDirection l -> PatternSynDirection l -> Ordering # (<) :: PatternSynDirection l -> PatternSynDirection l -> Bool # (<=) :: PatternSynDirection l -> PatternSynDirection l -> Bool # (>) :: PatternSynDirection l -> PatternSynDirection l -> Bool # (>=) :: PatternSynDirection l -> PatternSynDirection l -> Bool # max :: PatternSynDirection l -> PatternSynDirection l -> PatternSynDirection l # min :: PatternSynDirection l -> PatternSynDirection l -> PatternSynDirection l # | |
| Ord l => Ord (Promoted l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (QName l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (QOp l) | |
| Ord l => Ord (QualConDecl l) | |
Defined in Language.Haskell.Exts.Syntax Methods compare :: QualConDecl l -> QualConDecl l -> Ordering # (<) :: QualConDecl l -> QualConDecl l -> Bool # (<=) :: QualConDecl l -> QualConDecl l -> Bool # (>) :: QualConDecl l -> QualConDecl l -> Bool # (>=) :: QualConDecl l -> QualConDecl l -> Bool # | |
| Ord l => Ord (QualStmt l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (RPat l) | |
| Ord l => Ord (RPatOp l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (ResultSig l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (Rhs l) | |
| Ord l => Ord (Role l) | |
| Ord l => Ord (Rule l) | |
| Ord l => Ord (RuleVar l) | |
| Ord l => Ord (Safety l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (Sign l) | |
| Ord l => Ord (SpecialCon l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (Splice l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (TyVarBind l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (TypeEqn l) | |
| Ord l => Ord (Unpackedness l) | |
Defined in Language.Haskell.Exts.Syntax Methods compare :: Unpackedness l -> Unpackedness l -> Ordering # (<) :: Unpackedness l -> Unpackedness l -> Bool # (<=) :: Unpackedness l -> Unpackedness l -> Bool # (>) :: Unpackedness l -> Unpackedness l -> Bool # (>=) :: Unpackedness l -> Unpackedness l -> Bool # | |
| Ord l => Ord (WarningText l) | |
Defined in Language.Haskell.Exts.Syntax Methods compare :: WarningText l -> WarningText l -> Ordering # (<) :: WarningText l -> WarningText l -> Bool # (<=) :: WarningText l -> WarningText l -> Bool # (>) :: WarningText l -> WarningText l -> Bool # (>=) :: WarningText l -> WarningText l -> Bool # | |
| Ord l => Ord (XAttr l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord l => Ord (XName l) | |
Defined in Language.Haskell.Exts.Syntax | |
| Ord a => Ord (DList a) | |
| (Ord a, Ord b) => Ord (Either a b) | Since: base-2.1 |
| Ord (V1 p) | Since: base-4.9.0.0 |
| Ord (U1 p) | Since: base-4.7.0.0 |
| Ord (TypeRep a) | Since: base-4.4.0.0 |
| (Ord a, Ord b) => Ord (a, b) | |
| Ord a => Ord (Arg a b) | Since: base-4.9.0.0 |
| Ord (Proxy s) | Since: base-4.7.0.0 |
| (Ord k, Ord v) => Ord (Map k v) | |
| (Ord1 m, Ord a) => Ord (MaybeT m a) | |
Defined in Control.Monad.Trans.Maybe | |
| (Ord1 m, Ord a) => Ord (ListT m a) | |
| (Ord k, Ord v) => Ord (HashMap k v) | |
Defined in Data.HashMap.Base | |
| Ord (Path b t) | |
Defined in Path.Internal | |
| Ord (f p) => Ord (Rec1 f p) | Since: base-4.7.0.0 |
Defined in GHC.Generics | |
| Ord (URec (Ptr ()) p) | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods compare :: URec (Ptr ()) p -> URec (Ptr ()) p -> Ordering # (<) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # (<=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # (>) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # (>=) :: URec (Ptr ()) p -> URec (Ptr ()) p -> Bool # max :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p # min :: URec (Ptr ()) p -> URec (Ptr ()) p -> URec (Ptr ()) p # | |
| Ord (URec Char p) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| Ord (URec Double p) | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods compare :: URec Double p -> URec Double p -> Ordering # (<) :: URec Double p -> URec Double p -> Bool # (<=) :: URec Double p -> URec Double p -> Bool # (>) :: URec Double p -> URec Double p -> Bool # (>=) :: URec Double p -> URec Double p -> Bool # | |
| Ord (URec Float p) | |
Defined in GHC.Generics | |
| Ord (URec Int p) | Since: base-4.9.0.0 |
| Ord (URec Word p) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| (Ord a, Ord b, Ord c) => Ord (a, b, c) | |
| Ord a => Ord (Const a b) | Since: base-4.9.0.0 |
| Ord (f a) => Ord (Ap f a) | Since: base-4.12.0.0 |
| Ord (f a) => Ord (Alt f a) | Since: base-4.8.0.0 |
Defined in Data.Semigroup.Internal | |
| (Ord e, Ord1 m, Ord a) => Ord (ExceptT e m a) | |
Defined in Control.Monad.Trans.Except Methods compare :: ExceptT e m a -> ExceptT e m a -> Ordering # (<) :: ExceptT e m a -> ExceptT e m a -> Bool # (<=) :: ExceptT e m a -> ExceptT e m a -> Bool # (>) :: ExceptT e m a -> ExceptT e m a -> Bool # (>=) :: ExceptT e m a -> ExceptT e m a -> Bool # | |
| (Ord1 f, Ord a) => Ord (IdentityT f a) | |
Defined in Control.Monad.Trans.Identity Methods compare :: IdentityT f a -> IdentityT f a -> Ordering # (<) :: IdentityT f a -> IdentityT f a -> Bool # (<=) :: IdentityT f a -> IdentityT f a -> Bool # (>) :: IdentityT f a -> IdentityT f a -> Bool # (>=) :: IdentityT f a -> IdentityT f a -> Bool # | |
| (Ord e, Ord1 m, Ord a) => Ord (ErrorT e m a) | |
Defined in Control.Monad.Trans.Error | |
| (Ord w, Ord1 m, Ord a) => Ord (WriterT w m a) | |
Defined in Control.Monad.Trans.Writer.Lazy Methods compare :: WriterT w m a -> WriterT w m a -> Ordering # (<) :: WriterT w m a -> WriterT w m a -> Bool # (<=) :: WriterT w m a -> WriterT w m a -> Bool # (>) :: WriterT w m a -> WriterT w m a -> Bool # (>=) :: WriterT w m a -> WriterT w m a -> Bool # | |
| (Ord w, Ord1 m, Ord a) => Ord (WriterT w m a) | |
Defined in Control.Monad.Trans.Writer.Strict Methods compare :: WriterT w m a -> WriterT w m a -> Ordering # (<) :: WriterT w m a -> WriterT w m a -> Bool # (<=) :: WriterT w m a -> WriterT w m a -> Bool # (>) :: WriterT w m a -> WriterT w m a -> Bool # (>=) :: WriterT w m a -> WriterT w m a -> Bool # | |
| Ord b => Ord (Tagged s b) | |
| Ord c => Ord (K1 i c p) | Since: base-4.7.0.0 |
Defined in GHC.Generics | |
| (Ord (f p), Ord (g p)) => Ord ((f :+: g) p) | Since: base-4.7.0.0 |
Defined in GHC.Generics | |
| (Ord (f p), Ord (g p)) => Ord ((f :*: g) p) | Since: base-4.7.0.0 |
Defined in GHC.Generics | |
| (Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d) | |
Defined in GHC.Classes | |
| (Ord1 f, Ord1 g, Ord a) => Ord (Product f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Product Methods compare :: Product f g a -> Product f g a -> Ordering # (<) :: Product f g a -> Product f g a -> Bool # (<=) :: Product f g a -> Product f g a -> Bool # (>) :: Product f g a -> Product f g a -> Bool # (>=) :: Product f g a -> Product f g a -> Bool # | |
| (Ord1 f, Ord1 g, Ord a) => Ord (Sum f g a) | Since: base-4.9.0.0 |
| Ord (f p) => Ord (M1 i c f p) | Since: base-4.7.0.0 |
| Ord (f (g p)) => Ord ((f :.: g) p) | Since: base-4.7.0.0 |
Defined in GHC.Generics | |
| (Ord a, Ord b, Ord c, Ord d, Ord e) => Ord (a, b, c, d, e) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e) -> (a, b, c, d, e) -> Ordering # (<) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # (<=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # (>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # (>=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool # max :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) # min :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) # | |
| (Ord1 f, Ord1 g, Ord a) => Ord (Compose f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose Methods compare :: Compose f g a -> Compose f g a -> Ordering # (<) :: Compose f g a -> Compose f g a -> Bool # (<=) :: Compose f g a -> Compose f g a -> Bool # (>) :: Compose f g a -> Compose f g a -> Bool # (>=) :: Compose f g a -> Compose f g a -> Bool # | |
| (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (a, b, c, d, e, f) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Ordering # (<) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # (<=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # (>) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # (>=) :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> Bool # max :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) # min :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) # | |
| (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g) => Ord (a, b, c, d, e, f, g) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Ordering # (<) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # (<=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # (>) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # (>=) :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> Bool # max :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) # min :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) # | |
| (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h) => Ord (a, b, c, d, e, f, g, h) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Ordering # (<) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # (<=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # (>) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # (>=) :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> Bool # max :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) # min :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) # | |
| (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i) => Ord (a, b, c, d, e, f, g, h, i) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> Bool # max :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) # min :: (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) -> (a, b, c, d, e, f, g, h, i) # | |
| (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j) => Ord (a, b, c, d, e, f, g, h, i, j) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) # min :: (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) -> (a, b, c, d, e, f, g, h, i, j) # | |
| (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k) => Ord (a, b, c, d, e, f, g, h, i, j, k) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) # min :: (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) -> (a, b, c, d, e, f, g, h, i, j, k) # | |
| (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l) => Ord (a, b, c, d, e, f, g, h, i, j, k, l) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) # min :: (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (a, b, c, d, e, f, g, h, i, j, k, l) # | |
| (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) # min :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) # | |
| (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # | |
| (Ord a, Ord b, Ord c, Ord d, Ord e, Ord f, Ord g, Ord h, Ord i, Ord j, Ord k, Ord l, Ord m, Ord n, Ord o) => Ord (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | |
Defined in GHC.Classes Methods compare :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Ordering # (<) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool # (<=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool # (>) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool # (>=) :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Bool # max :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # min :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # | |
Parsing of Strings, producing values.
Derived instances of Read make the following assumptions, which
derived instances of Show obey:
- If the constructor is defined to be an infix operator, then the
derived
Readinstance will parse only infix applications of the constructor (not the prefix form). - Associativity is not used to reduce the occurrence of parentheses, although precedence may be.
- If the constructor is defined using record syntax, the derived
Readwill parse only the record-syntax form, and furthermore, the fields must be given in the same order as the original declaration. - The derived
Readinstance allows arbitrary Haskell whitespace between tokens of the input string. Extra parentheses are also allowed.
For example, given the declarations
infixr 5 :^: data Tree a = Leaf a | Tree a :^: Tree a
the derived instance of Read in Haskell 2010 is equivalent to
instance (Read a) => Read (Tree a) where
readsPrec d r = readParen (d > app_prec)
(\r -> [(Leaf m,t) |
("Leaf",s) <- lex r,
(m,t) <- readsPrec (app_prec+1) s]) r
++ readParen (d > up_prec)
(\r -> [(u:^:v,w) |
(u,s) <- readsPrec (up_prec+1) r,
(":^:",t) <- lex s,
(v,w) <- readsPrec (up_prec+1) t]) r
where app_prec = 10
up_prec = 5Note that right-associativity of :^: is unused.
The derived instance in GHC is equivalent to
instance (Read a) => Read (Tree a) where
readPrec = parens $ (prec app_prec $ do
Ident "Leaf" <- lexP
m <- step readPrec
return (Leaf m))
+++ (prec up_prec $ do
u <- step readPrec
Symbol ":^:" <- lexP
v <- step readPrec
return (u :^: v))
where app_prec = 10
up_prec = 5
readListPrec = readListPrecDefaultWhy do both readsPrec and readPrec exist, and why does GHC opt to
implement readPrec in derived Read instances instead of readsPrec?
The reason is that readsPrec is based on the ReadS type, and although
ReadS is mentioned in the Haskell 2010 Report, it is not a very efficient
parser data structure.
readPrec, on the other hand, is based on a much more efficient ReadPrec
datatype (a.k.a "new-style parsers"), but its definition relies on the use
of the RankNTypes language extension. Therefore, readPrec (and its
cousin, readListPrec) are marked as GHC-only. Nevertheless, it is
recommended to use readPrec instead of readsPrec whenever possible
for the efficiency improvements it brings.
As mentioned above, derived Read instances in GHC will implement
readPrec instead of readsPrec. The default implementations of
readsPrec (and its cousin, readList) will simply use readPrec under
the hood. If you are writing a Read instance by hand, it is recommended
to write it like so:
instanceReadT wherereadPrec= ...readListPrec=readListPrecDefault
Instances
| Read Bool | Since: base-2.1 |
| Read Char | Since: base-2.1 |
| Read Double | Since: base-2.1 |
| Read Float | Since: base-2.1 |
| Read Int | Since: base-2.1 |
| Read Int8 | Since: base-2.1 |
| Read Int16 | Since: base-2.1 |
| Read Int32 | Since: base-2.1 |
| Read Int64 | Since: base-2.1 |
| Read Integer | Since: base-2.1 |
| Read Natural | Since: base-4.8.0.0 |
| Read Ordering | Since: base-2.1 |
| Read Word | Since: base-4.5.0.0 |
| Read Word8 | Since: base-2.1 |
| Read Word16 | Since: base-2.1 |
| Read Word32 | Since: base-2.1 |
| Read Word64 | Since: base-2.1 |
| Read () | Since: base-2.1 |
| Read Void | Reading a Since: base-4.8.0.0 |
| Read Version | Since: base-2.1 |
| Read ExitCode | |
| Read BufferMode | Since: base-4.2.0.0 |
Defined in GHC.IO.Handle.Types Methods readsPrec :: Int -> ReadS BufferMode # readList :: ReadS [BufferMode] # readPrec :: ReadPrec BufferMode # readListPrec :: ReadPrec [BufferMode] # | |
| Read Newline | Since: base-4.3.0.0 |
| Read NewlineMode | Since: base-4.3.0.0 |
Defined in GHC.IO.Handle.Types Methods readsPrec :: Int -> ReadS NewlineMode # readList :: ReadS [NewlineMode] # readPrec :: ReadPrec NewlineMode # readListPrec :: ReadPrec [NewlineMode] # | |
| Read All | Since: base-2.1 |
| Read Any | Since: base-2.1 |
| Read Fixity | Since: base-4.6.0.0 |
| Read Associativity | Since: base-4.6.0.0 |
Defined in GHC.Generics Methods readsPrec :: Int -> ReadS Associativity # readList :: ReadS [Associativity] # | |
| Read SourceUnpackedness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods readsPrec :: Int -> ReadS SourceUnpackedness # readList :: ReadS [SourceUnpackedness] # | |
| Read SourceStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods readsPrec :: Int -> ReadS SourceStrictness # readList :: ReadS [SourceStrictness] # | |
| Read DecidedStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods readsPrec :: Int -> ReadS DecidedStrictness # readList :: ReadS [DecidedStrictness] # | |
| Read SomeSymbol | Since: base-4.7.0.0 |
Defined in GHC.TypeLits Methods readsPrec :: Int -> ReadS SomeSymbol # readList :: ReadS [SomeSymbol] # readPrec :: ReadPrec SomeSymbol # readListPrec :: ReadPrec [SomeSymbol] # | |
| Read SomeNat | Since: base-4.7.0.0 |
| Read IOMode | Since: base-4.2.0.0 |
| Read Lexeme | Since: base-2.1 |
| Read GeneralCategory | Since: base-2.1 |
Defined in GHC.Read Methods readsPrec :: Int -> ReadS GeneralCategory # readList :: ReadS [GeneralCategory] # | |
| Read ShortByteString | |
Defined in Data.ByteString.Short.Internal Methods readsPrec :: Int -> ReadS ShortByteString # readList :: ReadS [ShortByteString] # | |
| Read ByteString | |
Defined in Data.ByteString.Internal Methods readsPrec :: Int -> ReadS ByteString # readList :: ReadS [ByteString] # readPrec :: ReadPrec ByteString # readListPrec :: ReadPrec [ByteString] # | |
| Read IntSet | |
| Read Undefined | |
| Read DatatypeVariant | |
| Read Scientific | |
| Read DotNetTime | |
| Read Value | |
| Read UUID | |
| Read UnpackedUUID | |
| Read Clock | |
| Read TimeSpec | |
| Read a => Read [a] | Since: base-2.1 |
| Read a => Read (Maybe a) | Since: base-2.1 |
| (Integral a, Read a) => Read (Ratio a) | Since: base-2.1 |
| Read p => Read (Par1 p) | Since: base-4.7.0.0 |
| Read a => Read (Complex a) | Since: base-2.1 |
| Read a => Read (Min a) | Since: base-4.9.0.0 |
| Read a => Read (Max a) | Since: base-4.9.0.0 |
| Read a => Read (First a) | Since: base-4.9.0.0 |
| Read a => Read (Last a) | Since: base-4.9.0.0 |
| Read m => Read (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods readsPrec :: Int -> ReadS (WrappedMonoid m) # readList :: ReadS [WrappedMonoid m] # readPrec :: ReadPrec (WrappedMonoid m) # readListPrec :: ReadPrec [WrappedMonoid m] # | |
| Read a => Read (Option a) | Since: base-4.9.0.0 |
| Read a => Read (ZipList a) | Since: base-4.7.0.0 |
| Read a => Read (Identity a) | This instance would be equivalent to the derived instances of the
Since: base-4.8.0.0 |
| Read a => Read (First a) | Since: base-2.1 |
| Read a => Read (Last a) | Since: base-2.1 |
| Read a => Read (Dual a) | Since: base-2.1 |
| Read a => Read (Sum a) | Since: base-2.1 |
| Read a => Read (Product a) | Since: base-2.1 |
| Read a => Read (Down a) | This instance would be equivalent to the derived instances of the
Since: base-4.7.0.0 |
| Read a => Read (NonEmpty a) | Since: base-4.11.0.0 |
| Read e => Read (IntMap e) | |
| Read vertex => Read (SCC vertex) | Since: containers-0.5.9 |
| Read a => Read (Tree a) | |
| Read a => Read (Seq a) | |
| Read a => Read (ViewL a) | |
| Read a => Read (ViewR a) | |
| (Read a, Ord a) => Read (Set a) | |
| (Eq a, Hashable a, Read a) => Read (HashSet a) | |
| Read a => Read (Vector a) | |
| (Read a, Storable a) => Read (Vector a) | |
| (Read a, Prim a) => Read (Vector a) | |
| Read a => Read (Array a) | |
| Read a => Read (SmallArray a) | |
| Read a => Read (DList a) | |
| Read a => Read (Window a) | |
| (Read a, Read b) => Read (Either a b) | Since: base-3.0 |
| Read (V1 p) | Since: base-4.9.0.0 |
| Read (U1 p) | Since: base-4.9.0.0 |
| (Read a, Read b) => Read (a, b) | Since: base-2.1 |
| (Ix a, Read a, Read b) => Read (Array a b) | Since: base-2.1 |
| (Read a, Read b) => Read (Arg a b) | Since: base-4.9.0.0 |
| Read (Proxy t) | Since: base-4.7.0.0 |
| (Ord k, Read k, Read e) => Read (Map k e) | |
| (Read1 m, Read a) => Read (MaybeT m a) | |
| (Read1 m, Read a) => Read (ListT m a) | |
| (Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) | |
| Read (f p) => Read (Rec1 f p) | Since: base-4.7.0.0 |
| (Read a, Read b, Read c) => Read (a, b, c) | Since: base-2.1 |
| Read a => Read (Const a b) | This instance would be equivalent to the derived instances of the
Since: base-4.8.0.0 |
| Read (f a) => Read (Ap f a) | Since: base-4.12.0.0 |
| Read (f a) => Read (Alt f a) | Since: base-4.8.0.0 |
| (Read e, Read1 m, Read a) => Read (ExceptT e m a) | |
| (Read1 f, Read a) => Read (IdentityT f a) | |
| (Read e, Read1 m, Read a) => Read (ErrorT e m a) | |
| (Read w, Read1 m, Read a) => Read (WriterT w m a) | |
| (Read w, Read1 m, Read a) => Read (WriterT w m a) | |
| Read b => Read (Tagged s b) | |
| Read c => Read (K1 i c p) | Since: base-4.7.0.0 |
| (Read (f p), Read (g p)) => Read ((f :+: g) p) | Since: base-4.7.0.0 |
| (Read (f p), Read (g p)) => Read ((f :*: g) p) | Since: base-4.7.0.0 |
| (Read a, Read b, Read c, Read d) => Read (a, b, c, d) | Since: base-2.1 |
| (Read1 f, Read1 g, Read a) => Read (Product f g a) | Since: base-4.9.0.0 |
| (Read1 f, Read1 g, Read a) => Read (Sum f g a) | Since: base-4.9.0.0 |
| Read (f p) => Read (M1 i c f p) | Since: base-4.7.0.0 |
| Read (f (g p)) => Read ((f :.: g) p) | Since: base-4.7.0.0 |
| (Read a, Read b, Read c, Read d, Read e) => Read (a, b, c, d, e) | Since: base-2.1 |
| (Read1 f, Read1 g, Read a) => Read (Compose f g a) | Since: base-4.9.0.0 |
| (Read a, Read b, Read c, Read d, Read e, Read f) => Read (a, b, c, d, e, f) | Since: base-2.1 |
| (Read a, Read b, Read c, Read d, Read e, Read f, Read g) => Read (a, b, c, d, e, f, g) | Since: base-2.1 |
| (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h) => Read (a, b, c, d, e, f, g, h) | Since: base-2.1 |
| (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i) => Read (a, b, c, d, e, f, g, h, i) | Since: base-2.1 |
| (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j) => Read (a, b, c, d, e, f, g, h, i, j) | Since: base-2.1 |
| (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k) => Read (a, b, c, d, e, f, g, h, i, j, k) | Since: base-2.1 |
| (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l) => Read (a, b, c, d, e, f, g, h, i, j, k, l) | Since: base-2.1 |
| (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m) | Since: base-2.1 |
| (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m, Read n) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | Since: base-2.1 |
| (Read a, Read b, Read c, Read d, Read e, Read f, Read g, Read h, Read i, Read j, Read k, Read l, Read m, Read n, Read o) => Read (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | Since: base-2.1 |
Defined in GHC.Read | |
class (Num a, Ord a) => Real a where #
Methods
toRational :: a -> Rational #
the rational equivalent of its real argument with full precision
Instances
| Real Int | Since: base-2.0.1 |
Defined in GHC.Real Methods toRational :: Int -> Rational # | |
| Real Int8 | Since: base-2.1 |
Defined in GHC.Int Methods toRational :: Int8 -> Rational # | |
| Real Int16 | Since: base-2.1 |
Defined in GHC.Int Methods toRational :: Int16 -> Rational # | |
| Real Int32 | Since: base-2.1 |
Defined in GHC.Int Methods toRational :: Int32 -> Rational # | |
| Real Int64 | Since: base-2.1 |
Defined in GHC.Int Methods toRational :: Int64 -> Rational # | |
| Real Integer | Since: base-2.0.1 |
Defined in GHC.Real Methods toRational :: Integer -> Rational # | |
| Real Natural | Since: base-4.8.0.0 |
Defined in GHC.Real Methods toRational :: Natural -> Rational # | |
| Real Word | Since: base-2.1 |
Defined in GHC.Real Methods toRational :: Word -> Rational # | |
| Real Word8 | Since: base-2.1 |
Defined in GHC.Word Methods toRational :: Word8 -> Rational # | |
| Real Word16 | Since: base-2.1 |
Defined in GHC.Word Methods toRational :: Word16 -> Rational # | |
| Real Word32 | Since: base-2.1 |
Defined in GHC.Word Methods toRational :: Word32 -> Rational # | |
| Real Word64 | Since: base-2.1 |
Defined in GHC.Word Methods toRational :: Word64 -> Rational # | |
| Real Scientific | |
Defined in Data.Scientific Methods toRational :: Scientific -> Rational # | |
| Real DiscardLimit | |
Defined in Hedgehog.Internal.Property Methods toRational :: DiscardLimit -> Rational # | |
| Real ShrinkLimit | |
Defined in Hedgehog.Internal.Property Methods toRational :: ShrinkLimit -> Rational # | |
| Real ShrinkRetries | |
Defined in Hedgehog.Internal.Property Methods toRational :: ShrinkRetries -> Rational # | |
| Real TestLimit | |
Defined in Hedgehog.Internal.Property Methods toRational :: TestLimit -> Rational # | |
| Real DiscardCount | |
Defined in Hedgehog.Internal.Property Methods toRational :: DiscardCount -> Rational # | |
| Real PropertyCount | |
Defined in Hedgehog.Internal.Property Methods toRational :: PropertyCount -> Rational # | |
| Real ShrinkCount | |
Defined in Hedgehog.Internal.Property Methods toRational :: ShrinkCount -> Rational # | |
| Real TestCount | |
Defined in Hedgehog.Internal.Property Methods toRational :: TestCount -> Rational # | |
| Integral a => Real (Ratio a) | Since: base-2.0.1 |
Defined in GHC.Real Methods toRational :: Ratio a -> Rational # | |
| Real a => Real (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods toRational :: Identity a -> Rational # | |
| Real a => Real (Down a) | Since: base-4.14.0.0 |
Defined in Data.Ord Methods toRational :: Down a -> Rational # | |
| Real a => Real (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods toRational :: Const a b -> Rational # | |
| Real a => Real (Tagged s a) | |
Defined in Data.Tagged Methods toRational :: Tagged s a -> Rational # | |
class (RealFrac a, Floating a) => RealFloat a where #
Efficient, machine-independent access to the components of a floating-point number.
Minimal complete definition
floatRadix, floatDigits, floatRange, decodeFloat, encodeFloat, isNaN, isInfinite, isDenormalized, isNegativeZero, isIEEE
Methods
floatRadix :: a -> Integer #
a constant function, returning the radix of the representation
(often 2)
floatDigits :: a -> Int #
a constant function, returning the number of digits of
floatRadix in the significand
floatRange :: a -> (Int, Int) #
a constant function, returning the lowest and highest values the exponent may assume
decodeFloat :: a -> (Integer, Int) #
The function decodeFloat applied to a real floating-point
number returns the significand expressed as an Integer and an
appropriately scaled exponent (an Int). If
yields decodeFloat x(m,n), then x is equal in value to m*b^^n, where b
is the floating-point radix, and furthermore, either m and n
are both zero or else b^(d-1) <= , where abs m < b^dd is
the value of .
In particular, floatDigits x. If the type
contains a negative zero, also decodeFloat 0 = (0,0).
The result of decodeFloat (-0.0) = (0,0) is unspecified if either of
decodeFloat x or isNaN x is isInfinite xTrue.
encodeFloat :: Integer -> Int -> a #
encodeFloat performs the inverse of decodeFloat in the
sense that for finite x with the exception of -0.0,
.
uncurry encodeFloat (decodeFloat x) = x is one of the two closest representable
floating-point numbers to encodeFloat m nm*b^^n (or ±Infinity if overflow
occurs); usually the closer, but if m contains too many bits,
the result may be rounded in the wrong direction.
True if the argument is an IEEE "not-a-number" (NaN) value
isInfinite :: a -> Bool #
True if the argument is an IEEE infinity or negative infinity
isDenormalized :: a -> Bool #
True if the argument is too small to be represented in
normalized format
isNegativeZero :: a -> Bool #
True if the argument is an IEEE negative zero
True if the argument is an IEEE floating point number
a version of arctangent taking two real floating-point arguments.
For real floating x and y, computes the angle
(from the positive x-axis) of the vector from the origin to the
point atan2 y x(x,y). returns a value in the range [atan2 y x-pi,
pi]. It follows the Common Lisp semantics for the origin when
signed zeroes are supported. , with atan2 y 1y in a type
that is RealFloat, should return the same value as .
A default definition of atan yatan2 is provided, but implementors
can provide a more accurate implementation.
Instances
class (Real a, Fractional a) => RealFrac a where #
Extracting components of fractions.
Minimal complete definition
Methods
properFraction :: Integral b => a -> (b, a) #
The function properFraction takes a real fractional number x
and returns a pair (n,f) such that x = n+f, and:
nis an integral number with the same sign asx; andfis a fraction with the same type and sign asx, and with absolute value less than1.
The default definitions of the ceiling, floor, truncate
and round functions are in terms of properFraction.
truncate :: Integral b => a -> b #
returns the integer nearest truncate xx between zero and x
round :: Integral b => a -> b #
returns the nearest integer to round xx;
the even integer if x is equidistant between two integers
ceiling :: Integral b => a -> b #
returns the least integer not less than ceiling xx
floor :: Integral b => a -> b #
returns the greatest integer not greater than floor xx
Conversion of values to readable Strings.
Derived instances of Show have the following properties, which
are compatible with derived instances of Read:
- The result of
showis a syntactically correct Haskell expression containing only constants, given the fixity declarations in force at the point where the type is declared. It contains only the constructor names defined in the data type, parentheses, and spaces. When labelled constructor fields are used, braces, commas, field names, and equal signs are also used. - If the constructor is defined to be an infix operator, then
showsPrecwill produce infix applications of the constructor. - the representation will be enclosed in parentheses if the
precedence of the top-level constructor in
xis less thand(associativity is ignored). Thus, ifdis0then the result is never surrounded in parentheses; ifdis11it is always surrounded in parentheses, unless it is an atomic expression. - If the constructor is defined using record syntax, then
showwill produce the record-syntax form, with the fields given in the same order as the original declaration.
For example, given the declarations
infixr 5 :^: data Tree a = Leaf a | Tree a :^: Tree a
the derived instance of Show is equivalent to
instance (Show a) => Show (Tree a) where
showsPrec d (Leaf m) = showParen (d > app_prec) $
showString "Leaf " . showsPrec (app_prec+1) m
where app_prec = 10
showsPrec d (u :^: v) = showParen (d > up_prec) $
showsPrec (up_prec+1) u .
showString " :^: " .
showsPrec (up_prec+1) v
where up_prec = 5Note that right-associativity of :^: is ignored. For example,
produces the stringshow(Leaf 1 :^: Leaf 2 :^: Leaf 3)"Leaf 1 :^: (Leaf 2 :^: Leaf 3)".
Instances
| Show Bool | Since: base-2.1 |
| Show Char | Since: base-2.1 |
| Show Int | Since: base-2.1 |
| Show Int8 | Since: base-2.1 |
| Show Int16 | Since: base-2.1 |
| Show Int32 | Since: base-2.1 |
| Show Int64 | Since: base-2.1 |
| Show Integer | Since: base-2.1 |
| Show Natural | Since: base-4.8.0.0 |
| Show Ordering | Since: base-2.1 |
| Show Word | Since: base-2.1 |
| Show Word8 | Since: base-2.1 |
| Show Word16 | Since: base-2.1 |
| Show Word32 | Since: base-2.1 |
| Show Word64 | Since: base-2.1 |
| Show RuntimeRep | Since: base-4.11.0.0 |
Defined in GHC.Show Methods showsPrec :: Int -> RuntimeRep -> ShowS # show :: RuntimeRep -> String # showList :: [RuntimeRep] -> ShowS # | |
| Show VecCount | Since: base-4.11.0.0 |
| Show VecElem | Since: base-4.11.0.0 |
| Show CallStack | Since: base-4.9.0.0 |
| Show SomeTypeRep | Since: base-4.10.0.0 |
Defined in Data.Typeable.Internal Methods showsPrec :: Int -> SomeTypeRep -> ShowS # show :: SomeTypeRep -> String # showList :: [SomeTypeRep] -> ShowS # | |
| Show Exp | |
| Show Match | |
| Show Clause | |
| Show Pat | |
| Show Type | |
| Show Dec | |
| Show Name | |
| Show FunDep | |
| Show InjectivityAnn | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> InjectivityAnn -> ShowS # show :: InjectivityAnn -> String # showList :: [InjectivityAnn] -> ShowS # | |
| Show Overlap | |
| Show () | Since: base-2.1 |
| Show TyCon | Since: base-2.1 |
| Show Module | Since: base-4.9.0.0 |
| Show TrName | Since: base-4.9.0.0 |
| Show KindRep | |
| Show TypeLitSort | Since: base-4.11.0.0 |
Defined in GHC.Show Methods showsPrec :: Int -> TypeLitSort -> ShowS # show :: TypeLitSort -> String # showList :: [TypeLitSort] -> ShowS # | |
| Show Handle | Since: base-4.1.0.0 |
| Show Void | Since: base-4.8.0.0 |
| Show Version | Since: base-2.1 |
| Show PatternMatchFail | Since: base-4.0 |
Defined in Control.Exception.Base Methods showsPrec :: Int -> PatternMatchFail -> ShowS # show :: PatternMatchFail -> String # showList :: [PatternMatchFail] -> ShowS # | |
| Show RecSelError | Since: base-4.0 |
Defined in Control.Exception.Base Methods showsPrec :: Int -> RecSelError -> ShowS # show :: RecSelError -> String # showList :: [RecSelError] -> ShowS # | |
| Show RecConError | Since: base-4.0 |
Defined in Control.Exception.Base Methods showsPrec :: Int -> RecConError -> ShowS # show :: RecConError -> String # showList :: [RecConError] -> ShowS # | |
| Show RecUpdError | Since: base-4.0 |
Defined in Control.Exception.Base Methods showsPrec :: Int -> RecUpdError -> ShowS # show :: RecUpdError -> String # showList :: [RecUpdError] -> ShowS # | |
| Show NoMethodError | Since: base-4.0 |
Defined in Control.Exception.Base Methods showsPrec :: Int -> NoMethodError -> ShowS # show :: NoMethodError -> String # showList :: [NoMethodError] -> ShowS # | |
| Show TypeError | Since: base-4.9.0.0 |
| Show NonTermination | Since: base-4.0 |
Defined in Control.Exception.Base Methods showsPrec :: Int -> NonTermination -> ShowS # show :: NonTermination -> String # showList :: [NonTermination] -> ShowS # | |
| Show NestedAtomically | Since: base-4.0 |
Defined in Control.Exception.Base Methods showsPrec :: Int -> NestedAtomically -> ShowS # show :: NestedAtomically -> String # showList :: [NestedAtomically] -> ShowS # | |
| Show ThreadId | Since: base-4.2.0.0 |
| Show BlockReason | Since: base-4.3.0.0 |
Defined in GHC.Conc.Sync Methods showsPrec :: Int -> BlockReason -> ShowS # show :: BlockReason -> String # showList :: [BlockReason] -> ShowS # | |
| Show ThreadStatus | Since: base-4.3.0.0 |
Defined in GHC.Conc.Sync Methods showsPrec :: Int -> ThreadStatus -> ShowS # show :: ThreadStatus -> String # showList :: [ThreadStatus] -> ShowS # | |
| Show BlockedIndefinitelyOnMVar | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception Methods showsPrec :: Int -> BlockedIndefinitelyOnMVar -> ShowS # show :: BlockedIndefinitelyOnMVar -> String # showList :: [BlockedIndefinitelyOnMVar] -> ShowS # | |
| Show BlockedIndefinitelyOnSTM | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception Methods showsPrec :: Int -> BlockedIndefinitelyOnSTM -> ShowS # show :: BlockedIndefinitelyOnSTM -> String # showList :: [BlockedIndefinitelyOnSTM] -> ShowS # | |
| Show Deadlock | Since: base-4.1.0.0 |
| Show AllocationLimitExceeded | Since: base-4.7.1.0 |
Defined in GHC.IO.Exception Methods showsPrec :: Int -> AllocationLimitExceeded -> ShowS # show :: AllocationLimitExceeded -> String # showList :: [AllocationLimitExceeded] -> ShowS # | |
| Show CompactionFailed | Since: base-4.10.0.0 |
Defined in GHC.IO.Exception Methods showsPrec :: Int -> CompactionFailed -> ShowS # show :: CompactionFailed -> String # showList :: [CompactionFailed] -> ShowS # | |
| Show AssertionFailed | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception Methods showsPrec :: Int -> AssertionFailed -> ShowS # show :: AssertionFailed -> String # showList :: [AssertionFailed] -> ShowS # | |
| Show SomeAsyncException | Since: base-4.7.0.0 |
Defined in GHC.IO.Exception Methods showsPrec :: Int -> SomeAsyncException -> ShowS # show :: SomeAsyncException -> String # showList :: [SomeAsyncException] -> ShowS # | |
| Show AsyncException | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception Methods showsPrec :: Int -> AsyncException -> ShowS # show :: AsyncException -> String # showList :: [AsyncException] -> ShowS # | |
| Show ArrayException | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception Methods showsPrec :: Int -> ArrayException -> ShowS # show :: ArrayException -> String # showList :: [ArrayException] -> ShowS # | |
| Show FixIOException | Since: base-4.11.0.0 |
Defined in GHC.IO.Exception Methods showsPrec :: Int -> FixIOException -> ShowS # show :: FixIOException -> String # showList :: [FixIOException] -> ShowS # | |
| Show ExitCode | |
| Show IOErrorType | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception Methods showsPrec :: Int -> IOErrorType -> ShowS # show :: IOErrorType -> String # showList :: [IOErrorType] -> ShowS # | |
| Show HandleType | Since: base-4.1.0.0 |
Defined in GHC.IO.Handle.Types Methods showsPrec :: Int -> HandleType -> ShowS # show :: HandleType -> String # showList :: [HandleType] -> ShowS # | |
| Show BufferMode | Since: base-4.2.0.0 |
Defined in GHC.IO.Handle.Types Methods showsPrec :: Int -> BufferMode -> ShowS # show :: BufferMode -> String # showList :: [BufferMode] -> ShowS # | |
| Show Newline | Since: base-4.3.0.0 |
| Show NewlineMode | Since: base-4.3.0.0 |
Defined in GHC.IO.Handle.Types Methods showsPrec :: Int -> NewlineMode -> ShowS # show :: NewlineMode -> String # showList :: [NewlineMode] -> ShowS # | |
| Show MaskingState | Since: base-4.3.0.0 |
Defined in GHC.IO Methods showsPrec :: Int -> MaskingState -> ShowS # show :: MaskingState -> String # showList :: [MaskingState] -> ShowS # | |
| Show IOException | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception Methods showsPrec :: Int -> IOException -> ShowS # show :: IOException -> String # showList :: [IOException] -> ShowS # | |
| Show ErrorCall | Since: base-4.0.0.0 |
| Show ArithException | Since: base-4.0.0.0 |
Defined in GHC.Exception.Type Methods showsPrec :: Int -> ArithException -> ShowS # show :: ArithException -> String # showList :: [ArithException] -> ShowS # | |
| Show All | Since: base-2.1 |
| Show Any | Since: base-2.1 |
| Show Fixity | Since: base-4.6.0.0 |
| Show Associativity | Since: base-4.6.0.0 |
Defined in GHC.Generics Methods showsPrec :: Int -> Associativity -> ShowS # show :: Associativity -> String # showList :: [Associativity] -> ShowS # | |
| Show SourceUnpackedness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods showsPrec :: Int -> SourceUnpackedness -> ShowS # show :: SourceUnpackedness -> String # showList :: [SourceUnpackedness] -> ShowS # | |
| Show SourceStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods showsPrec :: Int -> SourceStrictness -> ShowS # show :: SourceStrictness -> String # showList :: [SourceStrictness] -> ShowS # | |
| Show DecidedStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods showsPrec :: Int -> DecidedStrictness -> ShowS # show :: DecidedStrictness -> String # showList :: [DecidedStrictness] -> ShowS # | |
| Show SomeSymbol | Since: base-4.7.0.0 |
Defined in GHC.TypeLits Methods showsPrec :: Int -> SomeSymbol -> ShowS # show :: SomeSymbol -> String # showList :: [SomeSymbol] -> ShowS # | |
| Show SomeNat | Since: base-4.7.0.0 |
| Show IOMode | Since: base-4.2.0.0 |
| Show SrcLoc | Since: base-4.9.0.0 |
| Show SomeException | Since: base-3.0 |
Defined in GHC.Exception.Type Methods showsPrec :: Int -> SomeException -> ShowS # show :: SomeException -> String # showList :: [SomeException] -> ShowS # | |
| Show ShortByteString | |
Defined in Data.ByteString.Short.Internal Methods showsPrec :: Int -> ShortByteString -> ShowS # show :: ShortByteString -> String # showList :: [ShortByteString] -> ShowS # | |
| Show ByteString | |
Defined in Data.ByteString.Internal Methods showsPrec :: Int -> ByteString -> ShowS # show :: ByteString -> String # showList :: [ByteString] -> ShowS # | |
| Show IntSet | |
| Show TyVarBndr | |
| Show Extension | |
| Show ForeignSrcLang | |
Defined in GHC.ForeignSrcLang.Type Methods showsPrec :: Int -> ForeignSrcLang -> ShowS # show :: ForeignSrcLang -> String # showList :: [ForeignSrcLang] -> ShowS # | |
| Show Doc | |
| Show TextDetails | |
Defined in Text.PrettyPrint.Annotated.HughesPJ Methods showsPrec :: Int -> TextDetails -> ShowS # show :: TextDetails -> String # showList :: [TextDetails] -> ShowS # | |
| Show Style | |
| Show Mode | |
| Show ModName | |
| Show PkgName | |
| Show Module | |
| Show OccName | |
| Show NameFlavour | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> NameFlavour -> ShowS # show :: NameFlavour -> String # showList :: [NameFlavour] -> ShowS # | |
| Show NameSpace | |
| Show Loc | |
| Show Info | |
| Show ModuleInfo | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> ModuleInfo -> ShowS # show :: ModuleInfo -> String # showList :: [ModuleInfo] -> ShowS # | |
| Show Fixity | |
| Show FixityDirection | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> FixityDirection -> ShowS # show :: FixityDirection -> String # showList :: [FixityDirection] -> ShowS # | |
| Show Lit | |
| Show Bytes | |
| Show Body | |
| Show Guard | |
| Show Stmt | |
| Show Range | |
| Show DerivClause | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> DerivClause -> ShowS # show :: DerivClause -> String # showList :: [DerivClause] -> ShowS # | |
| Show DerivStrategy | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> DerivStrategy -> ShowS # show :: DerivStrategy -> String # showList :: [DerivStrategy] -> ShowS # | |
| Show TypeFamilyHead | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> TypeFamilyHead -> ShowS # show :: TypeFamilyHead -> String # showList :: [TypeFamilyHead] -> ShowS # | |
| Show TySynEqn | |
| Show Foreign | |
| Show Callconv | |
| Show Safety | |
| Show Pragma | |
| Show Inline | |
| Show RuleMatch | |
| Show Phases | |
| Show RuleBndr | |
| Show AnnTarget | |
| Show SourceUnpackedness | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> SourceUnpackedness -> ShowS # show :: SourceUnpackedness -> String # showList :: [SourceUnpackedness] -> ShowS # | |
| Show SourceStrictness | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> SourceStrictness -> ShowS # show :: SourceStrictness -> String # showList :: [SourceStrictness] -> ShowS # | |
| Show DecidedStrictness | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> DecidedStrictness -> ShowS # show :: DecidedStrictness -> String # showList :: [DecidedStrictness] -> ShowS # | |
| Show Con | |
| Show Bang | |
| Show PatSynDir | |
| Show PatSynArgs | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> PatSynArgs -> ShowS # show :: PatSynArgs -> String # showList :: [PatSynArgs] -> ShowS # | |
| Show FamilyResultSig | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> FamilyResultSig -> ShowS # show :: FamilyResultSig -> String # showList :: [FamilyResultSig] -> ShowS # | |
| Show TyLit | |
| Show Role | |
| Show AnnLookup | |
| Show Decoding | |
| Show UnicodeException | |
Defined in Data.Text.Encoding.Error Methods showsPrec :: Int -> UnicodeException -> ShowS # show :: UnicodeException -> String # showList :: [UnicodeException] -> ShowS # | |
| Show ZonedTime | |
| Show LocalTime | |
| Show Undefined | |
| Show Bug | |
| Show SrcSpanInfo | |
| Show SrcLoc | |
| Show SrcSpan | |
| Show ConstructorInfo | |
| Show DatatypeInfo | |
| Show ByteArray | |
| Show ConstructorVariant | |
| Show DatatypeVariant | |
| Show FieldStrictness | |
| Show Strictness | |
| Show Unpackedness | |
| Show Boxed | |
| Show Tool | |
| Show CodePoint | |
| Show DecoderState | |
| Show PathException | |
| Show More | |
| Show Pos | |
| Show Scientific | |
| Show DotNetTime | |
| Show JSONPathElement | |
| Show Options | |
| Show SumEncoding | |
| Show Value | |
| Show UUID | |
| Show UnpackedUUID | |
| Show TestError Source # | |
| Show Confidence | |
| Show DiscardLimit | |
| Show GroupName | |
| Show LabelName | |
| Show PropertyName | |
| Show ShrinkLimit | |
| Show ShrinkRetries | |
| Show TestLimit | |
| Show Cover | |
| Show CoverCount | |
| Show CoverPercentage | |
| Show Diff | |
| Show DiscardCount | |
| Show Failure | |
| Show Journal | |
| Show Log | |
| Show PropertyConfig | |
| Show PropertyCount | |
| Show ShrinkCount | |
| Show TerminationCriteria | |
| Show TestCount | |
| Show InvalidAccess | |
| Show ResourceCleanupException | |
| Show ValueIsNothing Source # | |
Defined in Polysemy.Test.Assert Methods showsPrec :: Int -> ValueIsNothing -> ShowS # show :: ValueIsNothing -> String # showList :: [ValueIsNothing] -> ShowS # | |
| Show DependencyType | |
| Show HedgehogDiscardLimit | |
| Show HedgehogShrinkLimit | |
| Show HedgehogShrinkRetries | |
| Show HedgehogTestLimit | |
| Show Progress | |
| Show Result | |
| Show Clock | |
| Show TimeSpec | |
| Show FailureReason | |
| Show Outcome | |
| Show ResourceError | |
| Show a => Show [a] | Since: base-2.1 |
| Show a => Show (Maybe a) | Since: base-2.1 |
| Show a => Show (Ratio a) | Since: base-2.0.1 |
| Show (Ptr a) | Since: base-2.1 |
| Show (FunPtr a) | Since: base-2.1 |
| Show p => Show (Par1 p) | Since: base-4.7.0.0 |
| Show a => Show (Complex a) | Since: base-2.1 |
| Show a => Show (Min a) | Since: base-4.9.0.0 |
| Show a => Show (Max a) | Since: base-4.9.0.0 |
| Show a => Show (First a) | Since: base-4.9.0.0 |
| Show a => Show (Last a) | Since: base-4.9.0.0 |
| Show m => Show (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods showsPrec :: Int -> WrappedMonoid m -> ShowS # show :: WrappedMonoid m -> String # showList :: [WrappedMonoid m] -> ShowS # | |
| Show a => Show (Option a) | Since: base-4.9.0.0 |
| Show a => Show (ZipList a) | Since: base-4.7.0.0 |
| Show a => Show (Identity a) | This instance would be equivalent to the derived instances of the
Since: base-4.8.0.0 |
| Show a => Show (First a) | Since: base-2.1 |
| Show a => Show (Last a) | Since: base-2.1 |
| Show a => Show (Dual a) | Since: base-2.1 |
| Show a => Show (Sum a) | Since: base-2.1 |
| Show a => Show (Product a) | Since: base-2.1 |
| Show a => Show (Down a) | This instance would be equivalent to the derived instances of the
Since: base-4.7.0.0 |
| Show a => Show (NonEmpty a) | Since: base-4.11.0.0 |
| Show a => Show (IntMap a) | |
| Show vertex => Show (SCC vertex) | Since: containers-0.5.9 |
| Show a => Show (Tree a) | |
| Show a => Show (Seq a) | |
| Show a => Show (ViewL a) | |
| Show a => Show (ViewR a) | |
| Show a => Show (Set a) | |
| Show a => Show (ExitCase a) | |
| Show (Doc a) | |
| Show a => Show (AnnotDetails a) | |
Defined in Text.PrettyPrint.Annotated.HughesPJ Methods showsPrec :: Int -> AnnotDetails a -> ShowS # show :: AnnotDetails a -> String # showList :: [AnnotDetails a] -> ShowS # | |
| Show a => Show (Span a) | |
| Typeable e => Show (WrappedExc e) | |
| Show a => Show (HashSet a) | |
| Show a => Show (ListOf a) | |
| Show l => Show (ModuleHeadAndImports l) | |
| Show a => Show (NonGreedy a) | |
| Show l => Show (PragmasAndModuleHead l) | |
| Show l => Show (PragmasAndModuleName l) | |
| Show l => Show (ModulePragma l) | |
| Show l => Show (ModuleHead l) | |
| Show l => Show (ImportDecl l) | |
| Show l => Show (ModuleName l) | |
| Show l => Show (Decl l) | |
| Show l => Show (Exp l) | |
| Show l => Show (Module l) | |
| Show l => Show (Pat l) | |
| Show l => Show (Stmt l) | |
| Show l => Show (Type l) | |
| Show a => Show (Vector a) | |
| (Show a, Storable a) => Show (Vector a) | |
| (Show a, Prim a) => Show (Vector a) | |
| Show a => Show (Array a) | |
| (Show a, Prim a) => Show (PrimArray a) | |
| Show a => Show (SmallArray a) | |
| Show a => Show (Loc a) | |
| Show a => Show (Hashed a) | |
| Show l => Show (Activation l) | |
| Show l => Show (Alt l) | |
| Show l => Show (Annotation l) | |
| Show l => Show (Assoc l) | |
| Show l => Show (Asst l) | |
| Show l => Show (BangType l) | |
| Show l => Show (Binds l) | |
| Show l => Show (BooleanFormula l) | |
| Show l => Show (Bracket l) | |
| Show l => Show (CName l) | |
| Show l => Show (CallConv l) | |
| Show l => Show (ClassDecl l) | |
| Show l => Show (ConDecl l) | |
| Show l => Show (Context l) | |
| Show l => Show (DataOrNew l) | |
| Show l => Show (DeclHead l) | |
| Show l => Show (DerivStrategy l) | |
| Show l => Show (Deriving l) | |
| Show l => Show (EWildcard l) | |
| Show l => Show (ExportSpec l) | |
| Show l => Show (ExportSpecList l) | |
| Show l => Show (FieldDecl l) | |
| Show l => Show (FieldUpdate l) | |
| Show l => Show (FunDep l) | |
| Show l => Show (GadtDecl l) | |
| Show l => Show (GuardedRhs l) | |
| Show l => Show (IPBind l) | |
| Show l => Show (IPName l) | |
| Show l => Show (ImportSpec l) | |
| Show l => Show (ImportSpecList l) | |
| Show l => Show (InjectivityInfo l) | |
| Show l => Show (InstDecl l) | |
| Show l => Show (InstHead l) | |
| Show l => Show (InstRule l) | |
| Show l => Show (Literal l) | |
| Show l => Show (Match l) | |
| Show l => Show (MaybePromotedName l) | |
| Show l => Show (Name l) | |
| Show l => Show (Namespace l) | |
| Show l => Show (Op l) | |
| Show l => Show (Overlap l) | |
| Show l => Show (PXAttr l) | |
| Show l => Show (PatField l) | |
| Show l => Show (PatternSynDirection l) | |
| Show l => Show (Promoted l) | |
| Show l => Show (QName l) | |
| Show l => Show (QOp l) | |
| Show l => Show (QualConDecl l) | |
| Show l => Show (QualStmt l) | |
| Show l => Show (RPat l) | |
| Show l => Show (RPatOp l) | |
| Show l => Show (ResultSig l) | |
| Show l => Show (Rhs l) | |
| Show l => Show (Role l) | |
| Show l => Show (Rule l) | |
| Show l => Show (RuleVar l) | |
| Show l => Show (Safety l) | |
| Show l => Show (Sign l) | |
| Show l => Show (SpecialCon l) | |
| Show l => Show (Splice l) | |
| Show l => Show (TyVarBind l) | |
| Show l => Show (TypeEqn l) | |
| Show l => Show (Unpackedness l) | |
| Show l => Show (WarningText l) | |
| Show l => Show (XAttr l) | |
| Show l => Show (XName l) | |
| Show (WalkAction b) | |
| Show a => Show (DList a) | |
| Show a => Show (IResult a) | |
| Show a => Show (Result a) | |
| Show a => Show (Coverage a) | |
| Show a => Show (Label a) | |
| Show a => Show (Window a) | |
| Show (Doc a) | |
| (Show a, Show b) => Show (Either a b) | Since: base-3.0 |
| Show (V1 p) | Since: base-4.9.0.0 |
| Show (U1 p) | Since: base-4.9.0.0 |
| Show (TypeRep a) | |
| (Show a, Show b) => Show (a, b) | Since: base-2.1 |
| Show (ST s a) | Since: base-2.1 |
| (Show a, Show b) => Show (Arg a b) | Since: base-4.9.0.0 |
| Show (Proxy s) | Since: base-4.7.0.0 |
| (Show k, Show a) => Show (Map k a) | |
| (Show1 m, Show a) => Show (MaybeT m a) | |
| (Show1 m, Show a) => Show (ListT m a) | |
| (Show k, Show v) => Show (HashMap k v) | |
| Show a => Show (B dst a) | |
| Show (Path b t) | |
| (Show i, Show r) => Show (IResult i r) | |
| (Show1 m, Show a) => Show (NodeT m a) | |
| (Show1 m, Show a) => Show (TreeT m a) | |
| Show (f p) => Show (Rec1 f p) | Since: base-4.7.0.0 |
| Show (URec Char p) | Since: base-4.9.0.0 |
| Show (URec Double p) | Since: base-4.9.0.0 |
| Show (URec Float p) | |
| Show (URec Int p) | Since: base-4.9.0.0 |
| Show (URec Word p) | Since: base-4.9.0.0 |
| (Show a, Show b, Show c) => Show (a, b, c) | Since: base-2.1 |
| Show a => Show (Const a b) | This instance would be equivalent to the derived instances of the
Since: base-4.8.0.0 |
| Show (f a) => Show (Ap f a) | Since: base-4.12.0.0 |
| Show (f a) => Show (Alt f a) | Since: base-4.8.0.0 |
| (Show e, Show1 m, Show a) => Show (ExceptT e m a) | |
| (Show1 f, Show a) => Show (IdentityT f a) | |
| (Show e, Show1 m, Show a) => Show (ErrorT e m a) | |
| (Show w, Show1 m, Show a) => Show (WriterT w m a) | |
| (Show w, Show1 m, Show a) => Show (WriterT w m a) | |
| Show b => Show (Tagged s b) | |
| Show c => Show (K1 i c p) | Since: base-4.7.0.0 |
| (Show (f p), Show (g p)) => Show ((f :+: g) p) | Since: base-4.7.0.0 |
| (Show (f p), Show (g p)) => Show ((f :*: g) p) | Since: base-4.7.0.0 |
| (Show a, Show b, Show c, Show d) => Show (a, b, c, d) | Since: base-2.1 |
| (Show1 f, Show1 g, Show a) => Show (Product f g a) | Since: base-4.9.0.0 |
| (Show1 f, Show1 g, Show a) => Show (Sum f g a) | Since: base-4.9.0.0 |
| Show (f p) => Show (M1 i c f p) | Since: base-4.7.0.0 |
| Show (f (g p)) => Show ((f :.: g) p) | Since: base-4.7.0.0 |
| (Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e) | Since: base-2.1 |
| (Show1 f, Show1 g, Show a) => Show (Compose f g a) | Since: base-4.9.0.0 |
| (Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f) | Since: base-2.1 |
| (Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show (a, b, c, d, e, f, g) | Since: base-2.1 |
| (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) => Show (a, b, c, d, e, f, g, h) | Since: base-2.1 |
| (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) => Show (a, b, c, d, e, f, g, h, i) | Since: base-2.1 |
| (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j) => Show (a, b, c, d, e, f, g, h, i, j) | Since: base-2.1 |
| (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k) => Show (a, b, c, d, e, f, g, h, i, j, k) | Since: base-2.1 |
| (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l) => Show (a, b, c, d, e, f, g, h, i, j, k, l) | Since: base-2.1 |
| (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m) | Since: base-2.1 |
| (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | Since: base-2.1 |
| (Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o) => Show (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | Since: base-2.1 |
The class Typeable allows a concrete representation of a type to
be calculated.
Minimal complete definition
typeRep#
class Monad m => MonadFail (m :: Type -> Type) where #
When a value is bound in do-notation, the pattern on the left
hand side of <- might not match. In this case, this class
provides a function to recover.
A Monad without a MonadFail instance may only be used in conjunction
with pattern that always match, such as newtypes, tuples, data types with
only a single data constructor, and irrefutable patterns (~pat).
Instances of MonadFail should satisfy the following law: fail s should
be a left zero for >>=,
fail s >>= f = fail s
If your Monad is also MonadPlus, a popular definition is
fail _ = mzero
Since: base-4.9.0.0
Instances
Class for string-like datastructures; used by the overloaded string extension (-XOverloadedStrings in GHC).
Methods
fromString :: String -> a #
Instances
class Functor f => Applicative (f :: Type -> Type) where #
A functor with application, providing operations to
A minimal complete definition must include implementations of pure
and of either <*> or liftA2. If it defines both, then they must behave
the same as their default definitions:
(<*>) =liftA2id
liftA2f x y = f<$>x<*>y
Further, any definition must satisfy the following:
- Identity
pureid<*>v = v- Composition
pure(.)<*>u<*>v<*>w = u<*>(v<*>w)- Homomorphism
puref<*>purex =pure(f x)- Interchange
u
<*>purey =pure($y)<*>u
The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:
As a consequence of these laws, the Functor instance for f will satisfy
It may be useful to note that supposing
forall x y. p (q x y) = f x . g y
it follows from the above that
liftA2p (liftA2q u v) =liftA2f u .liftA2g v
If f is also a Monad, it should satisfy
(which implies that pure and <*> satisfy the applicative functor laws).
Methods
Lift a value.
(<*>) :: f (a -> b) -> f a -> f b infixl 4 #
Sequential application.
A few functors support an implementation of <*> that is more
efficient than the default one.
Using ApplicativeDo: 'fs ' can be understood as
the <*> asdo expression
do f <- fs a <- as pure (f a)
liftA2 :: (a -> b -> c) -> f a -> f b -> f c #
Lift a binary function to actions.
Some functors support an implementation of liftA2 that is more
efficient than the default one. In particular, if fmap is an
expensive operation, it is likely better to use liftA2 than to
fmap over the structure and then use <*>.
This became a typeclass method in 4.10.0.0. Prior to that, it was
a function defined in terms of <*> and fmap.
Using ApplicativeDo: '' can be understood
as the liftA2 f as bsdo expression
do a <- as b <- bs pure (f a b)
(*>) :: f a -> f b -> f b infixl 4 #
Sequence actions, discarding the value of the first argument.
'as ' can be understood as the *> bsdo expression
do as bs
This is a tad complicated for our ApplicativeDo extension
which will give it a Monad constraint. For an Applicative
constraint we write it of the form
do _ <- as b <- bs pure b
(<*) :: f a -> f b -> f a infixl 4 #
Sequence actions, discarding the value of the second argument.
Using ApplicativeDo: 'as ' can be understood as
the <* bsdo expression
do a <- as bs pure a
Instances
| Applicative [] | Since: base-2.1 |
| Applicative Maybe | Since: base-2.1 |
| Applicative IO | Since: base-2.1 |
| Applicative Par1 | Since: base-4.9.0.0 |
| Applicative Q | |
| Applicative Complex | Since: base-4.9.0.0 |
| Applicative Min | Since: base-4.9.0.0 |
| Applicative Max | Since: base-4.9.0.0 |
| Applicative First | Since: base-4.9.0.0 |
| Applicative Last | Since: base-4.9.0.0 |
| Applicative Option | Since: base-4.9.0.0 |
| Applicative ZipList | f <$> ZipList xs1 <*> ... <*> ZipList xsN
= ZipList (zipWithN f xs1 ... xsN)where (\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
= ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
= ZipList {getZipList = ["a5","b6b6","c7c7c7"]}Since: base-2.1 |
| Applicative Identity | Since: base-4.8.0.0 |
| Applicative STM | Since: base-4.8.0.0 |
| Applicative First | Since: base-4.8.0.0 |
| Applicative Last | Since: base-4.8.0.0 |
| Applicative Dual | Since: base-4.8.0.0 |
| Applicative Sum | Since: base-4.8.0.0 |
| Applicative Product | Since: base-4.8.0.0 |
| Applicative Down | Since: base-4.11.0.0 |
| Applicative ReadP | Since: base-4.6.0.0 |
| Applicative NonEmpty | Since: base-4.9.0.0 |
| Applicative Tree | |
| Applicative Seq | Since: containers-0.5.4 |
| Applicative P | Since: base-4.5.0.0 |
| Applicative Vector | |
| Applicative Array | |
| Applicative SmallArray | |
Defined in Data.Primitive.SmallArray | |
| Applicative DList | |
| Applicative IResult | |
| Applicative Parser | |
| Applicative Result | |
| Applicative (Either e) | Since: base-3.0 |
| Applicative (U1 :: Type -> Type) | Since: base-4.9.0.0 |
| Monoid a => Applicative ((,) a) | For tuples, the ("hello ", (+15)) <*> ("world!", 2002)
("hello world!",2017)Since: base-2.1 |
| Applicative (ST s) | Since: base-4.4.0.0 |
| Monad m => Applicative (WrappedMonad m) | Since: base-2.1 |
Defined in Control.Applicative Methods pure :: a -> WrappedMonad m a # (<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b # liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c # (*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b # (<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a # | |
| Arrow a => Applicative (ArrowMonad a) | Since: base-4.6.0.0 |
Defined in Control.Arrow Methods pure :: a0 -> ArrowMonad a a0 # (<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b # liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c # (*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b # (<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 # | |
| Applicative (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
| (Functor m, Monad m) => Applicative (MaybeT m) | |
| Applicative m => Applicative (ListT m) | |
| Applicative (Sem f) | |
| Applicative (Parser i) | |
| Monad m => Applicative (GenT m) | |
| Monad m => Applicative (PropertyT m) | |
Defined in Hedgehog.Internal.Property | |
| Monad m => Applicative (TestT m) | |
| Applicative m => Applicative (NodeT m) | |
| Applicative m => Applicative (TreeT m) | |
| Applicative m => Applicative (ResourceT m) | |
Defined in Control.Monad.Trans.Resource.Internal | |
| Applicative (SetM s) | |
| Applicative f => Applicative (Rec1 f) | Since: base-4.9.0.0 |
| (Monoid a, Monoid b) => Applicative ((,,) a b) | Since: base-4.14.0.0 |
| Arrow a => Applicative (WrappedArrow a b) | Since: base-2.1 |
Defined in Control.Applicative Methods pure :: a0 -> WrappedArrow a b a0 # (<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 # liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c # (*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 # (<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 # | |
| Applicative m => Applicative (Kleisli m a) | Since: base-4.14.0.0 |
Defined in Control.Arrow | |
| Monoid m => Applicative (Const m :: Type -> Type) | Since: base-2.0.1 |
| Applicative f => Applicative (Ap f) | Since: base-4.12.0.0 |
| Applicative f => Applicative (Alt f) | Since: base-4.8.0.0 |
| (Applicative f, Monad f) => Applicative (WhenMissing f x) | Equivalent to Since: containers-0.5.9 |
Defined in Data.IntMap.Internal Methods pure :: a -> WhenMissing f x a # (<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b # liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c # (*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b # (<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a # | |
| (Functor m, Monad m) => Applicative (ExceptT e m) | |
Defined in Control.Monad.Trans.Except | |
| Applicative m => Applicative (IdentityT m) | |
Defined in Control.Monad.Trans.Identity | |
| (Functor m, Monad m) => Applicative (ErrorT e m) | |
Defined in Control.Monad.Trans.Error | |
| Applicative m => Applicative (ReaderT r m) | |
Defined in Control.Monad.Trans.Reader | |
| (Functor m, Monad m) => Applicative (StateT s m) | |
Defined in Control.Monad.Trans.State.Lazy | |
| (Functor m, Monad m) => Applicative (StateT s m) | |
Defined in Control.Monad.Trans.State.Strict | |
| (Monoid w, Applicative m) => Applicative (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.Lazy | |
| (Monoid w, Applicative m) => Applicative (WriterT w m) | |
Defined in Control.Monad.Trans.Writer.Strict | |
| Applicative (Tagged s) | |
| Applicative ((->) r :: Type -> Type) | Since: base-2.1 |
| Monoid c => Applicative (K1 i c :: Type -> Type) | Since: base-4.12.0.0 |
| (Applicative f, Applicative g) => Applicative (f :*: g) | Since: base-4.9.0.0 |
| (Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) | Since: base-4.14.0.0 |
Defined in GHC.Base | |
| (Applicative f, Applicative g) => Applicative (Product f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Product | |
| (Monad f, Applicative f) => Applicative (WhenMatched f x y) | Equivalent to Since: containers-0.5.9 |
Defined in Data.IntMap.Internal Methods pure :: a -> WhenMatched f x y a # (<*>) :: WhenMatched f x y (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b # liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c # (*>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b # (<*) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y a # | |
| (Applicative f, Monad f) => Applicative (WhenMissing f k x) | Equivalent to Since: containers-0.5.9 |
Defined in Data.Map.Internal Methods pure :: a -> WhenMissing f k x a # (<*>) :: WhenMissing f k x (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b # liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c # (*>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b # (<*) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x a # | |
| Applicative (ContT r m) | |
Defined in Control.Monad.Trans.Cont | |
| Applicative f => Applicative (M1 i c f) | Since: base-4.9.0.0 |
| (Applicative f, Applicative g) => Applicative (f :.: g) | Since: base-4.9.0.0 |
| (Applicative f, Applicative g) => Applicative (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose | |
| (Monad f, Applicative f) => Applicative (WhenMatched f k x y) | Equivalent to Since: containers-0.5.9 |
Defined in Data.Map.Internal Methods pure :: a -> WhenMatched f k x y a # (<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b # liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c # (*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b # (<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a # | |
| (Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) | |
Defined in Control.Monad.Trans.RWS.Strict | |
| (Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) | |
Defined in Control.Monad.Trans.RWS.Lazy | |
class Foldable (t :: Type -> Type) where #
Data structures that can be folded.
For example, given a data type
data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)
a suitable instance would be
instance Foldable Tree where foldMap f Empty = mempty foldMap f (Leaf x) = f x foldMap f (Node l k r) = foldMap f l `mappend` f k `mappend` foldMap f r
This is suitable even for abstract types, as the monoid is assumed
to satisfy the monoid laws. Alternatively, one could define foldr:
instance Foldable Tree where foldr f z Empty = z foldr f z (Leaf x) = f x z foldr f z (Node l k r) = foldr f (f k (foldr f z r)) l
Foldable instances are expected to satisfy the following laws:
foldr f z t = appEndo (foldMap (Endo . f) t ) z
foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z
fold = foldMap id
length = getSum . foldMap (Sum . const 1)
sum, product, maximum, and minimum should all be essentially
equivalent to foldMap forms, such as
sum = getSum . foldMap Sum
but may be less defined.
If the type is also a Functor instance, it should satisfy
foldMap f = fold . fmap f
which implies that
foldMap f . fmap g = foldMap (f . g)
Methods
fold :: Monoid m => t m -> m #
Combine the elements of a structure using a monoid.
foldMap :: Monoid m => (a -> m) -> t a -> m #
Map each element of the structure to a monoid, and combine the results.
foldMap' :: Monoid m => (a -> m) -> t a -> m #
A variant of foldMap that is strict in the accumulator.
Since: base-4.13.0.0
foldr :: (a -> b -> b) -> b -> t a -> b #
Right-associative fold of a structure.
In the case of lists, foldr, when applied to a binary operator, a
starting value (typically the right-identity of the operator), and a
list, reduces the list using the binary operator, from right to left:
foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)
Note that, since the head of the resulting expression is produced by
an application of the operator to the first element of the list,
foldr can produce a terminating expression from an infinite list.
For a general Foldable structure this should be semantically identical
to,
foldr f z =foldrf z .toList
foldl' :: (b -> a -> b) -> b -> t a -> b #
Left-associative fold of a structure but with strict application of the operator.
This ensures that each step of the fold is forced to weak head normal
form before being applied, avoiding the collection of thunks that would
otherwise occur. This is often what you want to strictly reduce a finite
list to a single, monolithic result (e.g. length).
For a general Foldable structure this should be semantically identical
to,
foldl' f z =foldl'f z .toList
Since: base-4.6.0.0
List of elements of a structure, from left to right.
Since: base-4.8.0.0
Test whether the structure is empty. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.
Since: base-4.8.0.0
Returns the size/length of a finite structure as an Int. The
default implementation is optimized for structures that are similar to
cons-lists, because there is no general way to do better.
Since: base-4.8.0.0
Instances
| Foldable [] | Since: base-2.1 |
Defined in Data.Foldable Methods fold :: Monoid m => [m] -> m # foldMap :: Monoid m => (a -> m) -> [a] -> m # foldMap' :: Monoid m => (a -> m) -> [a] -> m # foldr :: (a -> b -> b) -> b -> [a] -> b # foldr' :: (a -> b -> b) -> b -> [a] -> b # foldl :: (b -> a -> b) -> b -> [a] -> b # foldl' :: (b -> a -> b) -> b -> [a] -> b # foldr1 :: (a -> a -> a) -> [a] -> a # foldl1 :: (a -> a -> a) -> [a] -> a # elem :: Eq a => a -> [a] -> Bool # maximum :: Ord a => [a] -> a # | |
| Foldable Maybe | Since: base-2.1 |
Defined in Data.Foldable Methods fold :: Monoid m => Maybe m -> m # foldMap :: Monoid m => (a -> m) -> Maybe a -> m # foldMap' :: Monoid m => (a -> m) -> Maybe a -> m # foldr :: (a -> b -> b) -> b -> Maybe a -> b # foldr' :: (a -> b -> b) -> b -> Maybe a -> b # foldl :: (b -> a -> b) -> b -> Maybe a -> b # foldl' :: (b -> a -> b) -> b -> Maybe a -> b # foldr1 :: (a -> a -> a) -> Maybe a -> a # foldl1 :: (a -> a -> a) -> Maybe a -> a # elem :: Eq a => a -> Maybe a -> Bool # maximum :: Ord a => Maybe a -> a # minimum :: Ord a => Maybe a -> a # | |
| Foldable Par1 | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Par1 m -> m # foldMap :: Monoid m => (a -> m) -> Par1 a -> m # foldMap' :: Monoid m => (a -> m) -> Par1 a -> m # foldr :: (a -> b -> b) -> b -> Par1 a -> b # foldr' :: (a -> b -> b) -> b -> Par1 a -> b # foldl :: (b -> a -> b) -> b -> Par1 a -> b # foldl' :: (b -> a -> b) -> b -> Par1 a -> b # foldr1 :: (a -> a -> a) -> Par1 a -> a # foldl1 :: (a -> a -> a) -> Par1 a -> a # elem :: Eq a => a -> Par1 a -> Bool # maximum :: Ord a => Par1 a -> a # | |
| Foldable Complex | Since: base-4.9.0.0 |
Defined in Data.Complex Methods fold :: Monoid m => Complex m -> m # foldMap :: Monoid m => (a -> m) -> Complex a -> m # foldMap' :: Monoid m => (a -> m) -> Complex a -> m # foldr :: (a -> b -> b) -> b -> Complex a -> b # foldr' :: (a -> b -> b) -> b -> Complex a -> b # foldl :: (b -> a -> b) -> b -> Complex a -> b # foldl' :: (b -> a -> b) -> b -> Complex a -> b # foldr1 :: (a -> a -> a) -> Complex a -> a # foldl1 :: (a -> a -> a) -> Complex a -> a # elem :: Eq a => a -> Complex a -> Bool # maximum :: Ord a => Complex a -> a # minimum :: Ord a => Complex a -> a # | |
| Foldable Min | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods fold :: Monoid m => Min m -> m # foldMap :: Monoid m => (a -> m) -> Min a -> m # foldMap' :: Monoid m => (a -> m) -> Min a -> m # foldr :: (a -> b -> b) -> b -> Min a -> b # foldr' :: (a -> b -> b) -> b -> Min a -> b # foldl :: (b -> a -> b) -> b -> Min a -> b # foldl' :: (b -> a -> b) -> b -> Min a -> b # foldr1 :: (a -> a -> a) -> Min a -> a # foldl1 :: (a -> a -> a) -> Min a -> a # elem :: Eq a => a -> Min a -> Bool # maximum :: Ord a => Min a -> a # | |
| Foldable Max | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods fold :: Monoid m => Max m -> m # foldMap :: Monoid m => (a -> m) -> Max a -> m # foldMap' :: Monoid m => (a -> m) -> Max a -> m # foldr :: (a -> b -> b) -> b -> Max a -> b # foldr' :: (a -> b -> b) -> b -> Max a -> b # foldl :: (b -> a -> b) -> b -> Max a -> b # foldl' :: (b -> a -> b) -> b -> Max a -> b # foldr1 :: (a -> a -> a) -> Max a -> a # foldl1 :: (a -> a -> a) -> Max a -> a # elem :: Eq a => a -> Max a -> Bool # maximum :: Ord a => Max a -> a # | |
| Foldable First | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods fold :: Monoid m => First m -> m # foldMap :: Monoid m => (a -> m) -> First a -> m # foldMap' :: Monoid m => (a -> m) -> First a -> m # foldr :: (a -> b -> b) -> b -> First a -> b # foldr' :: (a -> b -> b) -> b -> First a -> b # foldl :: (b -> a -> b) -> b -> First a -> b # foldl' :: (b -> a -> b) -> b -> First a -> b # foldr1 :: (a -> a -> a) -> First a -> a # foldl1 :: (a -> a -> a) -> First a -> a # elem :: Eq a => a -> First a -> Bool # maximum :: Ord a => First a -> a # minimum :: Ord a => First a -> a # | |
| Foldable Last | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods fold :: Monoid m => Last m -> m # foldMap :: Monoid m => (a -> m) -> Last a -> m # foldMap' :: Monoid m => (a -> m) -> Last a -> m # foldr :: (a -> b -> b) -> b -> Last a -> b # foldr' :: (a -> b -> b) -> b -> Last a -> b # foldl :: (b -> a -> b) -> b -> Last a -> b # foldl' :: (b -> a -> b) -> b -> Last a -> b # foldr1 :: (a -> a -> a) -> Last a -> a # foldl1 :: (a -> a -> a) -> Last a -> a # elem :: Eq a => a -> Last a -> Bool # maximum :: Ord a => Last a -> a # | |
| Foldable Option | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods fold :: Monoid m => Option m -> m # foldMap :: Monoid m => (a -> m) -> Option a -> m # foldMap' :: Monoid m => (a -> m) -> Option a -> m # foldr :: (a -> b -> b) -> b -> Option a -> b # foldr' :: (a -> b -> b) -> b -> Option a -> b # foldl :: (b -> a -> b) -> b -> Option a -> b # foldl' :: (b -> a -> b) -> b -> Option a -> b # foldr1 :: (a -> a -> a) -> Option a -> a # foldl1 :: (a -> a -> a) -> Option a -> a # elem :: Eq a => a -> Option a -> Bool # maximum :: Ord a => Option a -> a # minimum :: Ord a => Option a -> a # | |
| Foldable ZipList | Since: base-4.9.0.0 |
Defined in Control.Applicative Methods fold :: Monoid m => ZipList m -> m # foldMap :: Monoid m => (a -> m) -> ZipList a -> m # foldMap' :: Monoid m => (a -> m) -> ZipList a -> m # foldr :: (a -> b -> b) -> b -> ZipList a -> b # foldr' :: (a -> b -> b) -> b -> ZipList a -> b # foldl :: (b -> a -> b) -> b -> ZipList a -> b # foldl' :: (b -> a -> b) -> b -> ZipList a -> b # foldr1 :: (a -> a -> a) -> ZipList a -> a # foldl1 :: (a -> a -> a) -> ZipList a -> a # elem :: Eq a => a -> ZipList a -> Bool # maximum :: Ord a => ZipList a -> a # minimum :: Ord a => ZipList a -> a # | |
| Foldable Identity | Since: base-4.8.0.0 |
Defined in Data.Functor.Identity Methods fold :: Monoid m => Identity m -> m # foldMap :: Monoid m => (a -> m) -> Identity a -> m # foldMap' :: Monoid m => (a -> m) -> Identity a -> m # foldr :: (a -> b -> b) -> b -> Identity a -> b # foldr' :: (a -> b -> b) -> b -> Identity a -> b # foldl :: (b -> a -> b) -> b -> Identity a -> b # foldl' :: (b -> a -> b) -> b -> Identity a -> b # foldr1 :: (a -> a -> a) -> Identity a -> a # foldl1 :: (a -> a -> a) -> Identity a -> a # elem :: Eq a => a -> Identity a -> Bool # maximum :: Ord a => Identity a -> a # minimum :: Ord a => Identity a -> a # | |
| Foldable First | Since: base-4.8.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => First m -> m # foldMap :: Monoid m => (a -> m) -> First a -> m # foldMap' :: Monoid m => (a -> m) -> First a -> m # foldr :: (a -> b -> b) -> b -> First a -> b # foldr' :: (a -> b -> b) -> b -> First a -> b # foldl :: (b -> a -> b) -> b -> First a -> b # foldl' :: (b -> a -> b) -> b -> First a -> b # foldr1 :: (a -> a -> a) -> First a -> a # foldl1 :: (a -> a -> a) -> First a -> a # elem :: Eq a => a -> First a -> Bool # maximum :: Ord a => First a -> a # minimum :: Ord a => First a -> a # | |
| Foldable Last | Since: base-4.8.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Last m -> m # foldMap :: Monoid m => (a -> m) -> Last a -> m # foldMap' :: Monoid m => (a -> m) -> Last a -> m # foldr :: (a -> b -> b) -> b -> Last a -> b # foldr' :: (a -> b -> b) -> b -> Last a -> b # foldl :: (b -> a -> b) -> b -> Last a -> b # foldl' :: (b -> a -> b) -> b -> Last a -> b # foldr1 :: (a -> a -> a) -> Last a -> a # foldl1 :: (a -> a -> a) -> Last a -> a # elem :: Eq a => a -> Last a -> Bool # maximum :: Ord a => Last a -> a # | |
| Foldable Dual | Since: base-4.8.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Dual m -> m # foldMap :: Monoid m => (a -> m) -> Dual a -> m # foldMap' :: Monoid m => (a -> m) -> Dual a -> m # foldr :: (a -> b -> b) -> b -> Dual a -> b # foldr' :: (a -> b -> b) -> b -> Dual a -> b # foldl :: (b -> a -> b) -> b -> Dual a -> b # foldl' :: (b -> a -> b) -> b -> Dual a -> b # foldr1 :: (a -> a -> a) -> Dual a -> a # foldl1 :: (a -> a -> a) -> Dual a -> a # elem :: Eq a => a -> Dual a -> Bool # maximum :: Ord a => Dual a -> a # | |
| Foldable Sum | Since: base-4.8.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Sum m -> m # foldMap :: Monoid m => (a -> m) -> Sum a -> m # foldMap' :: Monoid m => (a -> m) -> Sum a -> m # foldr :: (a -> b -> b) -> b -> Sum a -> b # foldr' :: (a -> b -> b) -> b -> Sum a -> b # foldl :: (b -> a -> b) -> b -> Sum a -> b # foldl' :: (b -> a -> b) -> b -> Sum a -> b # foldr1 :: (a -> a -> a) -> Sum a -> a # foldl1 :: (a -> a -> a) -> Sum a -> a # elem :: Eq a => a -> Sum a -> Bool # maximum :: Ord a => Sum a -> a # | |
| Foldable Product | Since: base-4.8.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Product m -> m # foldMap :: Monoid m => (a -> m) -> Product a -> m # foldMap' :: Monoid m => (a -> m) -> Product a -> m # foldr :: (a -> b -> b) -> b -> Product a -> b # foldr' :: (a -> b -> b) -> b -> Product a -> b # foldl :: (b -> a -> b) -> b -> Product a -> b # foldl' :: (b -> a -> b) -> b -> Product a -> b # foldr1 :: (a -> a -> a) -> Product a -> a # foldl1 :: (a -> a -> a) -> Product a -> a # elem :: Eq a => a -> Product a -> Bool # maximum :: Ord a => Product a -> a # minimum :: Ord a => Product a -> a # | |
| Foldable Down | Since: base-4.12.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Down m -> m # foldMap :: Monoid m => (a -> m) -> Down a -> m # foldMap' :: Monoid m => (a -> m) -> Down a -> m # foldr :: (a -> b -> b) -> b -> Down a -> b # foldr' :: (a -> b -> b) -> b -> Down a -> b # foldl :: (b -> a -> b) -> b -> Down a -> b # foldl' :: (b -> a -> b) -> b -> Down a -> b # foldr1 :: (a -> a -> a) -> Down a -> a # foldl1 :: (a -> a -> a) -> Down a -> a # elem :: Eq a => a -> Down a -> Bool # maximum :: Ord a => Down a -> a # | |
| Foldable NonEmpty | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => NonEmpty m -> m # foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m # foldMap' :: Monoid m => (a -> m) -> NonEmpty a -> m # foldr :: (a -> b -> b) -> b -> NonEmpty a -> b # foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b # foldl :: (b -> a -> b) -> b -> NonEmpty a -> b # foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b # foldr1 :: (a -> a -> a) -> NonEmpty a -> a # foldl1 :: (a -> a -> a) -> NonEmpty a -> a # elem :: Eq a => a -> NonEmpty a -> Bool # maximum :: Ord a => NonEmpty a -> a # minimum :: Ord a => NonEmpty a -> a # | |
| Foldable IntMap | Folds in order of increasing key. |
Defined in Data.IntMap.Internal Methods fold :: Monoid m => IntMap m -> m # foldMap :: Monoid m => (a -> m) -> IntMap a -> m # foldMap' :: Monoid m => (a -> m) -> IntMap a -> m # foldr :: (a -> b -> b) -> b -> IntMap a -> b # foldr' :: (a -> b -> b) -> b -> IntMap a -> b # foldl :: (b -> a -> b) -> b -> IntMap a -> b # foldl' :: (b -> a -> b) -> b -> IntMap a -> b # foldr1 :: (a -> a -> a) -> IntMap a -> a # foldl1 :: (a -> a -> a) -> IntMap a -> a # elem :: Eq a => a -> IntMap a -> Bool # maximum :: Ord a => IntMap a -> a # minimum :: Ord a => IntMap a -> a # | |
| Foldable SCC | Since: containers-0.5.9 |
Defined in Data.Graph Methods fold :: Monoid m => SCC m -> m # foldMap :: Monoid m => (a -> m) -> SCC a -> m # foldMap' :: Monoid m => (a -> m) -> SCC a -> m # foldr :: (a -> b -> b) -> b -> SCC a -> b # foldr' :: (a -> b -> b) -> b -> SCC a -> b # foldl :: (b -> a -> b) -> b -> SCC a -> b # foldl' :: (b -> a -> b) -> b -> SCC a -> b # foldr1 :: (a -> a -> a) -> SCC a -> a # foldl1 :: (a -> a -> a) -> SCC a -> a # elem :: Eq a => a -> SCC a -> Bool # maximum :: Ord a => SCC a -> a # | |
| Foldable Tree | |
Defined in Data.Tree Methods fold :: Monoid m => Tree m -> m # foldMap :: Monoid m => (a -> m) -> Tree a -> m # foldMap' :: Monoid m => (a -> m) -> Tree a -> m # foldr :: (a -> b -> b) -> b -> Tree a -> b # foldr' :: (a -> b -> b) -> b -> Tree a -> b # foldl :: (b -> a -> b) -> b -> Tree a -> b # foldl' :: (b -> a -> b) -> b -> Tree a -> b # foldr1 :: (a -> a -> a) -> Tree a -> a # foldl1 :: (a -> a -> a) -> Tree a -> a # elem :: Eq a => a -> Tree a -> Bool # maximum :: Ord a => Tree a -> a # | |
| Foldable Seq | |
Defined in Data.Sequence.Internal Methods fold :: Monoid m => Seq m -> m # foldMap :: Monoid m => (a -> m) -> Seq a -> m # foldMap' :: Monoid m => (a -> m) -> Seq a -> m # foldr :: (a -> b -> b) -> b -> Seq a -> b # foldr' :: (a -> b -> b) -> b -> Seq a -> b # foldl :: (b -> a -> b) -> b -> Seq a -> b # foldl' :: (b -> a -> b) -> b -> Seq a -> b # foldr1 :: (a -> a -> a) -> Seq a -> a # foldl1 :: (a -> a -> a) -> Seq a -> a # elem :: Eq a => a -> Seq a -> Bool # maximum :: Ord a => Seq a -> a # | |
| Foldable FingerTree | |
Defined in Data.Sequence.Internal Methods fold :: Monoid m => FingerTree m -> m # foldMap :: Monoid m => (a -> m) -> FingerTree a -> m # foldMap' :: Monoid m => (a -> m) -> FingerTree a -> m # foldr :: (a -> b -> b) -> b -> FingerTree a -> b # foldr' :: (a -> b -> b) -> b -> FingerTree a -> b # foldl :: (b -> a -> b) -> b -> FingerTree a -> b # foldl' :: (b -> a -> b) -> b -> FingerTree a -> b # foldr1 :: (a -> a -> a) -> FingerTree a -> a # foldl1 :: (a -> a -> a) -> FingerTree a -> a # toList :: FingerTree a -> [a] # null :: FingerTree a -> Bool # length :: FingerTree a -> Int # elem :: Eq a => a -> FingerTree a -> Bool # maximum :: Ord a => FingerTree a -> a # minimum :: Ord a => FingerTree a -> a # sum :: Num a => FingerTree a -> a # product :: Num a => FingerTree a -> a # | |
| Foldable Digit | |
Defined in Data.Sequence.Internal Methods fold :: Monoid m => Digit m -> m # foldMap :: Monoid m => (a -> m) -> Digit a -> m # foldMap' :: Monoid m => (a -> m) -> Digit a -> m # foldr :: (a -> b -> b) -> b -> Digit a -> b # foldr' :: (a -> b -> b) -> b -> Digit a -> b # foldl :: (b -> a -> b) -> b -> Digit a -> b # foldl' :: (b -> a -> b) -> b -> Digit a -> b # foldr1 :: (a -> a -> a) -> Digit a -> a # foldl1 :: (a -> a -> a) -> Digit a -> a # elem :: Eq a => a -> Digit a -> Bool # maximum :: Ord a => Digit a -> a # minimum :: Ord a => Digit a -> a # | |
| Foldable Node | |
Defined in Data.Sequence.Internal Methods fold :: Monoid m => Node m -> m # foldMap :: Monoid m => (a -> m) -> Node a -> m # foldMap' :: Monoid m => (a -> m) -> Node a -> m # foldr :: (a -> b -> b) -> b -> Node a -> b # foldr' :: (a -> b -> b) -> b -> Node a -> b # foldl :: (b -> a -> b) -> b -> Node a -> b # foldl' :: (b -> a -> b) -> b -> Node a -> b # foldr1 :: (a -> a -> a) -> Node a -> a # foldl1 :: (a -> a -> a) -> Node a -> a # elem :: Eq a => a -> Node a -> Bool # maximum :: Ord a => Node a -> a # | |
| Foldable Elem | |
Defined in Data.Sequence.Internal Methods fold :: Monoid m => Elem m -> m # foldMap :: Monoid m => (a -> m) -> Elem a -> m # foldMap' :: Monoid m => (a -> m) -> Elem a -> m # foldr :: (a -> b -> b) -> b -> Elem a -> b # foldr' :: (a -> b -> b) -> b -> Elem a -> b # foldl :: (b -> a -> b) -> b -> Elem a -> b # foldl' :: (b -> a -> b) -> b -> Elem a -> b # foldr1 :: (a -> a -> a) -> Elem a -> a # foldl1 :: (a -> a -> a) -> Elem a -> a # elem :: Eq a => a -> Elem a -> Bool # maximum :: Ord a => Elem a -> a # | |
| Foldable ViewL | |
Defined in Data.Sequence.Internal Methods fold :: Monoid m => ViewL m -> m # foldMap :: Monoid m => (a -> m) -> ViewL a -> m # foldMap' :: Monoid m => (a -> m) -> ViewL a -> m # foldr :: (a -> b -> b) -> b -> ViewL a -> b # foldr' :: (a -> b -> b) -> b -> ViewL a -> b # foldl :: (b -> a -> b) -> b -> ViewL a -> b # foldl' :: (b -> a -> b) -> b -> ViewL a -> b # foldr1 :: (a -> a -> a) -> ViewL a -> a # foldl1 :: (a -> a -> a) -> ViewL a -> a # elem :: Eq a => a -> ViewL a -> Bool # maximum :: Ord a => ViewL a -> a # minimum :: Ord a => ViewL a -> a # | |
| Foldable ViewR | |
Defined in Data.Sequence.Internal Methods fold :: Monoid m => ViewR m -> m # foldMap :: Monoid m => (a -> m) -> ViewR a -> m # foldMap' :: Monoid m => (a -> m) -> ViewR a -> m # foldr :: (a -> b -> b) -> b -> ViewR a -> b # foldr' :: (a -> b -> b) -> b -> ViewR a -> b # foldl :: (b -> a -> b) -> b -> ViewR a -> b # foldl' :: (b -> a -> b) -> b -> ViewR a -> b # foldr1 :: (a -> a -> a) -> ViewR a -> a # foldl1 :: (a -> a -> a) -> ViewR a -> a # elem :: Eq a => a -> ViewR a -> Bool # maximum :: Ord a => ViewR a -> a # minimum :: Ord a => ViewR a -> a # | |
| Foldable Set | Folds in order of increasing key. |
Defined in Data.Set.Internal Methods fold :: Monoid m => Set m -> m # foldMap :: Monoid m => (a -> m) -> Set a -> m # foldMap' :: Monoid m => (a -> m) -> Set a -> m # foldr :: (a -> b -> b) -> b -> Set a -> b # foldr' :: (a -> b -> b) -> b -> Set a -> b # foldl :: (b -> a -> b) -> b -> Set a -> b # foldl' :: (b -> a -> b) -> b -> Set a -> b # foldr1 :: (a -> a -> a) -> Set a -> a # foldl1 :: (a -> a -> a) -> Set a -> a # elem :: Eq a => a -> Set a -> Bool # maximum :: Ord a => Set a -> a # | |
| Foldable HashSet | |
Defined in Data.HashSet.Base Methods fold :: Monoid m => HashSet m -> m # foldMap :: Monoid m => (a -> m) -> HashSet a -> m # foldMap' :: Monoid m => (a -> m) -> HashSet a -> m # foldr :: (a -> b -> b) -> b -> HashSet a -> b # foldr' :: (a -> b -> b) -> b -> HashSet a -> b # foldl :: (b -> a -> b) -> b -> HashSet a -> b # foldl' :: (b -> a -> b) -> b -> HashSet a -> b # foldr1 :: (a -> a -> a) -> HashSet a -> a # foldl1 :: (a -> a -> a) -> HashSet a -> a # elem :: Eq a => a -> HashSet a -> Bool # maximum :: Ord a => HashSet a -> a # minimum :: Ord a => HashSet a -> a # | |
| Foldable ModulePragma | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => ModulePragma m -> m # foldMap :: Monoid m => (a -> m) -> ModulePragma a -> m # foldMap' :: Monoid m => (a -> m) -> ModulePragma a -> m # foldr :: (a -> b -> b) -> b -> ModulePragma a -> b # foldr' :: (a -> b -> b) -> b -> ModulePragma a -> b # foldl :: (b -> a -> b) -> b -> ModulePragma a -> b # foldl' :: (b -> a -> b) -> b -> ModulePragma a -> b # foldr1 :: (a -> a -> a) -> ModulePragma a -> a # foldl1 :: (a -> a -> a) -> ModulePragma a -> a # toList :: ModulePragma a -> [a] # null :: ModulePragma a -> Bool # length :: ModulePragma a -> Int # elem :: Eq a => a -> ModulePragma a -> Bool # maximum :: Ord a => ModulePragma a -> a # minimum :: Ord a => ModulePragma a -> a # | |
| Foldable ModuleHead | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => ModuleHead m -> m # foldMap :: Monoid m => (a -> m) -> ModuleHead a -> m # foldMap' :: Monoid m => (a -> m) -> ModuleHead a -> m # foldr :: (a -> b -> b) -> b -> ModuleHead a -> b # foldr' :: (a -> b -> b) -> b -> ModuleHead a -> b # foldl :: (b -> a -> b) -> b -> ModuleHead a -> b # foldl' :: (b -> a -> b) -> b -> ModuleHead a -> b # foldr1 :: (a -> a -> a) -> ModuleHead a -> a # foldl1 :: (a -> a -> a) -> ModuleHead a -> a # toList :: ModuleHead a -> [a] # null :: ModuleHead a -> Bool # length :: ModuleHead a -> Int # elem :: Eq a => a -> ModuleHead a -> Bool # maximum :: Ord a => ModuleHead a -> a # minimum :: Ord a => ModuleHead a -> a # | |
| Foldable ImportDecl | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => ImportDecl m -> m # foldMap :: Monoid m => (a -> m) -> ImportDecl a -> m # foldMap' :: Monoid m => (a -> m) -> ImportDecl a -> m # foldr :: (a -> b -> b) -> b -> ImportDecl a -> b # foldr' :: (a -> b -> b) -> b -> ImportDecl a -> b # foldl :: (b -> a -> b) -> b -> ImportDecl a -> b # foldl' :: (b -> a -> b) -> b -> ImportDecl a -> b # foldr1 :: (a -> a -> a) -> ImportDecl a -> a # foldl1 :: (a -> a -> a) -> ImportDecl a -> a # toList :: ImportDecl a -> [a] # null :: ImportDecl a -> Bool # length :: ImportDecl a -> Int # elem :: Eq a => a -> ImportDecl a -> Bool # maximum :: Ord a => ImportDecl a -> a # minimum :: Ord a => ImportDecl a -> a # | |
| Foldable ModuleName | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => ModuleName m -> m # foldMap :: Monoid m => (a -> m) -> ModuleName a -> m # foldMap' :: Monoid m => (a -> m) -> ModuleName a -> m # foldr :: (a -> b -> b) -> b -> ModuleName a -> b # foldr' :: (a -> b -> b) -> b -> ModuleName a -> b # foldl :: (b -> a -> b) -> b -> ModuleName a -> b # foldl' :: (b -> a -> b) -> b -> ModuleName a -> b # foldr1 :: (a -> a -> a) -> ModuleName a -> a # foldl1 :: (a -> a -> a) -> ModuleName a -> a # toList :: ModuleName a -> [a] # null :: ModuleName a -> Bool # length :: ModuleName a -> Int # elem :: Eq a => a -> ModuleName a -> Bool # maximum :: Ord a => ModuleName a -> a # minimum :: Ord a => ModuleName a -> a # | |
| Foldable Decl | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Decl m -> m # foldMap :: Monoid m => (a -> m) -> Decl a -> m # foldMap' :: Monoid m => (a -> m) -> Decl a -> m # foldr :: (a -> b -> b) -> b -> Decl a -> b # foldr' :: (a -> b -> b) -> b -> Decl a -> b # foldl :: (b -> a -> b) -> b -> Decl a -> b # foldl' :: (b -> a -> b) -> b -> Decl a -> b # foldr1 :: (a -> a -> a) -> Decl a -> a # foldl1 :: (a -> a -> a) -> Decl a -> a # elem :: Eq a => a -> Decl a -> Bool # maximum :: Ord a => Decl a -> a # | |
| Foldable Exp | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Exp m -> m # foldMap :: Monoid m => (a -> m) -> Exp a -> m # foldMap' :: Monoid m => (a -> m) -> Exp a -> m # foldr :: (a -> b -> b) -> b -> Exp a -> b # foldr' :: (a -> b -> b) -> b -> Exp a -> b # foldl :: (b -> a -> b) -> b -> Exp a -> b # foldl' :: (b -> a -> b) -> b -> Exp a -> b # foldr1 :: (a -> a -> a) -> Exp a -> a # foldl1 :: (a -> a -> a) -> Exp a -> a # elem :: Eq a => a -> Exp a -> Bool # maximum :: Ord a => Exp a -> a # | |
| Foldable Module | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Module m -> m # foldMap :: Monoid m => (a -> m) -> Module a -> m # foldMap' :: Monoid m => (a -> m) -> Module a -> m # foldr :: (a -> b -> b) -> b -> Module a -> b # foldr' :: (a -> b -> b) -> b -> Module a -> b # foldl :: (b -> a -> b) -> b -> Module a -> b # foldl' :: (b -> a -> b) -> b -> Module a -> b # foldr1 :: (a -> a -> a) -> Module a -> a # foldl1 :: (a -> a -> a) -> Module a -> a # elem :: Eq a => a -> Module a -> Bool # maximum :: Ord a => Module a -> a # minimum :: Ord a => Module a -> a # | |
| Foldable Pat | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Pat m -> m # foldMap :: Monoid m => (a -> m) -> Pat a -> m # foldMap' :: Monoid m => (a -> m) -> Pat a -> m # foldr :: (a -> b -> b) -> b -> Pat a -> b # foldr' :: (a -> b -> b) -> b -> Pat a -> b # foldl :: (b -> a -> b) -> b -> Pat a -> b # foldl' :: (b -> a -> b) -> b -> Pat a -> b # foldr1 :: (a -> a -> a) -> Pat a -> a # foldl1 :: (a -> a -> a) -> Pat a -> a # elem :: Eq a => a -> Pat a -> Bool # maximum :: Ord a => Pat a -> a # | |
| Foldable Stmt | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Stmt m -> m # foldMap :: Monoid m => (a -> m) -> Stmt a -> m # foldMap' :: Monoid m => (a -> m) -> Stmt a -> m # foldr :: (a -> b -> b) -> b -> Stmt a -> b # foldr' :: (a -> b -> b) -> b -> Stmt a -> b # foldl :: (b -> a -> b) -> b -> Stmt a -> b # foldl' :: (b -> a -> b) -> b -> Stmt a -> b # foldr1 :: (a -> a -> a) -> Stmt a -> a # foldl1 :: (a -> a -> a) -> Stmt a -> a # elem :: Eq a => a -> Stmt a -> Bool # maximum :: Ord a => Stmt a -> a # | |
| Foldable Type | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Type m -> m # foldMap :: Monoid m => (a -> m) -> Type a -> m # foldMap' :: Monoid m => (a -> m) -> Type a -> m # foldr :: (a -> b -> b) -> b -> Type a -> b # foldr' :: (a -> b -> b) -> b -> Type a -> b # foldl :: (b -> a -> b) -> b -> Type a -> b # foldl' :: (b -> a -> b) -> b -> Type a -> b # foldr1 :: (a -> a -> a) -> Type a -> a # foldl1 :: (a -> a -> a) -> Type a -> a # elem :: Eq a => a -> Type a -> Bool # maximum :: Ord a => Type a -> a # | |
| Foldable Vector | |
Defined in Data.Vector Methods fold :: Monoid m => Vector m -> m # foldMap :: Monoid m => (a -> m) -> Vector a -> m # foldMap' :: Monoid m => (a -> m) -> Vector a -> m # foldr :: (a -> b -> b) -> b -> Vector a -> b # foldr' :: (a -> b -> b) -> b -> Vector a -> b # foldl :: (b -> a -> b) -> b -> Vector a -> b # foldl' :: (b -> a -> b) -> b -> Vector a -> b # foldr1 :: (a -> a -> a) -> Vector a -> a # foldl1 :: (a -> a -> a) -> Vector a -> a # elem :: Eq a => a -> Vector a -> Bool # maximum :: Ord a => Vector a -> a # minimum :: Ord a => Vector a -> a # | |
| Foldable Array | |
Defined in Data.Primitive.Array Methods fold :: Monoid m => Array m -> m # foldMap :: Monoid m => (a -> m) -> Array a -> m # foldMap' :: Monoid m => (a -> m) -> Array a -> m # foldr :: (a -> b -> b) -> b -> Array a -> b # foldr' :: (a -> b -> b) -> b -> Array a -> b # foldl :: (b -> a -> b) -> b -> Array a -> b # foldl' :: (b -> a -> b) -> b -> Array a -> b # foldr1 :: (a -> a -> a) -> Array a -> a # foldl1 :: (a -> a -> a) -> Array a -> a # elem :: Eq a => a -> Array a -> Bool # maximum :: Ord a => Array a -> a # minimum :: Ord a => Array a -> a # | |
| Foldable SmallArray | |
Defined in Data.Primitive.SmallArray Methods fold :: Monoid m => SmallArray m -> m # foldMap :: Monoid m => (a -> m) -> SmallArray a -> m # foldMap' :: Monoid m => (a -> m) -> SmallArray a -> m # foldr :: (a -> b -> b) -> b -> SmallArray a -> b # foldr' :: (a -> b -> b) -> b -> SmallArray a -> b # foldl :: (b -> a -> b) -> b -> SmallArray a -> b # foldl' :: (b -> a -> b) -> b -> SmallArray a -> b # foldr1 :: (a -> a -> a) -> SmallArray a -> a # foldl1 :: (a -> a -> a) -> SmallArray a -> a # toList :: SmallArray a -> [a] # null :: SmallArray a -> Bool # length :: SmallArray a -> Int # elem :: Eq a => a -> SmallArray a -> Bool # maximum :: Ord a => SmallArray a -> a # minimum :: Ord a => SmallArray a -> a # | |
| Foldable Hashed | |
Defined in Data.Hashable.Class Methods fold :: Monoid m => Hashed m -> m # foldMap :: Monoid m => (a -> m) -> Hashed a -> m # foldMap' :: Monoid m => (a -> m) -> Hashed a -> m # foldr :: (a -> b -> b) -> b -> Hashed a -> b # foldr' :: (a -> b -> b) -> b -> Hashed a -> b # foldl :: (b -> a -> b) -> b -> Hashed a -> b # foldl' :: (b -> a -> b) -> b -> Hashed a -> b # foldr1 :: (a -> a -> a) -> Hashed a -> a # foldl1 :: (a -> a -> a) -> Hashed a -> a # elem :: Eq a => a -> Hashed a -> Bool # maximum :: Ord a => Hashed a -> a # minimum :: Ord a => Hashed a -> a # | |
| Foldable Activation | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Activation m -> m # foldMap :: Monoid m => (a -> m) -> Activation a -> m # foldMap' :: Monoid m => (a -> m) -> Activation a -> m # foldr :: (a -> b -> b) -> b -> Activation a -> b # foldr' :: (a -> b -> b) -> b -> Activation a -> b # foldl :: (b -> a -> b) -> b -> Activation a -> b # foldl' :: (b -> a -> b) -> b -> Activation a -> b # foldr1 :: (a -> a -> a) -> Activation a -> a # foldl1 :: (a -> a -> a) -> Activation a -> a # toList :: Activation a -> [a] # null :: Activation a -> Bool # length :: Activation a -> Int # elem :: Eq a => a -> Activation a -> Bool # maximum :: Ord a => Activation a -> a # minimum :: Ord a => Activation a -> a # | |
| Foldable Alt | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Alt m -> m # foldMap :: Monoid m => (a -> m) -> Alt a -> m # foldMap' :: Monoid m => (a -> m) -> Alt a -> m # foldr :: (a -> b -> b) -> b -> Alt a -> b # foldr' :: (a -> b -> b) -> b -> Alt a -> b # foldl :: (b -> a -> b) -> b -> Alt a -> b # foldl' :: (b -> a -> b) -> b -> Alt a -> b # foldr1 :: (a -> a -> a) -> Alt a -> a # foldl1 :: (a -> a -> a) -> Alt a -> a # elem :: Eq a => a -> Alt a -> Bool # maximum :: Ord a => Alt a -> a # | |
| Foldable Annotation | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Annotation m -> m # foldMap :: Monoid m => (a -> m) -> Annotation a -> m # foldMap' :: Monoid m => (a -> m) -> Annotation a -> m # foldr :: (a -> b -> b) -> b -> Annotation a -> b # foldr' :: (a -> b -> b) -> b -> Annotation a -> b # foldl :: (b -> a -> b) -> b -> Annotation a -> b # foldl' :: (b -> a -> b) -> b -> Annotation a -> b # foldr1 :: (a -> a -> a) -> Annotation a -> a # foldl1 :: (a -> a -> a) -> Annotation a -> a # toList :: Annotation a -> [a] # null :: Annotation a -> Bool # length :: Annotation a -> Int # elem :: Eq a => a -> Annotation a -> Bool # maximum :: Ord a => Annotation a -> a # minimum :: Ord a => Annotation a -> a # | |
| Foldable Assoc | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Assoc m -> m # foldMap :: Monoid m => (a -> m) -> Assoc a -> m # foldMap' :: Monoid m => (a -> m) -> Assoc a -> m # foldr :: (a -> b -> b) -> b -> Assoc a -> b # foldr' :: (a -> b -> b) -> b -> Assoc a -> b # foldl :: (b -> a -> b) -> b -> Assoc a -> b # foldl' :: (b -> a -> b) -> b -> Assoc a -> b # foldr1 :: (a -> a -> a) -> Assoc a -> a # foldl1 :: (a -> a -> a) -> Assoc a -> a # elem :: Eq a => a -> Assoc a -> Bool # maximum :: Ord a => Assoc a -> a # minimum :: Ord a => Assoc a -> a # | |
| Foldable Asst | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Asst m -> m # foldMap :: Monoid m => (a -> m) -> Asst a -> m # foldMap' :: Monoid m => (a -> m) -> Asst a -> m # foldr :: (a -> b -> b) -> b -> Asst a -> b # foldr' :: (a -> b -> b) -> b -> Asst a -> b # foldl :: (b -> a -> b) -> b -> Asst a -> b # foldl' :: (b -> a -> b) -> b -> Asst a -> b # foldr1 :: (a -> a -> a) -> Asst a -> a # foldl1 :: (a -> a -> a) -> Asst a -> a # elem :: Eq a => a -> Asst a -> Bool # maximum :: Ord a => Asst a -> a # | |
| Foldable BangType | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => BangType m -> m # foldMap :: Monoid m => (a -> m) -> BangType a -> m # foldMap' :: Monoid m => (a -> m) -> BangType a -> m # foldr :: (a -> b -> b) -> b -> BangType a -> b # foldr' :: (a -> b -> b) -> b -> BangType a -> b # foldl :: (b -> a -> b) -> b -> BangType a -> b # foldl' :: (b -> a -> b) -> b -> BangType a -> b # foldr1 :: (a -> a -> a) -> BangType a -> a # foldl1 :: (a -> a -> a) -> BangType a -> a # elem :: Eq a => a -> BangType a -> Bool # maximum :: Ord a => BangType a -> a # minimum :: Ord a => BangType a -> a # | |
| Foldable Binds | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Binds m -> m # foldMap :: Monoid m => (a -> m) -> Binds a -> m # foldMap' :: Monoid m => (a -> m) -> Binds a -> m # foldr :: (a -> b -> b) -> b -> Binds a -> b # foldr' :: (a -> b -> b) -> b -> Binds a -> b # foldl :: (b -> a -> b) -> b -> Binds a -> b # foldl' :: (b -> a -> b) -> b -> Binds a -> b # foldr1 :: (a -> a -> a) -> Binds a -> a # foldl1 :: (a -> a -> a) -> Binds a -> a # elem :: Eq a => a -> Binds a -> Bool # maximum :: Ord a => Binds a -> a # minimum :: Ord a => Binds a -> a # | |
| Foldable BooleanFormula | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => BooleanFormula m -> m # foldMap :: Monoid m => (a -> m) -> BooleanFormula a -> m # foldMap' :: Monoid m => (a -> m) -> BooleanFormula a -> m # foldr :: (a -> b -> b) -> b -> BooleanFormula a -> b # foldr' :: (a -> b -> b) -> b -> BooleanFormula a -> b # foldl :: (b -> a -> b) -> b -> BooleanFormula a -> b # foldl' :: (b -> a -> b) -> b -> BooleanFormula a -> b # foldr1 :: (a -> a -> a) -> BooleanFormula a -> a # foldl1 :: (a -> a -> a) -> BooleanFormula a -> a # toList :: BooleanFormula a -> [a] # null :: BooleanFormula a -> Bool # length :: BooleanFormula a -> Int # elem :: Eq a => a -> BooleanFormula a -> Bool # maximum :: Ord a => BooleanFormula a -> a # minimum :: Ord a => BooleanFormula a -> a # | |
| Foldable Bracket | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Bracket m -> m # foldMap :: Monoid m => (a -> m) -> Bracket a -> m # foldMap' :: Monoid m => (a -> m) -> Bracket a -> m # foldr :: (a -> b -> b) -> b -> Bracket a -> b # foldr' :: (a -> b -> b) -> b -> Bracket a -> b # foldl :: (b -> a -> b) -> b -> Bracket a -> b # foldl' :: (b -> a -> b) -> b -> Bracket a -> b # foldr1 :: (a -> a -> a) -> Bracket a -> a # foldl1 :: (a -> a -> a) -> Bracket a -> a # elem :: Eq a => a -> Bracket a -> Bool # maximum :: Ord a => Bracket a -> a # minimum :: Ord a => Bracket a -> a # | |
| Foldable CName | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => CName m -> m # foldMap :: Monoid m => (a -> m) -> CName a -> m # foldMap' :: Monoid m => (a -> m) -> CName a -> m # foldr :: (a -> b -> b) -> b -> CName a -> b # foldr' :: (a -> b -> b) -> b -> CName a -> b # foldl :: (b -> a -> b) -> b -> CName a -> b # foldl' :: (b -> a -> b) -> b -> CName a -> b # foldr1 :: (a -> a -> a) -> CName a -> a # foldl1 :: (a -> a -> a) -> CName a -> a # elem :: Eq a => a -> CName a -> Bool # maximum :: Ord a => CName a -> a # minimum :: Ord a => CName a -> a # | |
| Foldable CallConv | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => CallConv m -> m # foldMap :: Monoid m => (a -> m) -> CallConv a -> m # foldMap' :: Monoid m => (a -> m) -> CallConv a -> m # foldr :: (a -> b -> b) -> b -> CallConv a -> b # foldr' :: (a -> b -> b) -> b -> CallConv a -> b # foldl :: (b -> a -> b) -> b -> CallConv a -> b # foldl' :: (b -> a -> b) -> b -> CallConv a -> b # foldr1 :: (a -> a -> a) -> CallConv a -> a # foldl1 :: (a -> a -> a) -> CallConv a -> a # elem :: Eq a => a -> CallConv a -> Bool # maximum :: Ord a => CallConv a -> a # minimum :: Ord a => CallConv a -> a # | |
| Foldable ClassDecl | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => ClassDecl m -> m # foldMap :: Monoid m => (a -> m) -> ClassDecl a -> m # foldMap' :: Monoid m => (a -> m) -> ClassDecl a -> m # foldr :: (a -> b -> b) -> b -> ClassDecl a -> b # foldr' :: (a -> b -> b) -> b -> ClassDecl a -> b # foldl :: (b -> a -> b) -> b -> ClassDecl a -> b # foldl' :: (b -> a -> b) -> b -> ClassDecl a -> b # foldr1 :: (a -> a -> a) -> ClassDecl a -> a # foldl1 :: (a -> a -> a) -> ClassDecl a -> a # toList :: ClassDecl a -> [a] # length :: ClassDecl a -> Int # elem :: Eq a => a -> ClassDecl a -> Bool # maximum :: Ord a => ClassDecl a -> a # minimum :: Ord a => ClassDecl a -> a # | |
| Foldable ConDecl | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => ConDecl m -> m # foldMap :: Monoid m => (a -> m) -> ConDecl a -> m # foldMap' :: Monoid m => (a -> m) -> ConDecl a -> m # foldr :: (a -> b -> b) -> b -> ConDecl a -> b # foldr' :: (a -> b -> b) -> b -> ConDecl a -> b # foldl :: (b -> a -> b) -> b -> ConDecl a -> b # foldl' :: (b -> a -> b) -> b -> ConDecl a -> b # foldr1 :: (a -> a -> a) -> ConDecl a -> a # foldl1 :: (a -> a -> a) -> ConDecl a -> a # elem :: Eq a => a -> ConDecl a -> Bool # maximum :: Ord a => ConDecl a -> a # minimum :: Ord a => ConDecl a -> a # | |
| Foldable Context | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Context m -> m # foldMap :: Monoid m => (a -> m) -> Context a -> m # foldMap' :: Monoid m => (a -> m) -> Context a -> m # foldr :: (a -> b -> b) -> b -> Context a -> b # foldr' :: (a -> b -> b) -> b -> Context a -> b # foldl :: (b -> a -> b) -> b -> Context a -> b # foldl' :: (b -> a -> b) -> b -> Context a -> b # foldr1 :: (a -> a -> a) -> Context a -> a # foldl1 :: (a -> a -> a) -> Context a -> a # elem :: Eq a => a -> Context a -> Bool # maximum :: Ord a => Context a -> a # minimum :: Ord a => Context a -> a # | |
| Foldable DataOrNew | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => DataOrNew m -> m # foldMap :: Monoid m => (a -> m) -> DataOrNew a -> m # foldMap' :: Monoid m => (a -> m) -> DataOrNew a -> m # foldr :: (a -> b -> b) -> b -> DataOrNew a -> b # foldr' :: (a -> b -> b) -> b -> DataOrNew a -> b # foldl :: (b -> a -> b) -> b -> DataOrNew a -> b # foldl' :: (b -> a -> b) -> b -> DataOrNew a -> b # foldr1 :: (a -> a -> a) -> DataOrNew a -> a # foldl1 :: (a -> a -> a) -> DataOrNew a -> a # toList :: DataOrNew a -> [a] # length :: DataOrNew a -> Int # elem :: Eq a => a -> DataOrNew a -> Bool # maximum :: Ord a => DataOrNew a -> a # minimum :: Ord a => DataOrNew a -> a # | |
| Foldable DeclHead | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => DeclHead m -> m # foldMap :: Monoid m => (a -> m) -> DeclHead a -> m # foldMap' :: Monoid m => (a -> m) -> DeclHead a -> m # foldr :: (a -> b -> b) -> b -> DeclHead a -> b # foldr' :: (a -> b -> b) -> b -> DeclHead a -> b # foldl :: (b -> a -> b) -> b -> DeclHead a -> b # foldl' :: (b -> a -> b) -> b -> DeclHead a -> b # foldr1 :: (a -> a -> a) -> DeclHead a -> a # foldl1 :: (a -> a -> a) -> DeclHead a -> a # elem :: Eq a => a -> DeclHead a -> Bool # maximum :: Ord a => DeclHead a -> a # minimum :: Ord a => DeclHead a -> a # | |
| Foldable DerivStrategy | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => DerivStrategy m -> m # foldMap :: Monoid m => (a -> m) -> DerivStrategy a -> m # foldMap' :: Monoid m => (a -> m) -> DerivStrategy a -> m # foldr :: (a -> b -> b) -> b -> DerivStrategy a -> b # foldr' :: (a -> b -> b) -> b -> DerivStrategy a -> b # foldl :: (b -> a -> b) -> b -> DerivStrategy a -> b # foldl' :: (b -> a -> b) -> b -> DerivStrategy a -> b # foldr1 :: (a -> a -> a) -> DerivStrategy a -> a # foldl1 :: (a -> a -> a) -> DerivStrategy a -> a # toList :: DerivStrategy a -> [a] # null :: DerivStrategy a -> Bool # length :: DerivStrategy a -> Int # elem :: Eq a => a -> DerivStrategy a -> Bool # maximum :: Ord a => DerivStrategy a -> a # minimum :: Ord a => DerivStrategy a -> a # | |
| Foldable Deriving | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Deriving m -> m # foldMap :: Monoid m => (a -> m) -> Deriving a -> m # foldMap' :: Monoid m => (a -> m) -> Deriving a -> m # foldr :: (a -> b -> b) -> b -> Deriving a -> b # foldr' :: (a -> b -> b) -> b -> Deriving a -> b # foldl :: (b -> a -> b) -> b -> Deriving a -> b # foldl' :: (b -> a -> b) -> b -> Deriving a -> b # foldr1 :: (a -> a -> a) -> Deriving a -> a # foldl1 :: (a -> a -> a) -> Deriving a -> a # elem :: Eq a => a -> Deriving a -> Bool # maximum :: Ord a => Deriving a -> a # minimum :: Ord a => Deriving a -> a # | |
| Foldable EWildcard | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => EWildcard m -> m # foldMap :: Monoid m => (a -> m) -> EWildcard a -> m # foldMap' :: Monoid m => (a -> m) -> EWildcard a -> m # foldr :: (a -> b -> b) -> b -> EWildcard a -> b # foldr' :: (a -> b -> b) -> b -> EWildcard a -> b # foldl :: (b -> a -> b) -> b -> EWildcard a -> b # foldl' :: (b -> a -> b) -> b -> EWildcard a -> b # foldr1 :: (a -> a -> a) -> EWildcard a -> a # foldl1 :: (a -> a -> a) -> EWildcard a -> a # toList :: EWildcard a -> [a] # length :: EWildcard a -> Int # elem :: Eq a => a -> EWildcard a -> Bool # maximum :: Ord a => EWildcard a -> a # minimum :: Ord a => EWildcard a -> a # | |
| Foldable ExportSpec | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => ExportSpec m -> m # foldMap :: Monoid m => (a -> m) -> ExportSpec a -> m # foldMap' :: Monoid m => (a -> m) -> ExportSpec a -> m # foldr :: (a -> b -> b) -> b -> ExportSpec a -> b # foldr' :: (a -> b -> b) -> b -> ExportSpec a -> b # foldl :: (b -> a -> b) -> b -> ExportSpec a -> b # foldl' :: (b -> a -> b) -> b -> ExportSpec a -> b # foldr1 :: (a -> a -> a) -> ExportSpec a -> a # foldl1 :: (a -> a -> a) -> ExportSpec a -> a # toList :: ExportSpec a -> [a] # null :: ExportSpec a -> Bool # length :: ExportSpec a -> Int # elem :: Eq a => a -> ExportSpec a -> Bool # maximum :: Ord a => ExportSpec a -> a # minimum :: Ord a => ExportSpec a -> a # | |
| Foldable ExportSpecList | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => ExportSpecList m -> m # foldMap :: Monoid m => (a -> m) -> ExportSpecList a -> m # foldMap' :: Monoid m => (a -> m) -> ExportSpecList a -> m # foldr :: (a -> b -> b) -> b -> ExportSpecList a -> b # foldr' :: (a -> b -> b) -> b -> ExportSpecList a -> b # foldl :: (b -> a -> b) -> b -> ExportSpecList a -> b # foldl' :: (b -> a -> b) -> b -> ExportSpecList a -> b # foldr1 :: (a -> a -> a) -> ExportSpecList a -> a # foldl1 :: (a -> a -> a) -> ExportSpecList a -> a # toList :: ExportSpecList a -> [a] # null :: ExportSpecList a -> Bool # length :: ExportSpecList a -> Int # elem :: Eq a => a -> ExportSpecList a -> Bool # maximum :: Ord a => ExportSpecList a -> a # minimum :: Ord a => ExportSpecList a -> a # | |
| Foldable FieldDecl | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => FieldDecl m -> m # foldMap :: Monoid m => (a -> m) -> FieldDecl a -> m # foldMap' :: Monoid m => (a -> m) -> FieldDecl a -> m # foldr :: (a -> b -> b) -> b -> FieldDecl a -> b # foldr' :: (a -> b -> b) -> b -> FieldDecl a -> b # foldl :: (b -> a -> b) -> b -> FieldDecl a -> b # foldl' :: (b -> a -> b) -> b -> FieldDecl a -> b # foldr1 :: (a -> a -> a) -> FieldDecl a -> a # foldl1 :: (a -> a -> a) -> FieldDecl a -> a # toList :: FieldDecl a -> [a] # length :: FieldDecl a -> Int # elem :: Eq a => a -> FieldDecl a -> Bool # maximum :: Ord a => FieldDecl a -> a # minimum :: Ord a => FieldDecl a -> a # | |
| Foldable FieldUpdate | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => FieldUpdate m -> m # foldMap :: Monoid m => (a -> m) -> FieldUpdate a -> m # foldMap' :: Monoid m => (a -> m) -> FieldUpdate a -> m # foldr :: (a -> b -> b) -> b -> FieldUpdate a -> b # foldr' :: (a -> b -> b) -> b -> FieldUpdate a -> b # foldl :: (b -> a -> b) -> b -> FieldUpdate a -> b # foldl' :: (b -> a -> b) -> b -> FieldUpdate a -> b # foldr1 :: (a -> a -> a) -> FieldUpdate a -> a # foldl1 :: (a -> a -> a) -> FieldUpdate a -> a # toList :: FieldUpdate a -> [a] # null :: FieldUpdate a -> Bool # length :: FieldUpdate a -> Int # elem :: Eq a => a -> FieldUpdate a -> Bool # maximum :: Ord a => FieldUpdate a -> a # minimum :: Ord a => FieldUpdate a -> a # | |
| Foldable FunDep | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => FunDep m -> m # foldMap :: Monoid m => (a -> m) -> FunDep a -> m # foldMap' :: Monoid m => (a -> m) -> FunDep a -> m # foldr :: (a -> b -> b) -> b -> FunDep a -> b # foldr' :: (a -> b -> b) -> b -> FunDep a -> b # foldl :: (b -> a -> b) -> b -> FunDep a -> b # foldl' :: (b -> a -> b) -> b -> FunDep a -> b # foldr1 :: (a -> a -> a) -> FunDep a -> a # foldl1 :: (a -> a -> a) -> FunDep a -> a # elem :: Eq a => a -> FunDep a -> Bool # maximum :: Ord a => FunDep a -> a # minimum :: Ord a => FunDep a -> a # | |
| Foldable GadtDecl | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => GadtDecl m -> m # foldMap :: Monoid m => (a -> m) -> GadtDecl a -> m # foldMap' :: Monoid m => (a -> m) -> GadtDecl a -> m # foldr :: (a -> b -> b) -> b -> GadtDecl a -> b # foldr' :: (a -> b -> b) -> b -> GadtDecl a -> b # foldl :: (b -> a -> b) -> b -> GadtDecl a -> b # foldl' :: (b -> a -> b) -> b -> GadtDecl a -> b # foldr1 :: (a -> a -> a) -> GadtDecl a -> a # foldl1 :: (a -> a -> a) -> GadtDecl a -> a # elem :: Eq a => a -> GadtDecl a -> Bool # maximum :: Ord a => GadtDecl a -> a # minimum :: Ord a => GadtDecl a -> a # | |
| Foldable GuardedRhs | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => GuardedRhs m -> m # foldMap :: Monoid m => (a -> m) -> GuardedRhs a -> m # foldMap' :: Monoid m => (a -> m) -> GuardedRhs a -> m # foldr :: (a -> b -> b) -> b -> GuardedRhs a -> b # foldr' :: (a -> b -> b) -> b -> GuardedRhs a -> b # foldl :: (b -> a -> b) -> b -> GuardedRhs a -> b # foldl' :: (b -> a -> b) -> b -> GuardedRhs a -> b # foldr1 :: (a -> a -> a) -> GuardedRhs a -> a # foldl1 :: (a -> a -> a) -> GuardedRhs a -> a # toList :: GuardedRhs a -> [a] # null :: GuardedRhs a -> Bool # length :: GuardedRhs a -> Int # elem :: Eq a => a -> GuardedRhs a -> Bool # maximum :: Ord a => GuardedRhs a -> a # minimum :: Ord a => GuardedRhs a -> a # | |
| Foldable IPBind | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => IPBind m -> m # foldMap :: Monoid m => (a -> m) -> IPBind a -> m # foldMap' :: Monoid m => (a -> m) -> IPBind a -> m # foldr :: (a -> b -> b) -> b -> IPBind a -> b # foldr' :: (a -> b -> b) -> b -> IPBind a -> b # foldl :: (b -> a -> b) -> b -> IPBind a -> b # foldl' :: (b -> a -> b) -> b -> IPBind a -> b # foldr1 :: (a -> a -> a) -> IPBind a -> a # foldl1 :: (a -> a -> a) -> IPBind a -> a # elem :: Eq a => a -> IPBind a -> Bool # maximum :: Ord a => IPBind a -> a # minimum :: Ord a => IPBind a -> a # | |
| Foldable IPName | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => IPName m -> m # foldMap :: Monoid m => (a -> m) -> IPName a -> m # foldMap' :: Monoid m => (a -> m) -> IPName a -> m # foldr :: (a -> b -> b) -> b -> IPName a -> b # foldr' :: (a -> b -> b) -> b -> IPName a -> b # foldl :: (b -> a -> b) -> b -> IPName a -> b # foldl' :: (b -> a -> b) -> b -> IPName a -> b # foldr1 :: (a -> a -> a) -> IPName a -> a # foldl1 :: (a -> a -> a) -> IPName a -> a # elem :: Eq a => a -> IPName a -> Bool # maximum :: Ord a => IPName a -> a # minimum :: Ord a => IPName a -> a # | |
| Foldable ImportSpec | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => ImportSpec m -> m # foldMap :: Monoid m => (a -> m) -> ImportSpec a -> m # foldMap' :: Monoid m => (a -> m) -> ImportSpec a -> m # foldr :: (a -> b -> b) -> b -> ImportSpec a -> b # foldr' :: (a -> b -> b) -> b -> ImportSpec a -> b # foldl :: (b -> a -> b) -> b -> ImportSpec a -> b # foldl' :: (b -> a -> b) -> b -> ImportSpec a -> b # foldr1 :: (a -> a -> a) -> ImportSpec a -> a # foldl1 :: (a -> a -> a) -> ImportSpec a -> a # toList :: ImportSpec a -> [a] # null :: ImportSpec a -> Bool # length :: ImportSpec a -> Int # elem :: Eq a => a -> ImportSpec a -> Bool # maximum :: Ord a => ImportSpec a -> a # minimum :: Ord a => ImportSpec a -> a # | |
| Foldable ImportSpecList | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => ImportSpecList m -> m # foldMap :: Monoid m => (a -> m) -> ImportSpecList a -> m # foldMap' :: Monoid m => (a -> m) -> ImportSpecList a -> m # foldr :: (a -> b -> b) -> b -> ImportSpecList a -> b # foldr' :: (a -> b -> b) -> b -> ImportSpecList a -> b # foldl :: (b -> a -> b) -> b -> ImportSpecList a -> b # foldl' :: (b -> a -> b) -> b -> ImportSpecList a -> b # foldr1 :: (a -> a -> a) -> ImportSpecList a -> a # foldl1 :: (a -> a -> a) -> ImportSpecList a -> a # toList :: ImportSpecList a -> [a] # null :: ImportSpecList a -> Bool # length :: ImportSpecList a -> Int # elem :: Eq a => a -> ImportSpecList a -> Bool # maximum :: Ord a => ImportSpecList a -> a # minimum :: Ord a => ImportSpecList a -> a # | |
| Foldable InjectivityInfo | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => InjectivityInfo m -> m # foldMap :: Monoid m => (a -> m) -> InjectivityInfo a -> m # foldMap' :: Monoid m => (a -> m) -> InjectivityInfo a -> m # foldr :: (a -> b -> b) -> b -> InjectivityInfo a -> b # foldr' :: (a -> b -> b) -> b -> InjectivityInfo a -> b # foldl :: (b -> a -> b) -> b -> InjectivityInfo a -> b # foldl' :: (b -> a -> b) -> b -> InjectivityInfo a -> b # foldr1 :: (a -> a -> a) -> InjectivityInfo a -> a # foldl1 :: (a -> a -> a) -> InjectivityInfo a -> a # toList :: InjectivityInfo a -> [a] # null :: InjectivityInfo a -> Bool # length :: InjectivityInfo a -> Int # elem :: Eq a => a -> InjectivityInfo a -> Bool # maximum :: Ord a => InjectivityInfo a -> a # minimum :: Ord a => InjectivityInfo a -> a # | |
| Foldable InstDecl | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => InstDecl m -> m # foldMap :: Monoid m => (a -> m) -> InstDecl a -> m # foldMap' :: Monoid m => (a -> m) -> InstDecl a -> m # foldr :: (a -> b -> b) -> b -> InstDecl a -> b # foldr' :: (a -> b -> b) -> b -> InstDecl a -> b # foldl :: (b -> a -> b) -> b -> InstDecl a -> b # foldl' :: (b -> a -> b) -> b -> InstDecl a -> b # foldr1 :: (a -> a -> a) -> InstDecl a -> a # foldl1 :: (a -> a -> a) -> InstDecl a -> a # elem :: Eq a => a -> InstDecl a -> Bool # maximum :: Ord a => InstDecl a -> a # minimum :: Ord a => InstDecl a -> a # | |
| Foldable InstHead | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => InstHead m -> m # foldMap :: Monoid m => (a -> m) -> InstHead a -> m # foldMap' :: Monoid m => (a -> m) -> InstHead a -> m # foldr :: (a -> b -> b) -> b -> InstHead a -> b # foldr' :: (a -> b -> b) -> b -> InstHead a -> b # foldl :: (b -> a -> b) -> b -> InstHead a -> b # foldl' :: (b -> a -> b) -> b -> InstHead a -> b # foldr1 :: (a -> a -> a) -> InstHead a -> a # foldl1 :: (a -> a -> a) -> InstHead a -> a # elem :: Eq a => a -> InstHead a -> Bool # maximum :: Ord a => InstHead a -> a # minimum :: Ord a => InstHead a -> a # | |
| Foldable InstRule | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => InstRule m -> m # foldMap :: Monoid m => (a -> m) -> InstRule a -> m # foldMap' :: Monoid m => (a -> m) -> InstRule a -> m # foldr :: (a -> b -> b) -> b -> InstRule a -> b # foldr' :: (a -> b -> b) -> b -> InstRule a -> b # foldl :: (b -> a -> b) -> b -> InstRule a -> b # foldl' :: (b -> a -> b) -> b -> InstRule a -> b # foldr1 :: (a -> a -> a) -> InstRule a -> a # foldl1 :: (a -> a -> a) -> InstRule a -> a # elem :: Eq a => a -> InstRule a -> Bool # maximum :: Ord a => InstRule a -> a # minimum :: Ord a => InstRule a -> a # | |
| Foldable Literal | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Literal m -> m # foldMap :: Monoid m => (a -> m) -> Literal a -> m # foldMap' :: Monoid m => (a -> m) -> Literal a -> m # foldr :: (a -> b -> b) -> b -> Literal a -> b # foldr' :: (a -> b -> b) -> b -> Literal a -> b # foldl :: (b -> a -> b) -> b -> Literal a -> b # foldl' :: (b -> a -> b) -> b -> Literal a -> b # foldr1 :: (a -> a -> a) -> Literal a -> a # foldl1 :: (a -> a -> a) -> Literal a -> a # elem :: Eq a => a -> Literal a -> Bool # maximum :: Ord a => Literal a -> a # minimum :: Ord a => Literal a -> a # | |
| Foldable Match | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Match m -> m # foldMap :: Monoid m => (a -> m) -> Match a -> m # foldMap' :: Monoid m => (a -> m) -> Match a -> m # foldr :: (a -> b -> b) -> b -> Match a -> b # foldr' :: (a -> b -> b) -> b -> Match a -> b # foldl :: (b -> a -> b) -> b -> Match a -> b # foldl' :: (b -> a -> b) -> b -> Match a -> b # foldr1 :: (a -> a -> a) -> Match a -> a # foldl1 :: (a -> a -> a) -> Match a -> a # elem :: Eq a => a -> Match a -> Bool # maximum :: Ord a => Match a -> a # minimum :: Ord a => Match a -> a # | |
| Foldable MaybePromotedName | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => MaybePromotedName m -> m # foldMap :: Monoid m => (a -> m) -> MaybePromotedName a -> m # foldMap' :: Monoid m => (a -> m) -> MaybePromotedName a -> m # foldr :: (a -> b -> b) -> b -> MaybePromotedName a -> b # foldr' :: (a -> b -> b) -> b -> MaybePromotedName a -> b # foldl :: (b -> a -> b) -> b -> MaybePromotedName a -> b # foldl' :: (b -> a -> b) -> b -> MaybePromotedName a -> b # foldr1 :: (a -> a -> a) -> MaybePromotedName a -> a # foldl1 :: (a -> a -> a) -> MaybePromotedName a -> a # toList :: MaybePromotedName a -> [a] # null :: MaybePromotedName a -> Bool # length :: MaybePromotedName a -> Int # elem :: Eq a => a -> MaybePromotedName a -> Bool # maximum :: Ord a => MaybePromotedName a -> a # minimum :: Ord a => MaybePromotedName a -> a # | |
| Foldable Name | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Name m -> m # foldMap :: Monoid m => (a -> m) -> Name a -> m # foldMap' :: Monoid m => (a -> m) -> Name a -> m # foldr :: (a -> b -> b) -> b -> Name a -> b # foldr' :: (a -> b -> b) -> b -> Name a -> b # foldl :: (b -> a -> b) -> b -> Name a -> b # foldl' :: (b -> a -> b) -> b -> Name a -> b # foldr1 :: (a -> a -> a) -> Name a -> a # foldl1 :: (a -> a -> a) -> Name a -> a # elem :: Eq a => a -> Name a -> Bool # maximum :: Ord a => Name a -> a # | |
| Foldable Namespace | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Namespace m -> m # foldMap :: Monoid m => (a -> m) -> Namespace a -> m # foldMap' :: Monoid m => (a -> m) -> Namespace a -> m # foldr :: (a -> b -> b) -> b -> Namespace a -> b # foldr' :: (a -> b -> b) -> b -> Namespace a -> b # foldl :: (b -> a -> b) -> b -> Namespace a -> b # foldl' :: (b -> a -> b) -> b -> Namespace a -> b # foldr1 :: (a -> a -> a) -> Namespace a -> a # foldl1 :: (a -> a -> a) -> Namespace a -> a # toList :: Namespace a -> [a] # length :: Namespace a -> Int # elem :: Eq a => a -> Namespace a -> Bool # maximum :: Ord a => Namespace a -> a # minimum :: Ord a => Namespace a -> a # | |
| Foldable Op | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Op m -> m # foldMap :: Monoid m => (a -> m) -> Op a -> m # foldMap' :: Monoid m => (a -> m) -> Op a -> m # foldr :: (a -> b -> b) -> b -> Op a -> b # foldr' :: (a -> b -> b) -> b -> Op a -> b # foldl :: (b -> a -> b) -> b -> Op a -> b # foldl' :: (b -> a -> b) -> b -> Op a -> b # foldr1 :: (a -> a -> a) -> Op a -> a # foldl1 :: (a -> a -> a) -> Op a -> a # elem :: Eq a => a -> Op a -> Bool # maximum :: Ord a => Op a -> a # | |
| Foldable Overlap | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Overlap m -> m # foldMap :: Monoid m => (a -> m) -> Overlap a -> m # foldMap' :: Monoid m => (a -> m) -> Overlap a -> m # foldr :: (a -> b -> b) -> b -> Overlap a -> b # foldr' :: (a -> b -> b) -> b -> Overlap a -> b # foldl :: (b -> a -> b) -> b -> Overlap a -> b # foldl' :: (b -> a -> b) -> b -> Overlap a -> b # foldr1 :: (a -> a -> a) -> Overlap a -> a # foldl1 :: (a -> a -> a) -> Overlap a -> a # elem :: Eq a => a -> Overlap a -> Bool # maximum :: Ord a => Overlap a -> a # minimum :: Ord a => Overlap a -> a # | |
| Foldable PXAttr | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => PXAttr m -> m # foldMap :: Monoid m => (a -> m) -> PXAttr a -> m # foldMap' :: Monoid m => (a -> m) -> PXAttr a -> m # foldr :: (a -> b -> b) -> b -> PXAttr a -> b # foldr' :: (a -> b -> b) -> b -> PXAttr a -> b # foldl :: (b -> a -> b) -> b -> PXAttr a -> b # foldl' :: (b -> a -> b) -> b -> PXAttr a -> b # foldr1 :: (a -> a -> a) -> PXAttr a -> a # foldl1 :: (a -> a -> a) -> PXAttr a -> a # elem :: Eq a => a -> PXAttr a -> Bool # maximum :: Ord a => PXAttr a -> a # minimum :: Ord a => PXAttr a -> a # | |
| Foldable PatField | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => PatField m -> m # foldMap :: Monoid m => (a -> m) -> PatField a -> m # foldMap' :: Monoid m => (a -> m) -> PatField a -> m # foldr :: (a -> b -> b) -> b -> PatField a -> b # foldr' :: (a -> b -> b) -> b -> PatField a -> b # foldl :: (b -> a -> b) -> b -> PatField a -> b # foldl' :: (b -> a -> b) -> b -> PatField a -> b # foldr1 :: (a -> a -> a) -> PatField a -> a # foldl1 :: (a -> a -> a) -> PatField a -> a # elem :: Eq a => a -> PatField a -> Bool # maximum :: Ord a => PatField a -> a # minimum :: Ord a => PatField a -> a # | |
| Foldable PatternSynDirection | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => PatternSynDirection m -> m # foldMap :: Monoid m => (a -> m) -> PatternSynDirection a -> m # foldMap' :: Monoid m => (a -> m) -> PatternSynDirection a -> m # foldr :: (a -> b -> b) -> b -> PatternSynDirection a -> b # foldr' :: (a -> b -> b) -> b -> PatternSynDirection a -> b # foldl :: (b -> a -> b) -> b -> PatternSynDirection a -> b # foldl' :: (b -> a -> b) -> b -> PatternSynDirection a -> b # foldr1 :: (a -> a -> a) -> PatternSynDirection a -> a # foldl1 :: (a -> a -> a) -> PatternSynDirection a -> a # toList :: PatternSynDirection a -> [a] # null :: PatternSynDirection a -> Bool # length :: PatternSynDirection a -> Int # elem :: Eq a => a -> PatternSynDirection a -> Bool # maximum :: Ord a => PatternSynDirection a -> a # minimum :: Ord a => PatternSynDirection a -> a # | |
| Foldable Promoted | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Promoted m -> m # foldMap :: Monoid m => (a -> m) -> Promoted a -> m # foldMap' :: Monoid m => (a -> m) -> Promoted a -> m # foldr :: (a -> b -> b) -> b -> Promoted a -> b # foldr' :: (a -> b -> b) -> b -> Promoted a -> b # foldl :: (b -> a -> b) -> b -> Promoted a -> b # foldl' :: (b -> a -> b) -> b -> Promoted a -> b # foldr1 :: (a -> a -> a) -> Promoted a -> a # foldl1 :: (a -> a -> a) -> Promoted a -> a # elem :: Eq a => a -> Promoted a -> Bool # maximum :: Ord a => Promoted a -> a # minimum :: Ord a => Promoted a -> a # | |
| Foldable QName | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => QName m -> m # foldMap :: Monoid m => (a -> m) -> QName a -> m # foldMap' :: Monoid m => (a -> m) -> QName a -> m # foldr :: (a -> b -> b) -> b -> QName a -> b # foldr' :: (a -> b -> b) -> b -> QName a -> b # foldl :: (b -> a -> b) -> b -> QName a -> b # foldl' :: (b -> a -> b) -> b -> QName a -> b # foldr1 :: (a -> a -> a) -> QName a -> a # foldl1 :: (a -> a -> a) -> QName a -> a # elem :: Eq a => a -> QName a -> Bool # maximum :: Ord a => QName a -> a # minimum :: Ord a => QName a -> a # | |
| Foldable QOp | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => QOp m -> m # foldMap :: Monoid m => (a -> m) -> QOp a -> m # foldMap' :: Monoid m => (a -> m) -> QOp a -> m # foldr :: (a -> b -> b) -> b -> QOp a -> b # foldr' :: (a -> b -> b) -> b -> QOp a -> b # foldl :: (b -> a -> b) -> b -> QOp a -> b # foldl' :: (b -> a -> b) -> b -> QOp a -> b # foldr1 :: (a -> a -> a) -> QOp a -> a # foldl1 :: (a -> a -> a) -> QOp a -> a # elem :: Eq a => a -> QOp a -> Bool # maximum :: Ord a => QOp a -> a # | |
| Foldable QualConDecl | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => QualConDecl m -> m # foldMap :: Monoid m => (a -> m) -> QualConDecl a -> m # foldMap' :: Monoid m => (a -> m) -> QualConDecl a -> m # foldr :: (a -> b -> b) -> b -> QualConDecl a -> b # foldr' :: (a -> b -> b) -> b -> QualConDecl a -> b # foldl :: (b -> a -> b) -> b -> QualConDecl a -> b # foldl' :: (b -> a -> b) -> b -> QualConDecl a -> b # foldr1 :: (a -> a -> a) -> QualConDecl a -> a # foldl1 :: (a -> a -> a) -> QualConDecl a -> a # toList :: QualConDecl a -> [a] # null :: QualConDecl a -> Bool # length :: QualConDecl a -> Int # elem :: Eq a => a -> QualConDecl a -> Bool # maximum :: Ord a => QualConDecl a -> a # minimum :: Ord a => QualConDecl a -> a # | |
| Foldable QualStmt | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => QualStmt m -> m # foldMap :: Monoid m => (a -> m) -> QualStmt a -> m # foldMap' :: Monoid m => (a -> m) -> QualStmt a -> m # foldr :: (a -> b -> b) -> b -> QualStmt a -> b # foldr' :: (a -> b -> b) -> b -> QualStmt a -> b # foldl :: (b -> a -> b) -> b -> QualStmt a -> b # foldl' :: (b -> a -> b) -> b -> QualStmt a -> b # foldr1 :: (a -> a -> a) -> QualStmt a -> a # foldl1 :: (a -> a -> a) -> QualStmt a -> a # elem :: Eq a => a -> QualStmt a -> Bool # maximum :: Ord a => QualStmt a -> a # minimum :: Ord a => QualStmt a -> a # | |
| Foldable RPat | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => RPat m -> m # foldMap :: Monoid m => (a -> m) -> RPat a -> m # foldMap' :: Monoid m => (a -> m) -> RPat a -> m # foldr :: (a -> b -> b) -> b -> RPat a -> b # foldr' :: (a -> b -> b) -> b -> RPat a -> b # foldl :: (b -> a -> b) -> b -> RPat a -> b # foldl' :: (b -> a -> b) -> b -> RPat a -> b # foldr1 :: (a -> a -> a) -> RPat a -> a # foldl1 :: (a -> a -> a) -> RPat a -> a # elem :: Eq a => a -> RPat a -> Bool # maximum :: Ord a => RPat a -> a # | |
| Foldable RPatOp | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => RPatOp m -> m # foldMap :: Monoid m => (a -> m) -> RPatOp a -> m # foldMap' :: Monoid m => (a -> m) -> RPatOp a -> m # foldr :: (a -> b -> b) -> b -> RPatOp a -> b # foldr' :: (a -> b -> b) -> b -> RPatOp a -> b # foldl :: (b -> a -> b) -> b -> RPatOp a -> b # foldl' :: (b -> a -> b) -> b -> RPatOp a -> b # foldr1 :: (a -> a -> a) -> RPatOp a -> a # foldl1 :: (a -> a -> a) -> RPatOp a -> a # elem :: Eq a => a -> RPatOp a -> Bool # maximum :: Ord a => RPatOp a -> a # minimum :: Ord a => RPatOp a -> a # | |
| Foldable ResultSig | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => ResultSig m -> m # foldMap :: Monoid m => (a -> m) -> ResultSig a -> m # foldMap' :: Monoid m => (a -> m) -> ResultSig a -> m # foldr :: (a -> b -> b) -> b -> ResultSig a -> b # foldr' :: (a -> b -> b) -> b -> ResultSig a -> b # foldl :: (b -> a -> b) -> b -> ResultSig a -> b # foldl' :: (b -> a -> b) -> b -> ResultSig a -> b # foldr1 :: (a -> a -> a) -> ResultSig a -> a # foldl1 :: (a -> a -> a) -> ResultSig a -> a # toList :: ResultSig a -> [a] # length :: ResultSig a -> Int # elem :: Eq a => a -> ResultSig a -> Bool # maximum :: Ord a => ResultSig a -> a # minimum :: Ord a => ResultSig a -> a # | |
| Foldable Rhs | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Rhs m -> m # foldMap :: Monoid m => (a -> m) -> Rhs a -> m # foldMap' :: Monoid m => (a -> m) -> Rhs a -> m # foldr :: (a -> b -> b) -> b -> Rhs a -> b # foldr' :: (a -> b -> b) -> b -> Rhs a -> b # foldl :: (b -> a -> b) -> b -> Rhs a -> b # foldl' :: (b -> a -> b) -> b -> Rhs a -> b # foldr1 :: (a -> a -> a) -> Rhs a -> a # foldl1 :: (a -> a -> a) -> Rhs a -> a # elem :: Eq a => a -> Rhs a -> Bool # maximum :: Ord a => Rhs a -> a # | |
| Foldable Role | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Role m -> m # foldMap :: Monoid m => (a -> m) -> Role a -> m # foldMap' :: Monoid m => (a -> m) -> Role a -> m # foldr :: (a -> b -> b) -> b -> Role a -> b # foldr' :: (a -> b -> b) -> b -> Role a -> b # foldl :: (b -> a -> b) -> b -> Role a -> b # foldl' :: (b -> a -> b) -> b -> Role a -> b # foldr1 :: (a -> a -> a) -> Role a -> a # foldl1 :: (a -> a -> a) -> Role a -> a # elem :: Eq a => a -> Role a -> Bool # maximum :: Ord a => Role a -> a # | |
| Foldable Rule | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Rule m -> m # foldMap :: Monoid m => (a -> m) -> Rule a -> m # foldMap' :: Monoid m => (a -> m) -> Rule a -> m # foldr :: (a -> b -> b) -> b -> Rule a -> b # foldr' :: (a -> b -> b) -> b -> Rule a -> b # foldl :: (b -> a -> b) -> b -> Rule a -> b # foldl' :: (b -> a -> b) -> b -> Rule a -> b # foldr1 :: (a -> a -> a) -> Rule a -> a # foldl1 :: (a -> a -> a) -> Rule a -> a # elem :: Eq a => a -> Rule a -> Bool # maximum :: Ord a => Rule a -> a # | |
| Foldable RuleVar | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => RuleVar m -> m # foldMap :: Monoid m => (a -> m) -> RuleVar a -> m # foldMap' :: Monoid m => (a -> m) -> RuleVar a -> m # foldr :: (a -> b -> b) -> b -> RuleVar a -> b # foldr' :: (a -> b -> b) -> b -> RuleVar a -> b # foldl :: (b -> a -> b) -> b -> RuleVar a -> b # foldl' :: (b -> a -> b) -> b -> RuleVar a -> b # foldr1 :: (a -> a -> a) -> RuleVar a -> a # foldl1 :: (a -> a -> a) -> RuleVar a -> a # elem :: Eq a => a -> RuleVar a -> Bool # maximum :: Ord a => RuleVar a -> a # minimum :: Ord a => RuleVar a -> a # | |
| Foldable Safety | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Safety m -> m # foldMap :: Monoid m => (a -> m) -> Safety a -> m # foldMap' :: Monoid m => (a -> m) -> Safety a -> m # foldr :: (a -> b -> b) -> b -> Safety a -> b # foldr' :: (a -> b -> b) -> b -> Safety a -> b # foldl :: (b -> a -> b) -> b -> Safety a -> b # foldl' :: (b -> a -> b) -> b -> Safety a -> b # foldr1 :: (a -> a -> a) -> Safety a -> a # foldl1 :: (a -> a -> a) -> Safety a -> a # elem :: Eq a => a -> Safety a -> Bool # maximum :: Ord a => Safety a -> a # minimum :: Ord a => Safety a -> a # | |
| Foldable Sign | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Sign m -> m # foldMap :: Monoid m => (a -> m) -> Sign a -> m # foldMap' :: Monoid m => (a -> m) -> Sign a -> m # foldr :: (a -> b -> b) -> b -> Sign a -> b # foldr' :: (a -> b -> b) -> b -> Sign a -> b # foldl :: (b -> a -> b) -> b -> Sign a -> b # foldl' :: (b -> a -> b) -> b -> Sign a -> b # foldr1 :: (a -> a -> a) -> Sign a -> a # foldl1 :: (a -> a -> a) -> Sign a -> a # elem :: Eq a => a -> Sign a -> Bool # maximum :: Ord a => Sign a -> a # | |
| Foldable SpecialCon | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => SpecialCon m -> m # foldMap :: Monoid m => (a -> m) -> SpecialCon a -> m # foldMap' :: Monoid m => (a -> m) -> SpecialCon a -> m # foldr :: (a -> b -> b) -> b -> SpecialCon a -> b # foldr' :: (a -> b -> b) -> b -> SpecialCon a -> b # foldl :: (b -> a -> b) -> b -> SpecialCon a -> b # foldl' :: (b -> a -> b) -> b -> SpecialCon a -> b # foldr1 :: (a -> a -> a) -> SpecialCon a -> a # foldl1 :: (a -> a -> a) -> SpecialCon a -> a # toList :: SpecialCon a -> [a] # null :: SpecialCon a -> Bool # length :: SpecialCon a -> Int # elem :: Eq a => a -> SpecialCon a -> Bool # maximum :: Ord a => SpecialCon a -> a # minimum :: Ord a => SpecialCon a -> a # | |
| Foldable Splice | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Splice m -> m # foldMap :: Monoid m => (a -> m) -> Splice a -> m # foldMap' :: Monoid m => (a -> m) -> Splice a -> m # foldr :: (a -> b -> b) -> b -> Splice a -> b # foldr' :: (a -> b -> b) -> b -> Splice a -> b # foldl :: (b -> a -> b) -> b -> Splice a -> b # foldl' :: (b -> a -> b) -> b -> Splice a -> b # foldr1 :: (a -> a -> a) -> Splice a -> a # foldl1 :: (a -> a -> a) -> Splice a -> a # elem :: Eq a => a -> Splice a -> Bool # maximum :: Ord a => Splice a -> a # minimum :: Ord a => Splice a -> a # | |
| Foldable TyVarBind | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => TyVarBind m -> m # foldMap :: Monoid m => (a -> m) -> TyVarBind a -> m # foldMap' :: Monoid m => (a -> m) -> TyVarBind a -> m # foldr :: (a -> b -> b) -> b -> TyVarBind a -> b # foldr' :: (a -> b -> b) -> b -> TyVarBind a -> b # foldl :: (b -> a -> b) -> b -> TyVarBind a -> b # foldl' :: (b -> a -> b) -> b -> TyVarBind a -> b # foldr1 :: (a -> a -> a) -> TyVarBind a -> a # foldl1 :: (a -> a -> a) -> TyVarBind a -> a # toList :: TyVarBind a -> [a] # length :: TyVarBind a -> Int # elem :: Eq a => a -> TyVarBind a -> Bool # maximum :: Ord a => TyVarBind a -> a # minimum :: Ord a => TyVarBind a -> a # | |
| Foldable TypeEqn | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => TypeEqn m -> m # foldMap :: Monoid m => (a -> m) -> TypeEqn a -> m # foldMap' :: Monoid m => (a -> m) -> TypeEqn a -> m # foldr :: (a -> b -> b) -> b -> TypeEqn a -> b # foldr' :: (a -> b -> b) -> b -> TypeEqn a -> b # foldl :: (b -> a -> b) -> b -> TypeEqn a -> b # foldl' :: (b -> a -> b) -> b -> TypeEqn a -> b # foldr1 :: (a -> a -> a) -> TypeEqn a -> a # foldl1 :: (a -> a -> a) -> TypeEqn a -> a # elem :: Eq a => a -> TypeEqn a -> Bool # maximum :: Ord a => TypeEqn a -> a # minimum :: Ord a => TypeEqn a -> a # | |
| Foldable Unpackedness | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => Unpackedness m -> m # foldMap :: Monoid m => (a -> m) -> Unpackedness a -> m # foldMap' :: Monoid m => (a -> m) -> Unpackedness a -> m # foldr :: (a -> b -> b) -> b -> Unpackedness a -> b # foldr' :: (a -> b -> b) -> b -> Unpackedness a -> b # foldl :: (b -> a -> b) -> b -> Unpackedness a -> b # foldl' :: (b -> a -> b) -> b -> Unpackedness a -> b # foldr1 :: (a -> a -> a) -> Unpackedness a -> a # foldl1 :: (a -> a -> a) -> Unpackedness a -> a # toList :: Unpackedness a -> [a] # null :: Unpackedness a -> Bool # length :: Unpackedness a -> Int # elem :: Eq a => a -> Unpackedness a -> Bool # maximum :: Ord a => Unpackedness a -> a # minimum :: Ord a => Unpackedness a -> a # | |
| Foldable WarningText | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => WarningText m -> m # foldMap :: Monoid m => (a -> m) -> WarningText a -> m # foldMap' :: Monoid m => (a -> m) -> WarningText a -> m # foldr :: (a -> b -> b) -> b -> WarningText a -> b # foldr' :: (a -> b -> b) -> b -> WarningText a -> b # foldl :: (b -> a -> b) -> b -> WarningText a -> b # foldl' :: (b -> a -> b) -> b -> WarningText a -> b # foldr1 :: (a -> a -> a) -> WarningText a -> a # foldl1 :: (a -> a -> a) -> WarningText a -> a # toList :: WarningText a -> [a] # null :: WarningText a -> Bool # length :: WarningText a -> Int # elem :: Eq a => a -> WarningText a -> Bool # maximum :: Ord a => WarningText a -> a # minimum :: Ord a => WarningText a -> a # | |
| Foldable XAttr | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => XAttr m -> m # foldMap :: Monoid m => (a -> m) -> XAttr a -> m # foldMap' :: Monoid m => (a -> m) -> XAttr a -> m # foldr :: (a -> b -> b) -> b -> XAttr a -> b # foldr' :: (a -> b -> b) -> b -> XAttr a -> b # foldl :: (b -> a -> b) -> b -> XAttr a -> b # foldl' :: (b -> a -> b) -> b -> XAttr a -> b # foldr1 :: (a -> a -> a) -> XAttr a -> a # foldl1 :: (a -> a -> a) -> XAttr a -> a # elem :: Eq a => a -> XAttr a -> Bool # maximum :: Ord a => XAttr a -> a # minimum :: Ord a => XAttr a -> a # | |
| Foldable XName | |
Defined in Language.Haskell.Exts.Syntax Methods fold :: Monoid m => XName m -> m # foldMap :: Monoid m => (a -> m) -> XName a -> m # foldMap' :: Monoid m => (a -> m) -> XName a -> m # foldr :: (a -> b -> b) -> b -> XName a -> b # foldr' :: (a -> b -> b) -> b -> XName a -> b # foldl :: (b -> a -> b) -> b -> XName a -> b # foldl' :: (b -> a -> b) -> b -> XName a -> b # foldr1 :: (a -> a -> a) -> XName a -> a # foldl1 :: (a -> a -> a) -> XName a -> a # elem :: Eq a => a -> XName a -> Bool # maximum :: Ord a => XName a -> a # minimum :: Ord a => XName a -> a # | |
| Foldable DList | |
Defined in Data.DList Methods fold :: Monoid m => DList m -> m # foldMap :: Monoid m => (a -> m) -> DList a -> m # foldMap' :: Monoid m => (a -> m) -> DList a -> m # foldr :: (a -> b -> b) -> b -> DList a -> b # foldr' :: (a -> b -> b) -> b -> DList a -> b # foldl :: (b -> a -> b) -> b -> DList a -> b # foldl' :: (b -> a -> b) -> b -> DList a -> b # foldr1 :: (a -> a -> a) -> DList a -> a # foldl1 :: (a -> a -> a) -> DList a -> a # elem :: Eq a => a -> DList a -> Bool # maximum :: Ord a => DList a -> a # minimum :: Ord a => DList a -> a # | |
| Foldable IResult | |
Defined in Data.Aeson.Types.Internal Methods fold :: Monoid m => IResult m -> m # foldMap :: Monoid m => (a -> m) -> IResult a -> m # foldMap' :: Monoid m => (a -> m) -> IResult a -> m # foldr :: (a -> b -> b) -> b -> IResult a -> b # foldr' :: (a -> b -> b) -> b -> IResult a -> b # foldl :: (b -> a -> b) -> b -> IResult a -> b # foldl' :: (b -> a -> b) -> b -> IResult a -> b # foldr1 :: (a -> a -> a) -> IResult a -> a # foldl1 :: (a -> a -> a) -> IResult a -> a # elem :: Eq a => a -> IResult a -> Bool # maximum :: Ord a => IResult a -> a # minimum :: Ord a => IResult a -> a # | |
| Foldable Result | |
Defined in Data.Aeson.Types.Internal Methods fold :: Monoid m => Result m -> m # foldMap :: Monoid m => (a -> m) -> Result a -> m # foldMap' :: Monoid m => (a -> m) -> Result a -> m # foldr :: (a -> b -> b) -> b -> Result a -> b # foldr' :: (a -> b -> b) -> b -> Result a -> b # foldl :: (b -> a -> b) -> b -> Result a -> b # foldl' :: (b -> a -> b) -> b -> Result a -> b # foldr1 :: (a -> a -> a) -> Result a -> a # foldl1 :: (a -> a -> a) -> Result a -> a # elem :: Eq a => a -> Result a -> Bool # maximum :: Ord a => Result a -> a # minimum :: Ord a => Result a -> a # | |
| Foldable Tree | |
Defined in Hedgehog.Internal.Tree Methods fold :: Monoid m => Tree m -> m # foldMap :: Monoid m => (a -> m) -> Tree a -> m # foldMap' :: Monoid m => (a -> m) -> Tree a -> m # foldr :: (a -> b -> b) -> b -> Tree a -> b # foldr' :: (a -> b -> b) -> b -> Tree a -> b # foldl :: (b -> a -> b) -> b -> Tree a -> b # foldl' :: (b -> a -> b) -> b -> Tree a -> b # foldr1 :: (a -> a -> a) -> Tree a -> a # foldl1 :: (a -> a -> a) -> Tree a -> a # elem :: Eq a => a -> Tree a -> Bool # maximum :: Ord a => Tree a -> a # | |
| Foldable Coverage | |
Defined in Hedgehog.Internal.Property Methods fold :: Monoid m => Coverage m -> m # foldMap :: Monoid m => (a -> m) -> Coverage a -> m # foldMap' :: Monoid m => (a -> m) -> Coverage a -> m # foldr :: (a -> b -> b) -> b -> Coverage a -> b # foldr' :: (a -> b -> b) -> b -> Coverage a -> b # foldl :: (b -> a -> b) -> b -> Coverage a -> b # foldl' :: (b -> a -> b) -> b -> Coverage a -> b # foldr1 :: (a -> a -> a) -> Coverage a -> a # foldl1 :: (a -> a -> a) -> Coverage a -> a # elem :: Eq a => a -> Coverage a -> Bool # maximum :: Ord a => Coverage a -> a # minimum :: Ord a => Coverage a -> a # | |
| Foldable Label | |
Defined in Hedgehog.Internal.Property Methods fold :: Monoid m => Label m -> m # foldMap :: Monoid m => (a -> m) -> Label a -> m # foldMap' :: Monoid m => (a -> m) -> Label a -> m # foldr :: (a -> b -> b) -> b -> Label a -> b # foldr' :: (a -> b -> b) -> b -> Label a -> b # foldl :: (b -> a -> b) -> b -> Label a -> b # foldl' :: (b -> a -> b) -> b -> Label a -> b # foldr1 :: (a -> a -> a) -> Label a -> a # foldl1 :: (a -> a -> a) -> Label a -> a # elem :: Eq a => a -> Label a -> Bool # maximum :: Ord a => Label a -> a # minimum :: Ord a => Label a -> a # | |
| Foldable Node | |
Defined in Hedgehog.Internal.Tree Methods fold :: Monoid m => Node m -> m # foldMap :: Monoid m => (a -> m) -> Node a -> m # foldMap' :: Monoid m => (a -> m) -> Node a -> m # foldr :: (a -> b -> b) -> b -> Node a -> b # foldr' :: (a -> b -> b) -> b -> Node a -> b # foldl :: (b -> a -> b) -> b -> Node a -> b # foldl' :: (b -> a -> b) -> b -> Node a -> b # foldr1 :: (a -> a -> a) -> Node a -> a # foldl1 :: (a -> a -> a) -> Node a -> a # elem :: Eq a => a -> Node a -> Bool # maximum :: Ord a => Node a -> a # | |
| Foldable Window | |
Defined in System.Console.Terminal.Common Methods fold :: Monoid m => Window m -> m # foldMap :: Monoid m => (a -> m) -> Window a -> m # foldMap' :: Monoid m => (a -> m) -> Window a -> m # foldr :: (a -> b -> b) -> b -> Window a -> b # foldr' :: (a -> b -> b) -> b -> Window a -> b # foldl :: (b -> a -> b) -> b -> Window a -> b # foldl' :: (b -> a -> b) -> b -> Window a -> b # foldr1 :: (a -> a -> a) -> Window a -> a # foldl1 :: (a -> a -> a) -> Window a -> a # elem :: Eq a => a -> Window a -> Bool # maximum :: Ord a => Window a -> a # minimum :: Ord a => Window a -> a # | |
| Foldable SimpleDoc | |
Defined in Text.PrettyPrint.Annotated.WL Methods fold :: Monoid m => SimpleDoc m -> m # foldMap :: Monoid m => (a -> m) -> SimpleDoc a -> m # foldMap' :: Monoid m => (a -> m) -> SimpleDoc a -> m # foldr :: (a -> b -> b) -> b -> SimpleDoc a -> b # foldr' :: (a -> b -> b) -> b -> SimpleDoc a -> b # foldl :: (b -> a -> b) -> b -> SimpleDoc a -> b # foldl' :: (b -> a -> b) -> b -> SimpleDoc a -> b # foldr1 :: (a -> a -> a) -> SimpleDoc a -> a # foldl1 :: (a -> a -> a) -> SimpleDoc a -> a # toList :: SimpleDoc a -> [a] # length :: SimpleDoc a -> Int # elem :: Eq a => a -> SimpleDoc a -> Bool # maximum :: Ord a => SimpleDoc a -> a # minimum :: Ord a => SimpleDoc a -> a # | |
| Foldable (Either a) | Since: base-4.7.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Either a m -> m # foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 # toList :: Either a a0 -> [a0] # length :: Either a a0 -> Int # elem :: Eq a0 => a0 -> Either a a0 -> Bool # maximum :: Ord a0 => Either a a0 -> a0 # minimum :: Ord a0 => Either a a0 -> a0 # | |
| Foldable (V1 :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => V1 m -> m # foldMap :: Monoid m => (a -> m) -> V1 a -> m # foldMap' :: Monoid m => (a -> m) -> V1 a -> m # foldr :: (a -> b -> b) -> b -> V1 a -> b # foldr' :: (a -> b -> b) -> b -> V1 a -> b # foldl :: (b -> a -> b) -> b -> V1 a -> b # foldl' :: (b -> a -> b) -> b -> V1 a -> b # foldr1 :: (a -> a -> a) -> V1 a -> a # foldl1 :: (a -> a -> a) -> V1 a -> a # elem :: Eq a => a -> V1 a -> Bool # maximum :: Ord a => V1 a -> a # | |
| Foldable (U1 :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => U1 m -> m # foldMap :: Monoid m => (a -> m) -> U1 a -> m # foldMap' :: Monoid m => (a -> m) -> U1 a -> m # foldr :: (a -> b -> b) -> b -> U1 a -> b # foldr' :: (a -> b -> b) -> b -> U1 a -> b # foldl :: (b -> a -> b) -> b -> U1 a -> b # foldl' :: (b -> a -> b) -> b -> U1 a -> b # foldr1 :: (a -> a -> a) -> U1 a -> a # foldl1 :: (a -> a -> a) -> U1 a -> a # elem :: Eq a => a -> U1 a -> Bool # maximum :: Ord a => U1 a -> a # | |
| Foldable (UAddr :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => UAddr m -> m # foldMap :: Monoid m => (a -> m) -> UAddr a -> m # foldMap' :: Monoid m => (a -> m) -> UAddr a -> m # foldr :: (a -> b -> b) -> b -> UAddr a -> b # foldr' :: (a -> b -> b) -> b -> UAddr a -> b # foldl :: (b -> a -> b) -> b -> UAddr a -> b # foldl' :: (b -> a -> b) -> b -> UAddr a -> b # foldr1 :: (a -> a -> a) -> UAddr a -> a # foldl1 :: (a -> a -> a) -> UAddr a -> a # elem :: Eq a => a -> UAddr a -> Bool # maximum :: Ord a => UAddr a -> a # minimum :: Ord a => UAddr a -> a # | |
| Foldable (UChar :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => UChar m -> m # foldMap :: Monoid m => (a -> m) -> UChar a -> m # foldMap' :: Monoid m => (a -> m) -> UChar a -> m # foldr :: (a -> b -> b) -> b -> UChar a -> b # foldr' :: (a -> b -> b) -> b -> UChar a -> b # foldl :: (b -> a -> b) -> b -> UChar a -> b # foldl' :: (b -> a -> b) -> b -> UChar a -> b # foldr1 :: (a -> a -> a) -> UChar a -> a # foldl1 :: (a -> a -> a) -> UChar a -> a # elem :: Eq a => a -> UChar a -> Bool # maximum :: Ord a => UChar a -> a # minimum :: Ord a => UChar a -> a # | |
| Foldable (UDouble :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => UDouble m -> m # foldMap :: Monoid m => (a -> m) -> UDouble a -> m # foldMap' :: Monoid m => (a -> m) -> UDouble a -> m # foldr :: (a -> b -> b) -> b -> UDouble a -> b # foldr' :: (a -> b -> b) -> b -> UDouble a -> b # foldl :: (b -> a -> b) -> b -> UDouble a -> b # foldl' :: (b -> a -> b) -> b -> UDouble a -> b # foldr1 :: (a -> a -> a) -> UDouble a -> a # foldl1 :: (a -> a -> a) -> UDouble a -> a # elem :: Eq a => a -> UDouble a -> Bool # maximum :: Ord a => UDouble a -> a # minimum :: Ord a => UDouble a -> a # | |
| Foldable (UFloat :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => UFloat m -> m # foldMap :: Monoid m => (a -> m) -> UFloat a -> m # foldMap' :: Monoid m => (a -> m) -> UFloat a -> m # foldr :: (a -> b -> b) -> b -> UFloat a -> b # foldr' :: (a -> b -> b) -> b -> UFloat a -> b # foldl :: (b -> a -> b) -> b -> UFloat a -> b # foldl' :: (b -> a -> b) -> b -> UFloat a -> b # foldr1 :: (a -> a -> a) -> UFloat a -> a # foldl1 :: (a -> a -> a) -> UFloat a -> a # elem :: Eq a => a -> UFloat a -> Bool # maximum :: Ord a => UFloat a -> a # minimum :: Ord a => UFloat a -> a # | |
| Foldable (UInt :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => UInt m -> m # foldMap :: Monoid m => (a -> m) -> UInt a -> m # foldMap' :: Monoid m => (a -> m) -> UInt a -> m # foldr :: (a -> b -> b) -> b -> UInt a -> b # foldr' :: (a -> b -> b) -> b -> UInt a -> b # foldl :: (b -> a -> b) -> b -> UInt a -> b # foldl' :: (b -> a -> b) -> b -> UInt a -> b # foldr1 :: (a -> a -> a) -> UInt a -> a # foldl1 :: (a -> a -> a) -> UInt a -> a # elem :: Eq a => a -> UInt a -> Bool # maximum :: Ord a => UInt a -> a # | |
| Foldable (UWord :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => UWord m -> m # foldMap :: Monoid m => (a -> m) -> UWord a -> m # foldMap' :: Monoid m => (a -> m) -> UWord a -> m # foldr :: (a -> b -> b) -> b -> UWord a -> b # foldr' :: (a -> b -> b) -> b -> UWord a -> b # foldl :: (b -> a -> b) -> b -> UWord a -> b # foldl' :: (b -> a -> b) -> b -> UWord a -> b # foldr1 :: (a -> a -> a) -> UWord a -> a # foldl1 :: (a -> a -> a) -> UWord a -> a # elem :: Eq a => a -> UWord a -> Bool # maximum :: Ord a => UWord a -> a # minimum :: Ord a => UWord a -> a # | |
| Foldable ((,) a) | Since: base-4.7.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => (a, m) -> m # foldMap :: Monoid m => (a0 -> m) -> (a, a0) -> m # foldMap' :: Monoid m => (a0 -> m) -> (a, a0) -> m # foldr :: (a0 -> b -> b) -> b -> (a, a0) -> b # foldr' :: (a0 -> b -> b) -> b -> (a, a0) -> b # foldl :: (b -> a0 -> b) -> b -> (a, a0) -> b # foldl' :: (b -> a0 -> b) -> b -> (a, a0) -> b # foldr1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 # foldl1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 # elem :: Eq a0 => a0 -> (a, a0) -> Bool # maximum :: Ord a0 => (a, a0) -> a0 # minimum :: Ord a0 => (a, a0) -> a0 # | |
| Foldable (Array i) | Since: base-4.8.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Array i m -> m # foldMap :: Monoid m => (a -> m) -> Array i a -> m # foldMap' :: Monoid m => (a -> m) -> Array i a -> m # foldr :: (a -> b -> b) -> b -> Array i a -> b # foldr' :: (a -> b -> b) -> b -> Array i a -> b # foldl :: (b -> a -> b) -> b -> Array i a -> b # foldl' :: (b -> a -> b) -> b -> Array i a -> b # foldr1 :: (a -> a -> a) -> Array i a -> a # foldl1 :: (a -> a -> a) -> Array i a -> a # elem :: Eq a => a -> Array i a -> Bool # maximum :: Ord a => Array i a -> a # minimum :: Ord a => Array i a -> a # | |
| Foldable (Arg a) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods fold :: Monoid m => Arg a m -> m # foldMap :: Monoid m => (a0 -> m) -> Arg a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Arg a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Arg a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Arg a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Arg a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Arg a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 # elem :: Eq a0 => a0 -> Arg a a0 -> Bool # maximum :: Ord a0 => Arg a a0 -> a0 # minimum :: Ord a0 => Arg a a0 -> a0 # | |
| Foldable (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Proxy m -> m # foldMap :: Monoid m => (a -> m) -> Proxy a -> m # foldMap' :: Monoid m => (a -> m) -> Proxy a -> m # foldr :: (a -> b -> b) -> b -> Proxy a -> b # foldr' :: (a -> b -> b) -> b -> Proxy a -> b # foldl :: (b -> a -> b) -> b -> Proxy a -> b # foldl' :: (b -> a -> b) -> b -> Proxy a -> b # foldr1 :: (a -> a -> a) -> Proxy a -> a # foldl1 :: (a -> a -> a) -> Proxy a -> a # elem :: Eq a => a -> Proxy a -> Bool # maximum :: Ord a => Proxy a -> a # minimum :: Ord a => Proxy a -> a # | |
| Foldable (Map k) | Folds in order of increasing key. |
Defined in Data.Map.Internal Methods fold :: Monoid m => Map k m -> m # foldMap :: Monoid m => (a -> m) -> Map k a -> m # foldMap' :: Monoid m => (a -> m) -> Map k a -> m # foldr :: (a -> b -> b) -> b -> Map k a -> b # foldr' :: (a -> b -> b) -> b -> Map k a -> b # foldl :: (b -> a -> b) -> b -> Map k a -> b # foldl' :: (b -> a -> b) -> b -> Map k a -> b # foldr1 :: (a -> a -> a) -> Map k a -> a # foldl1 :: (a -> a -> a) -> Map k a -> a # elem :: Eq a => a -> Map k a -> Bool # maximum :: Ord a => Map k a -> a # minimum :: Ord a => Map k a -> a # | |
| Foldable f => Foldable (MaybeT f) | |
Defined in Control.Monad.Trans.Maybe Methods fold :: Monoid m => MaybeT f m -> m # foldMap :: Monoid m => (a -> m) -> MaybeT f a -> m # foldMap' :: Monoid m => (a -> m) -> MaybeT f a -> m # foldr :: (a -> b -> b) -> b -> MaybeT f a -> b # foldr' :: (a -> b -> b) -> b -> MaybeT f a -> b # foldl :: (b -> a -> b) -> b -> MaybeT f a -> b # foldl' :: (b -> a -> b) -> b -> MaybeT f a -> b # foldr1 :: (a -> a -> a) -> MaybeT f a -> a # foldl1 :: (a -> a -> a) -> MaybeT f a -> a # elem :: Eq a => a -> MaybeT f a -> Bool # maximum :: Ord a => MaybeT f a -> a # minimum :: Ord a => MaybeT f a -> a # | |
| Foldable f => Foldable (ListT f) | |
Defined in Control.Monad.Trans.List Methods fold :: Monoid m => ListT f m -> m # foldMap :: Monoid m => (a -> m) -> ListT f a -> m # foldMap' :: Monoid m => (a -> m) -> ListT f a -> m # foldr :: (a -> b -> b) -> b -> ListT f a -> b # foldr' :: (a -> b -> b) -> b -> ListT f a -> b # foldl :: (b -> a -> b) -> b -> ListT f a -> b # foldl' :: (b -> a -> b) -> b -> ListT f a -> b # foldr1 :: (a -> a -> a) -> ListT f a -> a # foldl1 :: (a -> a -> a) -> ListT f a -> a # elem :: Eq a => a -> ListT f a -> Bool # maximum :: Ord a => ListT f a -> a # minimum :: Ord a => ListT f a -> a # | |
| Foldable (HashMap k) | |
Defined in Data.HashMap.Base Methods fold :: Monoid m => HashMap k m -> m # foldMap :: Monoid m => (a -> m) -> HashMap k a -> m # foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m # foldr :: (a -> b -> b) -> b -> HashMap k a -> b # foldr' :: (a -> b -> b) -> b -> HashMap k a -> b # foldl :: (b -> a -> b) -> b -> HashMap k a -> b # foldl' :: (b -> a -> b) -> b -> HashMap k a -> b # foldr1 :: (a -> a -> a) -> HashMap k a -> a # foldl1 :: (a -> a -> a) -> HashMap k a -> a # toList :: HashMap k a -> [a] # length :: HashMap k a -> Int # elem :: Eq a => a -> HashMap k a -> Bool # maximum :: Ord a => HashMap k a -> a # minimum :: Ord a => HashMap k a -> a # | |
| Foldable (Vec n) | |
Defined in Hedgehog.Internal.Gen Methods fold :: Monoid m => Vec n m -> m # foldMap :: Monoid m => (a -> m) -> Vec n a -> m # foldMap' :: Monoid m => (a -> m) -> Vec n a -> m # foldr :: (a -> b -> b) -> b -> Vec n a -> b # foldr' :: (a -> b -> b) -> b -> Vec n a -> b # foldl :: (b -> a -> b) -> b -> Vec n a -> b # foldl' :: (b -> a -> b) -> b -> Vec n a -> b # foldr1 :: (a -> a -> a) -> Vec n a -> a # foldl1 :: (a -> a -> a) -> Vec n a -> a # elem :: Eq a => a -> Vec n a -> Bool # maximum :: Ord a => Vec n a -> a # minimum :: Ord a => Vec n a -> a # | |
| Foldable (Subterms n) | |
Defined in Hedgehog.Internal.Gen Methods fold :: Monoid m => Subterms n m -> m # foldMap :: Monoid m => (a -> m) -> Subterms n a -> m # foldMap' :: Monoid m => (a -> m) -> Subterms n a -> m # foldr :: (a -> b -> b) -> b -> Subterms n a -> b # foldr' :: (a -> b -> b) -> b -> Subterms n a -> b # foldl :: (b -> a -> b) -> b -> Subterms n a -> b # foldl' :: (b -> a -> b) -> b -> Subterms n a -> b # foldr1 :: (a -> a -> a) -> Subterms n a -> a # foldl1 :: (a -> a -> a) -> Subterms n a -> a # toList :: Subterms n a -> [a] # null :: Subterms n a -> Bool # length :: Subterms n a -> Int # elem :: Eq a => a -> Subterms n a -> Bool # maximum :: Ord a => Subterms n a -> a # minimum :: Ord a => Subterms n a -> a # | |
| Foldable f => Foldable (Rec1 f) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Rec1 f m -> m # foldMap :: Monoid m => (a -> m) -> Rec1 f a -> m # foldMap' :: Monoid m => (a -> m) -> Rec1 f a -> m # foldr :: (a -> b -> b) -> b -> Rec1 f a -> b # foldr' :: (a -> b -> b) -> b -> Rec1 f a -> b # foldl :: (b -> a -> b) -> b -> Rec1 f a -> b # foldl' :: (b -> a -> b) -> b -> Rec1 f a -> b # foldr1 :: (a -> a -> a) -> Rec1 f a -> a # foldl1 :: (a -> a -> a) -> Rec1 f a -> a # elem :: Eq a => a -> Rec1 f a -> Bool # maximum :: Ord a => Rec1 f a -> a # minimum :: Ord a => Rec1 f a -> a # | |
| Foldable (Const m :: Type -> Type) | Since: base-4.7.0.0 |
Defined in Data.Functor.Const Methods fold :: Monoid m0 => Const m m0 -> m0 # foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 # foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 # foldr :: (a -> b -> b) -> b -> Const m a -> b # foldr' :: (a -> b -> b) -> b -> Const m a -> b # foldl :: (b -> a -> b) -> b -> Const m a -> b # foldl' :: (b -> a -> b) -> b -> Const m a -> b # foldr1 :: (a -> a -> a) -> Const m a -> a # foldl1 :: (a -> a -> a) -> Const m a -> a # elem :: Eq a => a -> Const m a -> Bool # maximum :: Ord a => Const m a -> a # minimum :: Ord a => Const m a -> a # | |
| Foldable f => Foldable (Ap f) | Since: base-4.12.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Ap f m -> m # foldMap :: Monoid m => (a -> m) -> Ap f a -> m # foldMap' :: Monoid m => (a -> m) -> Ap f a -> m # foldr :: (a -> b -> b) -> b -> Ap f a -> b # foldr' :: (a -> b -> b) -> b -> Ap f a -> b # foldl :: (b -> a -> b) -> b -> Ap f a -> b # foldl' :: (b -> a -> b) -> b -> Ap f a -> b # foldr1 :: (a -> a -> a) -> Ap f a -> a # foldl1 :: (a -> a -> a) -> Ap f a -> a # elem :: Eq a => a -> Ap f a -> Bool # maximum :: Ord a => Ap f a -> a # | |
| Foldable f => Foldable (Alt f) | Since: base-4.12.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Alt f m -> m # foldMap :: Monoid m => (a -> m) -> Alt f a -> m # foldMap' :: Monoid m => (a -> m) -> Alt f a -> m # foldr :: (a -> b -> b) -> b -> Alt f a -> b # foldr' :: (a -> b -> b) -> b -> Alt f a -> b # foldl :: (b -> a -> b) -> b -> Alt f a -> b # foldl' :: (b -> a -> b) -> b -> Alt f a -> b # foldr1 :: (a -> a -> a) -> Alt f a -> a # foldl1 :: (a -> a -> a) -> Alt f a -> a # elem :: Eq a => a -> Alt f a -> Bool # maximum :: Ord a => Alt f a -> a # minimum :: Ord a => Alt f a -> a # | |
| Foldable f => Foldable (ExceptT e f) | |
Defined in Control.Monad.Trans.Except Methods fold :: Monoid m => ExceptT e f m -> m # foldMap :: Monoid m => (a -> m) -> ExceptT e f a -> m # foldMap' :: Monoid m => (a -> m) -> ExceptT e f a -> m # foldr :: (a -> b -> b) -> b -> ExceptT e f a -> b # foldr' :: (a -> b -> b) -> b -> ExceptT e f a -> b # foldl :: (b -> a -> b) -> b -> ExceptT e f a -> b # foldl' :: (b -> a -> b) -> b -> ExceptT e f a -> b # foldr1 :: (a -> a -> a) -> ExceptT e f a -> a # foldl1 :: (a -> a -> a) -> ExceptT e f a -> a # toList :: ExceptT e f a -> [a] # null :: ExceptT e f a -> Bool # length :: ExceptT e f a -> Int # elem :: Eq a => a -> ExceptT e f a -> Bool # maximum :: Ord a => ExceptT e f a -> a # minimum :: Ord a => ExceptT e f a -> a # | |
| Foldable f => Foldable (IdentityT f) | |
Defined in Control.Monad.Trans.Identity Methods fold :: Monoid m => IdentityT f m -> m # foldMap :: Monoid m => (a -> m) -> IdentityT f a -> m # foldMap' :: Monoid m => (a -> m) -> IdentityT f a -> m # foldr :: (a -> b -> b) -> b -> IdentityT f a -> b # foldr' :: (a -> b -> b) -> b -> IdentityT f a -> b # foldl :: (b -> a -> b) -> b -> IdentityT f a -> b # foldl' :: (b -> a -> b) -> b -> IdentityT f a -> b # foldr1 :: (a -> a -> a) -> IdentityT f a -> a # foldl1 :: (a -> a -> a) -> IdentityT f a -> a # toList :: IdentityT f a -> [a] # null :: IdentityT f a -> Bool # length :: IdentityT f a -> Int # elem :: Eq a => a -> IdentityT f a -> Bool # maximum :: Ord a => IdentityT f a -> a # minimum :: Ord a => IdentityT f a -> a # | |
| Foldable f => Foldable (ErrorT e f) | |
Defined in Control.Monad.Trans.Error Methods fold :: Monoid m => ErrorT e f m -> m # foldMap :: Monoid m => (a -> m) -> ErrorT e f a -> m # foldMap' :: Monoid m => (a -> m) -> ErrorT e f a -> m # foldr :: (a -> b -> b) -> b -> ErrorT e f a -> b # foldr' :: (a -> b -> b) -> b -> ErrorT e f a -> b # foldl :: (b -> a -> b) -> b -> ErrorT e f a -> b # foldl' :: (b -> a -> b) -> b -> ErrorT e f a -> b # foldr1 :: (a -> a -> a) -> ErrorT e f a -> a # foldl1 :: (a -> a -> a) -> ErrorT e f a -> a # toList :: ErrorT e f a -> [a] # null :: ErrorT e f a -> Bool # length :: ErrorT e f a -> Int # elem :: Eq a => a -> ErrorT e f a -> Bool # maximum :: Ord a => ErrorT e f a -> a # minimum :: Ord a => ErrorT e f a -> a # | |
| Foldable f => Foldable (WriterT w f) | |
Defined in Control.Monad.Trans.Writer.Lazy Methods fold :: Monoid m => WriterT w f m -> m # foldMap :: Monoid m => (a -> m) -> WriterT w f a -> m # foldMap' :: Monoid m => (a -> m) -> WriterT w f a -> m # foldr :: (a -> b -> b) -> b -> WriterT w f a -> b # foldr' :: (a -> b -> b) -> b -> WriterT w f a -> b # foldl :: (b -> a -> b) -> b -> WriterT w f a -> b # foldl' :: (b -> a -> b) -> b -> WriterT w f a -> b # foldr1 :: (a -> a -> a) -> WriterT w f a -> a # foldl1 :: (a -> a -> a) -> WriterT w f a -> a # toList :: WriterT w f a -> [a] # null :: WriterT w f a -> Bool # length :: WriterT w f a -> Int # elem :: Eq a => a -> WriterT w f a -> Bool # maximum :: Ord a => WriterT w f a -> a # minimum :: Ord a => WriterT w f a -> a # | |
| Foldable f => Foldable (WriterT w f) | |
Defined in Control.Monad.Trans.Writer.Strict Methods fold :: Monoid m => WriterT w f m -> m # foldMap :: Monoid m => (a -> m) -> WriterT w f a -> m # foldMap' :: Monoid m => (a -> m) -> WriterT w f a -> m # foldr :: (a -> b -> b) -> b -> WriterT w f a -> b # foldr' :: (a -> b -> b) -> b -> WriterT w f a -> b # foldl :: (b -> a -> b) -> b -> WriterT w f a -> b # foldl' :: (b -> a -> b) -> b -> WriterT w f a -> b # foldr1 :: (a -> a -> a) -> WriterT w f a -> a # foldl1 :: (a -> a -> a) -> WriterT w f a -> a # toList :: WriterT w f a -> [a] # null :: WriterT w f a -> Bool # length :: WriterT w f a -> Int # elem :: Eq a => a -> WriterT w f a -> Bool # maximum :: Ord a => WriterT w f a -> a # minimum :: Ord a => WriterT w f a -> a # | |
| Foldable (Tagged s) | |
Defined in Data.Tagged Methods fold :: Monoid m => Tagged s m -> m # foldMap :: Monoid m => (a -> m) -> Tagged s a -> m # foldMap' :: Monoid m => (a -> m) -> Tagged s a -> m # foldr :: (a -> b -> b) -> b -> Tagged s a -> b # foldr' :: (a -> b -> b) -> b -> Tagged s a -> b # foldl :: (b -> a -> b) -> b -> Tagged s a -> b # foldl' :: (b -> a -> b) -> b -> Tagged s a -> b # foldr1 :: (a -> a -> a) -> Tagged s a -> a # foldl1 :: (a -> a -> a) -> Tagged s a -> a # elem :: Eq a => a -> Tagged s a -> Bool # maximum :: Ord a => Tagged s a -> a # minimum :: Ord a => Tagged s a -> a # | |
| Foldable (K1 i c :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => K1 i c m -> m # foldMap :: Monoid m => (a -> m) -> K1 i c a -> m # foldMap' :: Monoid m => (a -> m) -> K1 i c a -> m # foldr :: (a -> b -> b) -> b -> K1 i c a -> b # foldr' :: (a -> b -> b) -> b -> K1 i c a -> b # foldl :: (b -> a -> b) -> b -> K1 i c a -> b # foldl' :: (b -> a -> b) -> b -> K1 i c a -> b # foldr1 :: (a -> a -> a) -> K1 i c a -> a # foldl1 :: (a -> a -> a) -> K1 i c a -> a # elem :: Eq a => a -> K1 i c a -> Bool # maximum :: Ord a => K1 i c a -> a # minimum :: Ord a => K1 i c a -> a # | |
| (Foldable f, Foldable g) => Foldable (f :+: g) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => (f :+: g) m -> m # foldMap :: Monoid m => (a -> m) -> (f :+: g) a -> m # foldMap' :: Monoid m => (a -> m) -> (f :+: g) a -> m # foldr :: (a -> b -> b) -> b -> (f :+: g) a -> b # foldr' :: (a -> b -> b) -> b -> (f :+: g) a -> b # foldl :: (b -> a -> b) -> b -> (f :+: g) a -> b # foldl' :: (b -> a -> b) -> b -> (f :+: g) a -> b # foldr1 :: (a -> a -> a) -> (f :+: g) a -> a # foldl1 :: (a -> a -> a) -> (f :+: g) a -> a # toList :: (f :+: g) a -> [a] # length :: (f :+: g) a -> Int # elem :: Eq a => a -> (f :+: g) a -> Bool # maximum :: Ord a => (f :+: g) a -> a # minimum :: Ord a => (f :+: g) a -> a # | |
| (Foldable f, Foldable g) => Foldable (f :*: g) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => (f :*: g) m -> m # foldMap :: Monoid m => (a -> m) -> (f :*: g) a -> m # foldMap' :: Monoid m => (a -> m) -> (f :*: g) a -> m # foldr :: (a -> b -> b) -> b -> (f :*: g) a -> b # foldr' :: (a -> b -> b) -> b -> (f :*: g) a -> b # foldl :: (b -> a -> b) -> b -> (f :*: g) a -> b # foldl' :: (b -> a -> b) -> b -> (f :*: g) a -> b # foldr1 :: (a -> a -> a) -> (f :*: g) a -> a # foldl1 :: (a -> a -> a) -> (f :*: g) a -> a # toList :: (f :*: g) a -> [a] # length :: (f :*: g) a -> Int # elem :: Eq a => a -> (f :*: g) a -> Bool # maximum :: Ord a => (f :*: g) a -> a # minimum :: Ord a => (f :*: g) a -> a # | |
| (Foldable f, Foldable g) => Foldable (Product f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Product Methods fold :: Monoid m => Product f g m -> m # foldMap :: Monoid m => (a -> m) -> Product f g a -> m # foldMap' :: Monoid m => (a -> m) -> Product f g a -> m # foldr :: (a -> b -> b) -> b -> Product f g a -> b # foldr' :: (a -> b -> b) -> b -> Product f g a -> b # foldl :: (b -> a -> b) -> b -> Product f g a -> b # foldl' :: (b -> a -> b) -> b -> Product f g a -> b # foldr1 :: (a -> a -> a) -> Product f g a -> a # foldl1 :: (a -> a -> a) -> Product f g a -> a # toList :: Product f g a -> [a] # null :: Product f g a -> Bool # length :: Product f g a -> Int # elem :: Eq a => a -> Product f g a -> Bool # maximum :: Ord a => Product f g a -> a # minimum :: Ord a => Product f g a -> a # | |
| (Foldable f, Foldable g) => Foldable (Sum f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Sum Methods fold :: Monoid m => Sum f g m -> m # foldMap :: Monoid m => (a -> m) -> Sum f g a -> m # foldMap' :: Monoid m => (a -> m) -> Sum f g a -> m # foldr :: (a -> b -> b) -> b -> Sum f g a -> b # foldr' :: (a -> b -> b) -> b -> Sum f g a -> b # foldl :: (b -> a -> b) -> b -> Sum f g a -> b # foldl' :: (b -> a -> b) -> b -> Sum f g a -> b # foldr1 :: (a -> a -> a) -> Sum f g a -> a # foldl1 :: (a -> a -> a) -> Sum f g a -> a # elem :: Eq a => a -> Sum f g a -> Bool # maximum :: Ord a => Sum f g a -> a # minimum :: Ord a => Sum f g a -> a # | |
| Foldable f => Foldable (M1 i c f) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => M1 i c f m -> m # foldMap :: Monoid m => (a -> m) -> M1 i c f a -> m # foldMap' :: Monoid m => (a -> m) -> M1 i c f a -> m # foldr :: (a -> b -> b) -> b -> M1 i c f a -> b # foldr' :: (a -> b -> b) -> b -> M1 i c f a -> b # foldl :: (b -> a -> b) -> b -> M1 i c f a -> b # foldl' :: (b -> a -> b) -> b -> M1 i c f a -> b # foldr1 :: (a -> a -> a) -> M1 i c f a -> a # foldl1 :: (a -> a -> a) -> M1 i c f a -> a # elem :: Eq a => a -> M1 i c f a -> Bool # maximum :: Ord a => M1 i c f a -> a # minimum :: Ord a => M1 i c f a -> a # | |
| (Foldable f, Foldable g) => Foldable (f :.: g) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => (f :.: g) m -> m # foldMap :: Monoid m => (a -> m) -> (f :.: g) a -> m # foldMap' :: Monoid m => (a -> m) -> (f :.: g) a -> m # foldr :: (a -> b -> b) -> b -> (f :.: g) a -> b # foldr' :: (a -> b -> b) -> b -> (f :.: g) a -> b # foldl :: (b -> a -> b) -> b -> (f :.: g) a -> b # foldl' :: (b -> a -> b) -> b -> (f :.: g) a -> b # foldr1 :: (a -> a -> a) -> (f :.: g) a -> a # foldl1 :: (a -> a -> a) -> (f :.: g) a -> a # toList :: (f :.: g) a -> [a] # length :: (f :.: g) a -> Int # elem :: Eq a => a -> (f :.: g) a -> Bool # maximum :: Ord a => (f :.: g) a -> a # minimum :: Ord a => (f :.: g) a -> a # | |
| (Foldable f, Foldable g) => Foldable (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose Methods fold :: Monoid m => Compose f g m -> m # foldMap :: Monoid m => (a -> m) -> Compose f g a -> m # foldMap' :: Monoid m => (a -> m) -> Compose f g a -> m # foldr :: (a -> b -> b) -> b -> Compose f g a -> b # foldr' :: (a -> b -> b) -> b -> Compose f g a -> b # foldl :: (b -> a -> b) -> b -> Compose f g a -> b # foldl' :: (b -> a -> b) -> b -> Compose f g a -> b # foldr1 :: (a -> a -> a) -> Compose f g a -> a # foldl1 :: (a -> a -> a) -> Compose f g a -> a # toList :: Compose f g a -> [a] # null :: Compose f g a -> Bool # length :: Compose f g a -> Int # elem :: Eq a => a -> Compose f g a -> Bool # maximum :: Ord a => Compose f g a -> a # minimum :: Ord a => Compose f g a -> a # | |
class (Functor t, Foldable t) => Traversable (t :: Type -> Type) where #
Functors representing data structures that can be traversed from left to right.
A definition of traverse must satisfy the following laws:
- Naturality
t .for every applicative transformationtraversef =traverse(t . f)t- Identity
traverseIdentity=Identity- Composition
traverse(Compose.fmapg . f) =Compose.fmap(traverseg) .traversef
A definition of sequenceA must satisfy the following laws:
- Naturality
t .for every applicative transformationsequenceA=sequenceA.fmaptt- Identity
sequenceA.fmapIdentity=Identity- Composition
sequenceA.fmapCompose=Compose.fmapsequenceA.sequenceA
where an applicative transformation is a function
t :: (Applicative f, Applicative g) => f a -> g a
preserving the Applicative operations, i.e.
t (purex) =purex t (f<*>x) = t f<*>t x
and the identity functor Identity and composition functors
Compose are from Data.Functor.Identity and
Data.Functor.Compose.
A result of the naturality law is a purity law for traverse
traversepure=pure
(The naturality law is implied by parametricity and thus so is the purity law [1, p15].)
Instances are similar to Functor, e.g. given a data type
data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)
a suitable instance would be
instance Traversable Tree where traverse f Empty = pure Empty traverse f (Leaf x) = Leaf <$> f x traverse f (Node l k r) = Node <$> traverse f l <*> f k <*> traverse f r
This is suitable even for abstract types, as the laws for <*>
imply a form of associativity.
The superclass instances should satisfy the following:
- In the
Functorinstance,fmapshould be equivalent to traversal with the identity applicative functor (fmapDefault). - In the
Foldableinstance,foldMapshould be equivalent to traversal with a constant applicative functor (foldMapDefault).
References: [1] The Essence of the Iterator Pattern, Jeremy Gibbons and Bruno C. d. S. Oliveira
Methods
traverse :: Applicative f => (a -> f b) -> t a -> f (t b) #
Map each element of a structure to an action, evaluate these actions
from left to right, and collect the results. For a version that ignores
the results see traverse_.
sequenceA :: Applicative f => t (f a) -> f (t a) #
Evaluate each action in the structure from left to right, and
collect the results. For a version that ignores the results
see sequenceA_.
mapM :: Monad m => (a -> m b) -> t a -> m (t b) #
Map each element of a structure to a monadic action, evaluate
these actions from left to right, and collect the results. For
a version that ignores the results see mapM_.
sequence :: Monad m => t (m a) -> m (t a) #
Evaluate each monadic action in the structure from left to
right, and collect the results. For a version that ignores the
results see sequence_.
Instances
Representable types of kind *.
This class is derivable in GHC with the DeriveGeneric flag on.
A Generic instance must satisfy the following laws:
from.to≡idto.from≡id
Instances
| Generic Bool | Since: base-4.6.0.0 |
| Generic Ordering | Since: base-4.6.0.0 |
| Generic Exp | |
| Generic Match | |
| Generic Clause | |
| Generic Pat | |
| Generic Type | |
| Generic Dec | |
| Generic Name | |
| Generic FunDep | |
| Generic InjectivityAnn | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep InjectivityAnn :: Type -> Type # Methods from :: InjectivityAnn -> Rep InjectivityAnn x # to :: Rep InjectivityAnn x -> InjectivityAnn # | |
| Generic Overlap | |
| Generic () | Since: base-4.6.0.0 |
| Generic Void | Since: base-4.8.0.0 |
| Generic Version | Since: base-4.9.0.0 |
| Generic ExitCode | |
| Generic All | Since: base-4.7.0.0 |
| Generic Any | Since: base-4.7.0.0 |
| Generic Fixity | Since: base-4.7.0.0 |
| Generic Associativity | Since: base-4.7.0.0 |
Defined in GHC.Generics Associated Types type Rep Associativity :: Type -> Type # | |
| Generic SourceUnpackedness | Since: base-4.9.0.0 |
Defined in GHC.Generics Associated Types type Rep SourceUnpackedness :: Type -> Type # Methods from :: SourceUnpackedness -> Rep SourceUnpackedness x # to :: Rep SourceUnpackedness x -> SourceUnpackedness # | |
| Generic SourceStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Associated Types type Rep SourceStrictness :: Type -> Type # Methods from :: SourceStrictness -> Rep SourceStrictness x # to :: Rep SourceStrictness x -> SourceStrictness # | |
| Generic DecidedStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Associated Types type Rep DecidedStrictness :: Type -> Type # Methods from :: DecidedStrictness -> Rep DecidedStrictness x # to :: Rep DecidedStrictness x -> DecidedStrictness # | |
| Generic TyVarBndr | |
| Generic Extension | |
| Generic ForeignSrcLang | |
Defined in GHC.ForeignSrcLang.Type Associated Types type Rep ForeignSrcLang :: Type -> Type # Methods from :: ForeignSrcLang -> Rep ForeignSrcLang x # to :: Rep ForeignSrcLang x -> ForeignSrcLang # | |
| Generic Doc | |
| Generic TextDetails | |
Defined in Text.PrettyPrint.Annotated.HughesPJ Associated Types type Rep TextDetails :: Type -> Type # | |
| Generic Style | |
| Generic Mode | |
| Generic ModName | |
| Generic PkgName | |
| Generic Module | |
| Generic OccName | |
| Generic NameFlavour | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep NameFlavour :: Type -> Type # | |
| Generic NameSpace | |
| Generic Loc | |
| Generic Info | |
| Generic ModuleInfo | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep ModuleInfo :: Type -> Type # | |
| Generic Fixity | |
| Generic FixityDirection | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep FixityDirection :: Type -> Type # Methods from :: FixityDirection -> Rep FixityDirection x # to :: Rep FixityDirection x -> FixityDirection # | |
| Generic Lit | |
| Generic Bytes | |
| Generic Body | |
| Generic Guard | |
| Generic Stmt | |
| Generic Range | |
| Generic DerivClause | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep DerivClause :: Type -> Type # | |
| Generic DerivStrategy | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep DerivStrategy :: Type -> Type # | |
| Generic TypeFamilyHead | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep TypeFamilyHead :: Type -> Type # Methods from :: TypeFamilyHead -> Rep TypeFamilyHead x # to :: Rep TypeFamilyHead x -> TypeFamilyHead # | |
| Generic TySynEqn | |
| Generic Foreign | |
| Generic Callconv | |
| Generic Safety | |
| Generic Pragma | |
| Generic Inline | |
| Generic RuleMatch | |
| Generic Phases | |
| Generic RuleBndr | |
| Generic AnnTarget | |
| Generic SourceUnpackedness | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep SourceUnpackedness :: Type -> Type # Methods from :: SourceUnpackedness -> Rep SourceUnpackedness x # to :: Rep SourceUnpackedness x -> SourceUnpackedness # | |
| Generic SourceStrictness | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep SourceStrictness :: Type -> Type # Methods from :: SourceStrictness -> Rep SourceStrictness x # to :: Rep SourceStrictness x -> SourceStrictness # | |
| Generic DecidedStrictness | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep DecidedStrictness :: Type -> Type # Methods from :: DecidedStrictness -> Rep DecidedStrictness x # to :: Rep DecidedStrictness x -> DecidedStrictness # | |
| Generic Con | |
| Generic Bang | |
| Generic PatSynDir | |
| Generic PatSynArgs | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep PatSynArgs :: Type -> Type # | |
| Generic FamilyResultSig | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep FamilyResultSig :: Type -> Type # Methods from :: FamilyResultSig -> Rep FamilyResultSig x # to :: Rep FamilyResultSig x -> FamilyResultSig # | |
| Generic TyLit | |
| Generic Role | |
| Generic AnnLookup | |
| Generic Undefined | |
| Generic SrcSpanInfo | |
| Generic SrcLoc | |
| Generic SrcSpan | |
| Generic ConstructorInfo | |
| Generic DatatypeInfo | |
| Generic ConstructorVariant | |
| Generic DatatypeVariant | |
| Generic FieldStrictness | |
| Generic Strictness | |
| Generic Unpackedness | |
| Generic Boxed | |
| Generic Tool | |
| Generic Value | |
| Generic Clock | |
| Generic TimeSpec | |
| Generic Outcome | |
| Generic [a] | Since: base-4.6.0.0 |
| Generic (Maybe a) | Since: base-4.6.0.0 |
| Generic (Par1 p) | Since: base-4.7.0.0 |
| Generic (Complex a) | Since: base-4.9.0.0 |
| Generic (Min a) | Since: base-4.9.0.0 |
| Generic (Max a) | Since: base-4.9.0.0 |
| Generic (First a) | Since: base-4.9.0.0 |
| Generic (Last a) | Since: base-4.9.0.0 |
| Generic (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Associated Types type Rep (WrappedMonoid m) :: Type -> Type # Methods from :: WrappedMonoid m -> Rep (WrappedMonoid m) x # to :: Rep (WrappedMonoid m) x -> WrappedMonoid m # | |
| Generic (Option a) | Since: base-4.9.0.0 |
| Generic (ZipList a) | Since: base-4.7.0.0 |
| Generic (Identity a) | Since: base-4.8.0.0 |
| Generic (First a) | Since: base-4.7.0.0 |
| Generic (Last a) | Since: base-4.7.0.0 |
| Generic (Dual a) | Since: base-4.7.0.0 |
| Generic (Endo a) | Since: base-4.7.0.0 |
| Generic (Sum a) | Since: base-4.7.0.0 |
| Generic (Product a) | Since: base-4.7.0.0 |
| Generic (Down a) | Since: base-4.12.0.0 |
| Generic (NonEmpty a) | Since: base-4.6.0.0 |
| Generic (SCC vertex) | Since: containers-0.5.9 |
| Generic (Tree a) | Since: containers-0.5.8 |
| Generic (FingerTree a) | Since: containers-0.6.1 |
Defined in Data.Sequence.Internal Associated Types type Rep (FingerTree a) :: Type -> Type # | |
| Generic (Digit a) | Since: containers-0.6.1 |
| Generic (Node a) | Since: containers-0.6.1 |
| Generic (Elem a) | Since: containers-0.6.1 |
| Generic (ViewL a) | Since: containers-0.5.8 |
| Generic (ViewR a) | Since: containers-0.5.8 |
| Generic (Doc a) | |
| Generic (ModulePragma l) | |
| Generic (ModuleHead l) | |
| Generic (ImportDecl l) | |
| Generic (ModuleName l) | |
| Generic (Decl l) | |
| Generic (Exp l) | |
| Generic (Module l) | |
| Generic (Pat l) | |
| Generic (Stmt l) | |
| Generic (Type l) | |
| Generic (Loc a) | |
| Generic (Activation l) | |
| Generic (Alt l) | |
| Generic (Annotation l) | |
| Generic (Assoc l) | |
| Generic (Asst l) | |
| Generic (BangType l) | |
| Generic (Binds l) | |
| Generic (BooleanFormula l) | |
| Generic (Bracket l) | |
| Generic (CName l) | |
| Generic (CallConv l) | |
| Generic (ClassDecl l) | |
| Generic (ConDecl l) | |
| Generic (Context l) | |
| Generic (DataOrNew l) | |
| Generic (DeclHead l) | |
| Generic (DerivStrategy l) | |
| Generic (Deriving l) | |
| Generic (EWildcard l) | |
| Generic (ExportSpec l) | |
| Generic (ExportSpecList l) | |
| Generic (FieldDecl l) | |
| Generic (FieldUpdate l) | |
| Generic (FunDep l) | |
| Generic (GadtDecl l) | |
| Generic (GuardedRhs l) | |
| Generic (IPBind l) | |
| Generic (IPName l) | |
| Generic (ImportSpec l) | |
| Generic (ImportSpecList l) | |
| Generic (InjectivityInfo l) | |
| Generic (InstDecl l) | |
| Generic (InstHead l) | |
| Generic (InstRule l) | |
| Generic (Literal l) | |
| Generic (Match l) | |
| Generic (MaybePromotedName l) | |
| Generic (Name l) | |
| Generic (Namespace l) | |
| Generic (Op l) | |
| Generic (Overlap l) | |
| Generic (PXAttr l) | |
| Generic (PatField l) | |
| Generic (PatternSynDirection l) | |
| Generic (Promoted l) | |
| Generic (QName l) | |
| Generic (QOp l) | |
| Generic (QualConDecl l) | |
| Generic (QualStmt l) | |
| Generic (RPat l) | |
| Generic (RPatOp l) | |
| Generic (ResultSig l) | |
| Generic (Rhs l) | |
| Generic (Role l) | |
| Generic (Rule l) | |
| Generic (RuleVar l) | |
| Generic (Safety l) | |
| Generic (Sign l) | |
| Generic (SpecialCon l) | |
| Generic (Splice l) | |
| Generic (TyVarBind l) | |
| Generic (TypeEqn l) | |
| Generic (Unpackedness l) | |
| Generic (WarningText l) | |
| Generic (XAttr l) | |
| Generic (XName l) | |
| Generic (Window a) | |
| Generic (Doc a) | |
| Generic (SimpleDoc a) | |
| Generic (Either a b) | Since: base-4.6.0.0 |
| Generic (V1 p) | Since: base-4.9.0.0 |
| Generic (U1 p) | Since: base-4.7.0.0 |
| Generic (a, b) | Since: base-4.6.0.0 |
| Generic (Arg a b) | Since: base-4.9.0.0 |
| Generic (WrappedMonad m a) | Since: base-4.7.0.0 |
Defined in Control.Applicative Associated Types type Rep (WrappedMonad m a) :: Type -> Type # Methods from :: WrappedMonad m a -> Rep (WrappedMonad m a) x # to :: Rep (WrappedMonad m a) x -> WrappedMonad m a # | |
| Generic (Proxy t) | Since: base-4.6.0.0 |
| Generic (Path b t) | |
| Generic (Rec1 f p) | Since: base-4.7.0.0 |
| Generic (URec (Ptr ()) p) | Since: base-4.9.0.0 |
| Generic (URec Char p) | Since: base-4.9.0.0 |
| Generic (URec Double p) | Since: base-4.9.0.0 |
| Generic (URec Float p) | |
| Generic (URec Int p) | Since: base-4.9.0.0 |
| Generic (URec Word p) | Since: base-4.9.0.0 |
| Generic (a, b, c) | Since: base-4.6.0.0 |
| Generic (WrappedArrow a b c) | Since: base-4.7.0.0 |
Defined in Control.Applicative Associated Types type Rep (WrappedArrow a b c) :: Type -> Type # Methods from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x # to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c # | |
| Generic (Kleisli m a b) | Since: base-4.14.0.0 |
| Generic (Const a b) | Since: base-4.9.0.0 |
| Generic (Ap f a) | Since: base-4.12.0.0 |
| Generic (Alt f a) | Since: base-4.8.0.0 |
| Generic (Tagged s b) | |
| Generic (K1 i c p) | Since: base-4.7.0.0 |
| Generic ((f :+: g) p) | Since: base-4.7.0.0 |
| Generic ((f :*: g) p) | Since: base-4.7.0.0 |
| Generic (a, b, c, d) | Since: base-4.6.0.0 |
| Generic (Product f g a) | Since: base-4.9.0.0 |
| Generic (Sum f g a) | Since: base-4.9.0.0 |
| Generic (M1 i c f p) | Since: base-4.7.0.0 |
| Generic ((f :.: g) p) | Since: base-4.7.0.0 |
| Generic (a, b, c, d, e) | Since: base-4.6.0.0 |
| Generic (Compose f g a) | Since: base-4.9.0.0 |
| Generic (a, b, c, d, e, f) | Since: base-4.6.0.0 |
| Generic (a, b, c, d, e, f, g) | Since: base-4.6.0.0 |
This class gives the integer associated with a type-level natural. There are instances of the class for every concrete literal: 0, 1, 2, etc.
Since: base-4.7.0.0
Minimal complete definition
natSing
The class of semigroups (types with an associative binary operation).
Instances should satisfy the following:
Since: base-4.9.0.0
Minimal complete definition
Methods
(<>) :: a -> a -> a infixr 6 #
An associative operation.
>>>[1,2,3] <> [4,5,6][1,2,3,4,5,6]
Reduce a non-empty list with <>
The default definition should be sufficient, but this can be overridden for efficiency.
>>>import Data.List.NonEmpty>>>sconcat $ "Hello" :| [" ", "Haskell", "!"]"Hello Haskell!"
stimes :: Integral b => b -> a -> a #
Repeat a value n times.
Given that this works on a Semigroup it is allowed to fail if
you request 0 or fewer repetitions, and the default definition
will do so.
By making this a member of the class, idempotent semigroups
and monoids can upgrade this to execute in \(\mathcal{O}(1)\) by
picking stimes = or stimesIdempotentstimes =
respectively.stimesIdempotentMonoid
>>>stimes 4 [1][1,1,1,1]
Instances
| Semigroup Ordering | Since: base-4.9.0.0 |
| Semigroup () | Since: base-4.9.0.0 |
| Semigroup Void | Since: base-4.9.0.0 |
| Semigroup All | Since: base-4.9.0.0 |
| Semigroup Any | Since: base-4.9.0.0 |
| Semigroup ShortByteString | |
Defined in Data.ByteString.Short.Internal Methods (<>) :: ShortByteString -> ShortByteString -> ShortByteString # sconcat :: NonEmpty ShortByteString -> ShortByteString # stimes :: Integral b => b -> ShortByteString -> ShortByteString # | |
| Semigroup ByteString | |
Defined in Data.ByteString.Internal Methods (<>) :: ByteString -> ByteString -> ByteString # sconcat :: NonEmpty ByteString -> ByteString # stimes :: Integral b => b -> ByteString -> ByteString # | |
| Semigroup IntSet | Since: containers-0.5.7 |
| Semigroup PluginRecompile | |
Defined in Plugins Methods (<>) :: PluginRecompile -> PluginRecompile -> PluginRecompile # sconcat :: NonEmpty PluginRecompile -> PluginRecompile # stimes :: Integral b => b -> PluginRecompile -> PluginRecompile # | |
| Semigroup Doc | |
| Semigroup ByteArray | |
| Semigroup More | |
| Semigroup GroupName | |
| Semigroup LabelName | |
| Semigroup PropertyName | |
| Semigroup Cover | |
| Semigroup CoverCount | |
| Semigroup Journal | |
| Semigroup [a] | Since: base-4.9.0.0 |
| Semigroup a => Semigroup (Maybe a) | Since: base-4.9.0.0 |
| Semigroup a => Semigroup (IO a) | Since: base-4.10.0.0 |
| Semigroup p => Semigroup (Par1 p) | Since: base-4.12.0.0 |
| Semigroup (Predicate a) | |
| Semigroup (Comparison a) | |
Defined in Data.Functor.Contravariant Methods (<>) :: Comparison a -> Comparison a -> Comparison a # sconcat :: NonEmpty (Comparison a) -> Comparison a # stimes :: Integral b => b -> Comparison a -> Comparison a # | |
| Semigroup (Equivalence a) | |
Defined in Data.Functor.Contravariant Methods (<>) :: Equivalence a -> Equivalence a -> Equivalence a # sconcat :: NonEmpty (Equivalence a) -> Equivalence a # stimes :: Integral b => b -> Equivalence a -> Equivalence a # | |
| Ord a => Semigroup (Min a) | Since: base-4.9.0.0 |
| Ord a => Semigroup (Max a) | Since: base-4.9.0.0 |
| Semigroup (First a) | Since: base-4.9.0.0 |
| Semigroup (Last a) | Since: base-4.9.0.0 |
| Monoid m => Semigroup (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods (<>) :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # sconcat :: NonEmpty (WrappedMonoid m) -> WrappedMonoid m # stimes :: Integral b => b -> WrappedMonoid m -> WrappedMonoid m # | |
| Semigroup a => Semigroup (Option a) | Since: base-4.9.0.0 |
| Semigroup a => Semigroup (Identity a) | Since: base-4.9.0.0 |
| Semigroup (First a) | Since: base-4.9.0.0 |
| Semigroup (Last a) | Since: base-4.9.0.0 |
| Semigroup a => Semigroup (Dual a) | Since: base-4.9.0.0 |
| Semigroup (Endo a) | Since: base-4.9.0.0 |
| Num a => Semigroup (Sum a) | Since: base-4.9.0.0 |
| Num a => Semigroup (Product a) | Since: base-4.9.0.0 |
| Semigroup a => Semigroup (Down a) | Since: base-4.11.0.0 |
| Semigroup (NonEmpty a) | Since: base-4.9.0.0 |
| Semigroup (IntMap a) | Since: containers-0.5.7 |
| Semigroup (Seq a) | Since: containers-0.5.7 |
| Ord a => Semigroup (Set a) | Since: containers-0.5.7 |
| Semigroup (Doc a) | |
| (Hashable a, Eq a) => Semigroup (HashSet a) | |
| Semigroup (Vector a) | |
| Storable a => Semigroup (Vector a) | |
| Prim a => Semigroup (Vector a) | |
| Semigroup (Array a) | |
| Semigroup (PrimArray a) | |
| Semigroup (SmallArray a) | |
| Semigroup (MergeSet a) | |
| Semigroup (DList a) | |
| Semigroup (IResult a) | |
| Semigroup (Parser a) | |
| Semigroup (Result a) | |
| Semigroup a => Semigroup (Coverage a) | |
| Semigroup a => Semigroup (Label a) | |
| Semigroup (Doc a) | |
| Semigroup b => Semigroup (a -> b) | Since: base-4.9.0.0 |
| Semigroup (Either a b) | Since: base-4.9.0.0 |
| Semigroup (V1 p) | Since: base-4.12.0.0 |
| Semigroup (U1 p) | Since: base-4.12.0.0 |
| (Semigroup a, Semigroup b) => Semigroup (a, b) | Since: base-4.9.0.0 |
| Semigroup a => Semigroup (ST s a) | Since: base-4.11.0.0 |
| Semigroup a => Semigroup (Op a b) | |
| Semigroup (Proxy s) | Since: base-4.9.0.0 |
| Ord k => Semigroup (Map k v) | |
| (Eq k, Hashable k) => Semigroup (HashMap k v) | |
| Semigroup (Parser i a) | |
| (Monad m, Semigroup a) => Semigroup (GenT m a) | |
| Semigroup (f p) => Semigroup (Rec1 f p) | Since: base-4.12.0.0 |
| (Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c) | Since: base-4.9.0.0 |
| Semigroup a => Semigroup (Const a b) | Since: base-4.9.0.0 |
| (Applicative f, Semigroup a) => Semigroup (Ap f a) | Since: base-4.12.0.0 |
| Alternative f => Semigroup (Alt f a) | Since: base-4.9.0.0 |
| Semigroup a => Semigroup (Tagged s a) | |
| Semigroup c => Semigroup (K1 i c p) | Since: base-4.12.0.0 |
| (Semigroup (f p), Semigroup (g p)) => Semigroup ((f :*: g) p) | Since: base-4.12.0.0 |
| (Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d) | Since: base-4.9.0.0 |
| Semigroup (f p) => Semigroup (M1 i c f p) | Since: base-4.12.0.0 |
| Semigroup (f (g p)) => Semigroup ((f :.: g) p) | Since: base-4.12.0.0 |
| (Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e) | Since: base-4.9.0.0 |
class Semigroup a => Monoid a where #
The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following:
- Right identity
x<>mempty= x- Left identity
mempty<>x = x- Associativity
x(<>(y<>z) = (x<>y)<>zSemigrouplaw)- Concatenation
mconcat=foldr(<>)mempty
The method names refer to the monoid of lists under concatenation, but there are many other instances.
Some types can be viewed as a monoid in more than one way,
e.g. both addition and multiplication on numbers.
In such cases we often define newtypes and make those instances
of Monoid, e.g. Sum and Product.
NOTE: Semigroup is a superclass of Monoid since base-4.11.0.0.
Minimal complete definition
Methods
Identity of mappend
>>>"Hello world" <> mempty"Hello world"
An associative operation
NOTE: This method is redundant and has the default
implementation since base-4.11.0.0.
Should it be implemented manually, since mappend = (<>)mappend is a synonym for
(<>), it is expected that the two functions are defined the same
way. In a future GHC release mappend will be removed from Monoid.
Fold a list using the monoid.
For most types, the default definition for mconcat will be
used, but the function is included in the class definition so
that an optimized version can be provided for specific types.
>>>mconcat ["Hello", " ", "Haskell", "!"]"Hello Haskell!"
Instances
| Monoid Ordering | Since: base-2.1 |
| Monoid () | Since: base-2.1 |
| Monoid All | Since: base-2.1 |
| Monoid Any | Since: base-2.1 |
| Monoid ShortByteString | |
Defined in Data.ByteString.Short.Internal Methods mappend :: ShortByteString -> ShortByteString -> ShortByteString # mconcat :: [ShortByteString] -> ShortByteString # | |
| Monoid ByteString | |
Defined in Data.ByteString.Internal Methods mempty :: ByteString # mappend :: ByteString -> ByteString -> ByteString # mconcat :: [ByteString] -> ByteString # | |
| Monoid IntSet | |
| Monoid PluginRecompile | |
Defined in Plugins Methods mappend :: PluginRecompile -> PluginRecompile -> PluginRecompile # mconcat :: [PluginRecompile] -> PluginRecompile # | |
| Monoid Doc | |
| Monoid ByteArray | |
| Monoid More | |
| Monoid LabelName | |
| Monoid Cover | |
| Monoid CoverCount | |
| Monoid Journal | |
| Monoid [a] | Since: base-2.1 |
| Semigroup a => Monoid (Maybe a) | Lift a semigroup into Since 4.11.0: constraint on inner Since: base-2.1 |
| Monoid a => Monoid (IO a) | Since: base-4.9.0.0 |
| Monoid p => Monoid (Par1 p) | Since: base-4.12.0.0 |
| Monoid (Predicate a) | |
| Monoid (Comparison a) | |
Defined in Data.Functor.Contravariant Methods mempty :: Comparison a # mappend :: Comparison a -> Comparison a -> Comparison a # mconcat :: [Comparison a] -> Comparison a # | |
| Monoid (Equivalence a) | |
Defined in Data.Functor.Contravariant Methods mempty :: Equivalence a # mappend :: Equivalence a -> Equivalence a -> Equivalence a # mconcat :: [Equivalence a] -> Equivalence a # | |
| (Ord a, Bounded a) => Monoid (Min a) | Since: base-4.9.0.0 |
| (Ord a, Bounded a) => Monoid (Max a) | Since: base-4.9.0.0 |
| Monoid m => Monoid (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods mempty :: WrappedMonoid m # mappend :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # mconcat :: [WrappedMonoid m] -> WrappedMonoid m # | |
| Semigroup a => Monoid (Option a) | Since: base-4.9.0.0 |
| Monoid a => Monoid (Identity a) | Since: base-4.9.0.0 |
| Monoid (First a) | Since: base-2.1 |
| Monoid (Last a) | Since: base-2.1 |
| Monoid a => Monoid (Dual a) | Since: base-2.1 |
| Monoid (Endo a) | Since: base-2.1 |
| Num a => Monoid (Sum a) | Since: base-2.1 |
| Num a => Monoid (Product a) | Since: base-2.1 |
| Monoid a => Monoid (Down a) | Since: base-4.11.0.0 |
| Monoid (IntMap a) | |
| Monoid (Seq a) | |
| Ord a => Monoid (Set a) | |
| Monoid (Doc a) | |
| (Hashable a, Eq a) => Monoid (HashSet a) | |
| Monoid (Vector a) | |
| Storable a => Monoid (Vector a) | |
| Prim a => Monoid (Vector a) | |
| Monoid (Array a) | |
| Monoid (PrimArray a) | |
| Monoid (SmallArray a) | |
| Monoid (MergeSet a) | |
| Monoid (DList a) | |
| Monoid (IResult a) | |
| Monoid (Parser a) | |
| Monoid (Result a) | |
| (Semigroup a, Monoid a) => Monoid (Coverage a) | |
| Monoid (Doc a) | |
| Monoid b => Monoid (a -> b) | Since: base-2.1 |
| Monoid (U1 p) | Since: base-4.12.0.0 |
| (Monoid a, Monoid b) => Monoid (a, b) | Since: base-2.1 |
| Monoid a => Monoid (ST s a) | Since: base-4.11.0.0 |
| Monoid a => Monoid (Op a b) | |
| Monoid (Proxy s) | Since: base-4.7.0.0 |
| Ord k => Monoid (Map k v) | |
| (Eq k, Hashable k) => Monoid (HashMap k v) | |
| Monoid (Parser i a) | |
| (Monad m, Monoid a) => Monoid (GenT m a) | |
| Monoid (f p) => Monoid (Rec1 f p) | Since: base-4.12.0.0 |
| (Monoid a, Monoid b, Monoid c) => Monoid (a, b, c) | Since: base-2.1 |
| Monoid a => Monoid (Const a b) | Since: base-4.9.0.0 |
| (Applicative f, Monoid a) => Monoid (Ap f a) | Since: base-4.12.0.0 |
| Alternative f => Monoid (Alt f a) | Since: base-4.8.0.0 |
| (Semigroup a, Monoid a) => Monoid (Tagged s a) | |
| Monoid c => Monoid (K1 i c p) | Since: base-4.12.0.0 |
| (Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p) | Since: base-4.12.0.0 |
| (Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d) | Since: base-2.1 |
| Monoid (f p) => Monoid (M1 i c f p) | Since: base-4.12.0.0 |
| Monoid (f (g p)) => Monoid ((f :.: g) p) | Since: base-4.12.0.0 |
| (Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e) | Since: base-2.1 |
Instances
| Bounded Bool | Since: base-2.1 |
| Enum Bool | Since: base-2.1 |
| Eq Bool | |
| Ord Bool | |
| Read Bool | Since: base-2.1 |
| Show Bool | Since: base-2.1 |
| Generic Bool | Since: base-4.6.0.0 |
| SingKind Bool | Since: base-4.9.0.0 |
Defined in GHC.Generics Associated Types type DemoteRep Bool | |
| Bits Bool | Interpret Since: base-4.7.0.0 |
Defined in Data.Bits Methods (.&.) :: Bool -> Bool -> Bool # (.|.) :: Bool -> Bool -> Bool # complement :: Bool -> Bool # shift :: Bool -> Int -> Bool # rotate :: Bool -> Int -> Bool # setBit :: Bool -> Int -> Bool # clearBit :: Bool -> Int -> Bool # complementBit :: Bool -> Int -> Bool # testBit :: Bool -> Int -> Bool # bitSizeMaybe :: Bool -> Maybe Int # shiftL :: Bool -> Int -> Bool # unsafeShiftL :: Bool -> Int -> Bool # shiftR :: Bool -> Int -> Bool # unsafeShiftR :: Bool -> Int -> Bool # rotateL :: Bool -> Int -> Bool # | |
| FiniteBits Bool | Since: base-4.7.0.0 |
Defined in Data.Bits Methods finiteBitSize :: Bool -> Int # countLeadingZeros :: Bool -> Int # countTrailingZeros :: Bool -> Int # | |
| NFData Bool | |
Defined in Control.DeepSeq | |
| Hashable Bool | |
Defined in Data.Hashable.Class | |
| Unbox Bool | |
Defined in Data.Vector.Unboxed.Base | |
| Pretty Bool | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Bool | |
| SingI 'False | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| SingI 'True | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| Vector Vector Bool | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Bool -> m (Vector Bool) basicUnsafeThaw :: PrimMonad m => Vector Bool -> m (Mutable Vector (PrimState m) Bool) basicLength :: Vector Bool -> Int basicUnsafeSlice :: Int -> Int -> Vector Bool -> Vector Bool basicUnsafeIndexM :: Monad m => Vector Bool -> Int -> m Bool basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Bool -> Vector Bool -> m () | |
| MVector MVector Bool | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Bool -> Int basicUnsafeSlice :: Int -> Int -> MVector s Bool -> MVector s Bool basicOverlaps :: MVector s Bool -> MVector s Bool -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Bool) basicInitialize :: PrimMonad m => MVector (PrimState m) Bool -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Bool -> m (MVector (PrimState m) Bool) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Bool -> Int -> m Bool basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Bool -> Int -> Bool -> m () basicClear :: PrimMonad m => MVector (PrimState m) Bool -> m () basicSet :: PrimMonad m => MVector (PrimState m) Bool -> Bool -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Bool -> MVector (PrimState m) Bool -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Bool -> MVector (PrimState m) Bool -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Bool -> Int -> m (MVector (PrimState m) Bool) | |
| type Rep Bool | |
| data Sing (a :: Bool) | |
| type DemoteRep Bool | |
Defined in GHC.Generics | |
| newtype Vector Bool | |
Defined in Data.Vector.Unboxed.Base | |
| newtype MVector s Bool | |
Defined in Data.Vector.Unboxed.Base | |
| type Eval (Not 'False) | |
Defined in Fcf.Data.Bool | |
| type Eval (Not 'True) | |
Defined in Fcf.Data.Bool | |
| type Eval (And lst :: Bool -> Type) | |
Defined in Fcf.Class.Foldable | |
| type Eval (Or lst :: Bool -> Type) | |
Defined in Fcf.Class.Foldable | |
| type Eval ('False && b :: Bool -> Type) | |
Defined in Fcf.Data.Bool | |
| type Eval ('True && b :: Bool -> Type) | |
Defined in Fcf.Data.Bool | |
| type Eval (a && 'True :: Bool -> Type) | |
Defined in Fcf.Data.Bool | |
| type Eval (a && 'False :: Bool -> Type) | |
Defined in Fcf.Data.Bool | |
| type Eval ('False || b :: Bool -> Type) | |
Defined in Fcf.Data.Bool | |
| type Eval ('True || b :: Bool -> Type) | |
Defined in Fcf.Data.Bool | |
| type Eval (a || 'False :: Bool -> Type) | |
Defined in Fcf.Data.Bool | |
| type Eval (a || 'True :: Bool -> Type) | |
Defined in Fcf.Data.Bool | |
| type Eval (IsJust ('Nothing :: Maybe a) :: Bool -> Type) | |
| type Eval (IsJust ('Just _a) :: Bool -> Type) | |
Defined in Fcf.Data.Common | |
| type Eval (IsNothing ('Nothing :: Maybe a) :: Bool -> Type) | |
| type Eval (IsNothing ('Just _a) :: Bool -> Type) | |
Defined in Fcf.Data.Common | |
| type Eval (Null (a2 ': as) :: Bool -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (Null ('[] :: [a]) :: Bool -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (a > b :: Bool -> Type) | |
Defined in Fcf.Data.Nat | |
| type Eval (a < b :: Bool -> Type) | |
Defined in Fcf.Data.Nat | |
| type Eval (a <= b :: Bool -> Type) | |
Defined in Fcf.Data.Nat | |
| type Eval (a >= b :: Bool -> Type) | |
Defined in Fcf.Data.Nat | |
| type Eval (IsLeft ('Right _a :: Either a b) :: Bool -> Type) | |
| type Eval (IsLeft ('Left _a :: Either a b) :: Bool -> Type) | |
| type Eval (IsRight ('Right _a :: Either a b) :: Bool -> Type) | |
| type Eval (IsRight ('Left _a :: Either a b) :: Bool -> Type) | |
| type Eval (Elem a2 as :: Bool -> Type) | |
| type Eval (IsInfixOf xs ys :: Bool -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (IsPrefixOf xs ys :: Bool -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (IsSuffixOf xs ys :: Bool -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (All p lst :: Bool -> Type) | |
| type Eval (Any p lst :: Bool -> Type) | |
| type Eval (TyEq a b :: Bool -> Type) | |
The character type Char is an enumeration whose values represent
Unicode (or equivalently ISO/IEC 10646) code points (i.e. characters, see
http://www.unicode.org/ for details). This set extends the ISO 8859-1
(Latin-1) character set (the first 256 characters), which is itself an extension
of the ASCII character set (the first 128 characters). A character literal in
Haskell has type Char.
To convert a Char to or from the corresponding Int value defined
by Unicode, use toEnum and fromEnum from the
Enum class respectively (or equivalently ord and
chr).
Instances
| Bounded Char | Since: base-2.1 |
| Enum Char | Since: base-2.1 |
| Eq Char | |
| Ord Char | |
| Read Char | Since: base-2.1 |
| Show Char | Since: base-2.1 |
| NFData Char | |
Defined in Control.DeepSeq | |
| ErrorList Char | |
Defined in Control.Monad.Trans.Error | |
| Hashable Char | |
Defined in Data.Hashable.Class | |
| ToLText String | |
Defined in Relude.String.Conversion | |
| ToString String | |
Defined in Relude.String.Conversion | |
| ToText String | |
Defined in Relude.String.Conversion | |
| Unbox Char | |
Defined in Data.Vector.Unboxed.Base | |
| Pretty Char | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Char | |
| ConvertUtf8 String ShortByteString | |
Defined in Relude.String.Conversion Methods encodeUtf8 :: String -> ShortByteString # decodeUtf8 :: ShortByteString -> String # decodeUtf8Strict :: ShortByteString -> Either UnicodeException String # | |
| ConvertUtf8 String ByteString | |
Defined in Relude.String.Conversion Methods encodeUtf8 :: String -> ByteString # decodeUtf8 :: ByteString -> String # decodeUtf8Strict :: ByteString -> Either UnicodeException String # | |
| ConvertUtf8 String LByteString | |
Defined in Relude.String.Conversion Methods encodeUtf8 :: String -> LByteString # decodeUtf8 :: LByteString -> String # decodeUtf8Strict :: LByteString -> Either UnicodeException String # | |
| Vector Vector Char | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Char -> m (Vector Char) basicUnsafeThaw :: PrimMonad m => Vector Char -> m (Mutable Vector (PrimState m) Char) basicLength :: Vector Char -> Int basicUnsafeSlice :: Int -> Int -> Vector Char -> Vector Char basicUnsafeIndexM :: Monad m => Vector Char -> Int -> m Char basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Char -> Vector Char -> m () | |
| MVector MVector Char | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Char -> Int basicUnsafeSlice :: Int -> Int -> MVector s Char -> MVector s Char basicOverlaps :: MVector s Char -> MVector s Char -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Char) basicInitialize :: PrimMonad m => MVector (PrimState m) Char -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Char -> m (MVector (PrimState m) Char) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Char -> Int -> m Char basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Char -> Int -> Char -> m () basicClear :: PrimMonad m => MVector (PrimState m) Char -> m () basicSet :: PrimMonad m => MVector (PrimState m) Char -> Char -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Char -> MVector (PrimState m) Char -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Char -> MVector (PrimState m) Char -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Char -> Int -> m (MVector (PrimState m) Char) | |
| Generic1 (URec Char :: k -> Type) | Since: base-4.9.0.0 |
| Foldable (UChar :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => UChar m -> m # foldMap :: Monoid m => (a -> m) -> UChar a -> m # foldMap' :: Monoid m => (a -> m) -> UChar a -> m # foldr :: (a -> b -> b) -> b -> UChar a -> b # foldr' :: (a -> b -> b) -> b -> UChar a -> b # foldl :: (b -> a -> b) -> b -> UChar a -> b # foldl' :: (b -> a -> b) -> b -> UChar a -> b # foldr1 :: (a -> a -> a) -> UChar a -> a # foldl1 :: (a -> a -> a) -> UChar a -> a # elem :: Eq a => a -> UChar a -> Bool # maximum :: Ord a => UChar a -> a # minimum :: Ord a => UChar a -> a # | |
| Traversable (UChar :: Type -> Type) | Since: base-4.9.0.0 |
| Functor (URec Char :: Type -> Type) | Since: base-4.9.0.0 |
| Eq (URec Char p) | Since: base-4.9.0.0 |
| Ord (URec Char p) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| Show (URec Char p) | Since: base-4.9.0.0 |
| Generic (URec Char p) | Since: base-4.9.0.0 |
| newtype Vector Char | |
Defined in Data.Vector.Unboxed.Base | |
| data URec Char (p :: k) | Used for marking occurrences of Since: base-4.9.0.0 |
| newtype MVector s Char | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 (URec Char :: k -> Type) | |
Defined in GHC.Generics | |
| type Rep (URec Char p) | |
Defined in GHC.Generics | |
Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.
Instances
| Eq Double | Note that due to the presence of
Also note that
|
| Floating Double | Since: base-2.1 |
| Ord Double | Note that due to the presence of
Also note that, due to the same,
|
| Read Double | Since: base-2.1 |
| RealFloat Double | Since: base-2.1 |
Defined in GHC.Float Methods floatRadix :: Double -> Integer # floatDigits :: Double -> Int # floatRange :: Double -> (Int, Int) # decodeFloat :: Double -> (Integer, Int) # encodeFloat :: Integer -> Int -> Double # significand :: Double -> Double # scaleFloat :: Int -> Double -> Double # isInfinite :: Double -> Bool # isDenormalized :: Double -> Bool # isNegativeZero :: Double -> Bool # | |
| NFData Double | |
Defined in Control.DeepSeq | |
| Hashable Double | |
Defined in Data.Hashable.Class | |
| Unbox Double | |
Defined in Data.Vector.Unboxed.Base | |
| Pretty Double | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Double | |
| Vector Vector Double | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Double -> m (Vector Double) basicUnsafeThaw :: PrimMonad m => Vector Double -> m (Mutable Vector (PrimState m) Double) basicLength :: Vector Double -> Int basicUnsafeSlice :: Int -> Int -> Vector Double -> Vector Double basicUnsafeIndexM :: Monad m => Vector Double -> Int -> m Double basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Double -> Vector Double -> m () | |
| MVector MVector Double | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Double -> Int basicUnsafeSlice :: Int -> Int -> MVector s Double -> MVector s Double basicOverlaps :: MVector s Double -> MVector s Double -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Double) basicInitialize :: PrimMonad m => MVector (PrimState m) Double -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Double -> m (MVector (PrimState m) Double) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Double -> Int -> m Double basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Double -> Int -> Double -> m () basicClear :: PrimMonad m => MVector (PrimState m) Double -> m () basicSet :: PrimMonad m => MVector (PrimState m) Double -> Double -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Double -> MVector (PrimState m) Double -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Double -> MVector (PrimState m) Double -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Double -> Int -> m (MVector (PrimState m) Double) | |
| Generic1 (URec Double :: k -> Type) | Since: base-4.9.0.0 |
| Foldable (UDouble :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => UDouble m -> m # foldMap :: Monoid m => (a -> m) -> UDouble a -> m # foldMap' :: Monoid m => (a -> m) -> UDouble a -> m # foldr :: (a -> b -> b) -> b -> UDouble a -> b # foldr' :: (a -> b -> b) -> b -> UDouble a -> b # foldl :: (b -> a -> b) -> b -> UDouble a -> b # foldl' :: (b -> a -> b) -> b -> UDouble a -> b # foldr1 :: (a -> a -> a) -> UDouble a -> a # foldl1 :: (a -> a -> a) -> UDouble a -> a # elem :: Eq a => a -> UDouble a -> Bool # maximum :: Ord a => UDouble a -> a # minimum :: Ord a => UDouble a -> a # | |
| Traversable (UDouble :: Type -> Type) | Since: base-4.9.0.0 |
| Functor (URec Double :: Type -> Type) | Since: base-4.9.0.0 |
| Eq (URec Double p) | Since: base-4.9.0.0 |
| Ord (URec Double p) | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods compare :: URec Double p -> URec Double p -> Ordering # (<) :: URec Double p -> URec Double p -> Bool # (<=) :: URec Double p -> URec Double p -> Bool # (>) :: URec Double p -> URec Double p -> Bool # (>=) :: URec Double p -> URec Double p -> Bool # | |
| Show (URec Double p) | Since: base-4.9.0.0 |
| Generic (URec Double p) | Since: base-4.9.0.0 |
| newtype Vector Double | |
Defined in Data.Vector.Unboxed.Base | |
| data URec Double (p :: k) | Used for marking occurrences of Since: base-4.9.0.0 |
| newtype MVector s Double | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 (URec Double :: k -> Type) | |
Defined in GHC.Generics | |
| type Rep (URec Double p) | |
Defined in GHC.Generics | |
Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.
Instances
| Eq Float | Note that due to the presence of
Also note that
|
| Floating Float | Since: base-2.1 |
| Ord Float | Note that due to the presence of
Also note that, due to the same,
|
| Read Float | Since: base-2.1 |
| RealFloat Float | Since: base-2.1 |
Defined in GHC.Float Methods floatRadix :: Float -> Integer # floatDigits :: Float -> Int # floatRange :: Float -> (Int, Int) # decodeFloat :: Float -> (Integer, Int) # encodeFloat :: Integer -> Int -> Float # significand :: Float -> Float # scaleFloat :: Int -> Float -> Float # isInfinite :: Float -> Bool # isDenormalized :: Float -> Bool # isNegativeZero :: Float -> Bool # | |
| NFData Float | |
Defined in Control.DeepSeq | |
| Hashable Float | |
Defined in Data.Hashable.Class | |
| Unbox Float | |
Defined in Data.Vector.Unboxed.Base | |
| Pretty Float | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Float | |
| Vector Vector Float | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Float -> m (Vector Float) basicUnsafeThaw :: PrimMonad m => Vector Float -> m (Mutable Vector (PrimState m) Float) basicLength :: Vector Float -> Int basicUnsafeSlice :: Int -> Int -> Vector Float -> Vector Float basicUnsafeIndexM :: Monad m => Vector Float -> Int -> m Float basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Float -> Vector Float -> m () | |
| MVector MVector Float | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Float -> Int basicUnsafeSlice :: Int -> Int -> MVector s Float -> MVector s Float basicOverlaps :: MVector s Float -> MVector s Float -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Float) basicInitialize :: PrimMonad m => MVector (PrimState m) Float -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Float -> m (MVector (PrimState m) Float) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Float -> Int -> m Float basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Float -> Int -> Float -> m () basicClear :: PrimMonad m => MVector (PrimState m) Float -> m () basicSet :: PrimMonad m => MVector (PrimState m) Float -> Float -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Float -> MVector (PrimState m) Float -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Float -> MVector (PrimState m) Float -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Float -> Int -> m (MVector (PrimState m) Float) | |
| Generic1 (URec Float :: k -> Type) | Since: base-4.9.0.0 |
| Foldable (UFloat :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => UFloat m -> m # foldMap :: Monoid m => (a -> m) -> UFloat a -> m # foldMap' :: Monoid m => (a -> m) -> UFloat a -> m # foldr :: (a -> b -> b) -> b -> UFloat a -> b # foldr' :: (a -> b -> b) -> b -> UFloat a -> b # foldl :: (b -> a -> b) -> b -> UFloat a -> b # foldl' :: (b -> a -> b) -> b -> UFloat a -> b # foldr1 :: (a -> a -> a) -> UFloat a -> a # foldl1 :: (a -> a -> a) -> UFloat a -> a # elem :: Eq a => a -> UFloat a -> Bool # maximum :: Ord a => UFloat a -> a # minimum :: Ord a => UFloat a -> a # | |
| Traversable (UFloat :: Type -> Type) | Since: base-4.9.0.0 |
| Functor (URec Float :: Type -> Type) | Since: base-4.9.0.0 |
| Eq (URec Float p) | |
| Ord (URec Float p) | |
Defined in GHC.Generics | |
| Show (URec Float p) | |
| Generic (URec Float p) | |
| newtype Vector Float | |
Defined in Data.Vector.Unboxed.Base | |
| data URec Float (p :: k) | Used for marking occurrences of Since: base-4.9.0.0 |
| newtype MVector s Float | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 (URec Float :: k -> Type) | |
Defined in GHC.Generics | |
| type Rep (URec Float p) | |
Defined in GHC.Generics | |
A fixed-precision integer type with at least the range [-2^29 .. 2^29-1].
The exact range for a given implementation can be determined by using
minBound and maxBound from the Bounded class.
Instances
| Bounded Int | Since: base-2.1 |
| Enum Int | Since: base-2.1 |
| Eq Int | |
| Integral Int | Since: base-2.0.1 |
| Num Int | Since: base-2.1 |
| Ord Int | |
| Read Int | Since: base-2.1 |
| Real Int | Since: base-2.0.1 |
Defined in GHC.Real Methods toRational :: Int -> Rational # | |
| Show Int | Since: base-2.1 |
| Bits Int | Since: base-2.1 |
Defined in Data.Bits | |
| FiniteBits Int | Since: base-4.6.0.0 |
Defined in Data.Bits Methods finiteBitSize :: Int -> Int # countLeadingZeros :: Int -> Int # countTrailingZeros :: Int -> Int # | |
| NFData Int | |
Defined in Control.DeepSeq | |
| Hashable Int | |
Defined in Data.Hashable.Class | |
| Unbox Int | |
Defined in Data.Vector.Unboxed.Base | |
| ByteSource Int | |
Defined in Data.UUID.Types.Internal.Builder | |
| Pretty Int | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Int | |
| Vector Vector Int | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Int -> m (Vector Int) basicUnsafeThaw :: PrimMonad m => Vector Int -> m (Mutable Vector (PrimState m) Int) basicLength :: Vector Int -> Int basicUnsafeSlice :: Int -> Int -> Vector Int -> Vector Int basicUnsafeIndexM :: Monad m => Vector Int -> Int -> m Int basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Int -> Vector Int -> m () | |
| MVector MVector Int | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Int -> Int basicUnsafeSlice :: Int -> Int -> MVector s Int -> MVector s Int basicOverlaps :: MVector s Int -> MVector s Int -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Int) basicInitialize :: PrimMonad m => MVector (PrimState m) Int -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Int -> m (MVector (PrimState m) Int) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Int -> Int -> m Int basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Int -> Int -> Int -> m () basicClear :: PrimMonad m => MVector (PrimState m) Int -> m () basicSet :: PrimMonad m => MVector (PrimState m) Int -> Int -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Int -> MVector (PrimState m) Int -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Int -> MVector (PrimState m) Int -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Int -> Int -> m (MVector (PrimState m) Int) | |
| Generic1 (URec Int :: k -> Type) | Since: base-4.9.0.0 |
| Foldable (UInt :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => UInt m -> m # foldMap :: Monoid m => (a -> m) -> UInt a -> m # foldMap' :: Monoid m => (a -> m) -> UInt a -> m # foldr :: (a -> b -> b) -> b -> UInt a -> b # foldr' :: (a -> b -> b) -> b -> UInt a -> b # foldl :: (b -> a -> b) -> b -> UInt a -> b # foldl' :: (b -> a -> b) -> b -> UInt a -> b # foldr1 :: (a -> a -> a) -> UInt a -> a # foldl1 :: (a -> a -> a) -> UInt a -> a # elem :: Eq a => a -> UInt a -> Bool # maximum :: Ord a => UInt a -> a # | |
| Traversable (UInt :: Type -> Type) | Since: base-4.9.0.0 |
| Functor (URec Int :: Type -> Type) | Since: base-4.9.0.0 |
| Eq (URec Int p) | Since: base-4.9.0.0 |
| Ord (URec Int p) | Since: base-4.9.0.0 |
| Show (URec Int p) | Since: base-4.9.0.0 |
| Generic (URec Int p) | Since: base-4.9.0.0 |
| newtype Vector Int | |
Defined in Data.Vector.Unboxed.Base | |
| data URec Int (p :: k) | Used for marking occurrences of Since: base-4.9.0.0 |
| newtype MVector s Int | |
Defined in Data.Vector.Unboxed.Base | |
| type ByteSink Int g | |
Defined in Data.UUID.Types.Internal.Builder type ByteSink Int g = Takes4Bytes g | |
| type Rep1 (URec Int :: k -> Type) | |
Defined in GHC.Generics | |
| type Rep (URec Int p) | |
Defined in GHC.Generics | |
8-bit signed integer type
Instances
| Bounded Int8 | Since: base-2.1 |
| Enum Int8 | Since: base-2.1 |
| Eq Int8 | Since: base-2.1 |
| Integral Int8 | Since: base-2.1 |
| Num Int8 | Since: base-2.1 |
| Ord Int8 | Since: base-2.1 |
| Read Int8 | Since: base-2.1 |
| Real Int8 | Since: base-2.1 |
Defined in GHC.Int Methods toRational :: Int8 -> Rational # | |
| Show Int8 | Since: base-2.1 |
| Ix Int8 | Since: base-2.1 |
| Bits Int8 | Since: base-2.1 |
Defined in GHC.Int Methods (.&.) :: Int8 -> Int8 -> Int8 # (.|.) :: Int8 -> Int8 -> Int8 # complement :: Int8 -> Int8 # shift :: Int8 -> Int -> Int8 # rotate :: Int8 -> Int -> Int8 # setBit :: Int8 -> Int -> Int8 # clearBit :: Int8 -> Int -> Int8 # complementBit :: Int8 -> Int -> Int8 # testBit :: Int8 -> Int -> Bool # bitSizeMaybe :: Int8 -> Maybe Int # shiftL :: Int8 -> Int -> Int8 # unsafeShiftL :: Int8 -> Int -> Int8 # shiftR :: Int8 -> Int -> Int8 # unsafeShiftR :: Int8 -> Int -> Int8 # rotateL :: Int8 -> Int -> Int8 # | |
| FiniteBits Int8 | Since: base-4.6.0.0 |
Defined in GHC.Int Methods finiteBitSize :: Int8 -> Int # countLeadingZeros :: Int8 -> Int # countTrailingZeros :: Int8 -> Int # | |
| NFData Int8 | |
Defined in Control.DeepSeq | |
| Hashable Int8 | |
Defined in Data.Hashable.Class | |
| Unbox Int8 | |
Defined in Data.Vector.Unboxed.Base | |
| Pretty Int8 | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Int8 | |
| Vector Vector Int8 | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Int8 -> m (Vector Int8) basicUnsafeThaw :: PrimMonad m => Vector Int8 -> m (Mutable Vector (PrimState m) Int8) basicLength :: Vector Int8 -> Int basicUnsafeSlice :: Int -> Int -> Vector Int8 -> Vector Int8 basicUnsafeIndexM :: Monad m => Vector Int8 -> Int -> m Int8 basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Int8 -> Vector Int8 -> m () | |
| MVector MVector Int8 | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Int8 -> Int basicUnsafeSlice :: Int -> Int -> MVector s Int8 -> MVector s Int8 basicOverlaps :: MVector s Int8 -> MVector s Int8 -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Int8) basicInitialize :: PrimMonad m => MVector (PrimState m) Int8 -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Int8 -> m (MVector (PrimState m) Int8) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Int8 -> Int -> m Int8 basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Int8 -> Int -> Int8 -> m () basicClear :: PrimMonad m => MVector (PrimState m) Int8 -> m () basicSet :: PrimMonad m => MVector (PrimState m) Int8 -> Int8 -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Int8 -> MVector (PrimState m) Int8 -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Int8 -> MVector (PrimState m) Int8 -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Int8 -> Int -> m (MVector (PrimState m) Int8) | |
| newtype Vector Int8 | |
Defined in Data.Vector.Unboxed.Base | |
| newtype MVector s Int8 | |
Defined in Data.Vector.Unboxed.Base | |
16-bit signed integer type
Instances
| Bounded Int16 | Since: base-2.1 |
| Enum Int16 | Since: base-2.1 |
| Eq Int16 | Since: base-2.1 |
| Integral Int16 | Since: base-2.1 |
| Num Int16 | Since: base-2.1 |
| Ord Int16 | Since: base-2.1 |
| Read Int16 | Since: base-2.1 |
| Real Int16 | Since: base-2.1 |
Defined in GHC.Int Methods toRational :: Int16 -> Rational # | |
| Show Int16 | Since: base-2.1 |
| Ix Int16 | Since: base-2.1 |
| Bits Int16 | Since: base-2.1 |
Defined in GHC.Int Methods (.&.) :: Int16 -> Int16 -> Int16 # (.|.) :: Int16 -> Int16 -> Int16 # xor :: Int16 -> Int16 -> Int16 # complement :: Int16 -> Int16 # shift :: Int16 -> Int -> Int16 # rotate :: Int16 -> Int -> Int16 # setBit :: Int16 -> Int -> Int16 # clearBit :: Int16 -> Int -> Int16 # complementBit :: Int16 -> Int -> Int16 # testBit :: Int16 -> Int -> Bool # bitSizeMaybe :: Int16 -> Maybe Int # shiftL :: Int16 -> Int -> Int16 # unsafeShiftL :: Int16 -> Int -> Int16 # shiftR :: Int16 -> Int -> Int16 # unsafeShiftR :: Int16 -> Int -> Int16 # rotateL :: Int16 -> Int -> Int16 # | |
| FiniteBits Int16 | Since: base-4.6.0.0 |
Defined in GHC.Int Methods finiteBitSize :: Int16 -> Int # countLeadingZeros :: Int16 -> Int # countTrailingZeros :: Int16 -> Int # | |
| NFData Int16 | |
Defined in Control.DeepSeq | |
| Hashable Int16 | |
Defined in Data.Hashable.Class | |
| Unbox Int16 | |
Defined in Data.Vector.Unboxed.Base | |
| Pretty Int16 | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Int16 | |
| Vector Vector Int16 | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Int16 -> m (Vector Int16) basicUnsafeThaw :: PrimMonad m => Vector Int16 -> m (Mutable Vector (PrimState m) Int16) basicLength :: Vector Int16 -> Int basicUnsafeSlice :: Int -> Int -> Vector Int16 -> Vector Int16 basicUnsafeIndexM :: Monad m => Vector Int16 -> Int -> m Int16 basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Int16 -> Vector Int16 -> m () | |
| MVector MVector Int16 | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Int16 -> Int basicUnsafeSlice :: Int -> Int -> MVector s Int16 -> MVector s Int16 basicOverlaps :: MVector s Int16 -> MVector s Int16 -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Int16) basicInitialize :: PrimMonad m => MVector (PrimState m) Int16 -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Int16 -> m (MVector (PrimState m) Int16) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Int16 -> Int -> m Int16 basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Int16 -> Int -> Int16 -> m () basicClear :: PrimMonad m => MVector (PrimState m) Int16 -> m () basicSet :: PrimMonad m => MVector (PrimState m) Int16 -> Int16 -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Int16 -> MVector (PrimState m) Int16 -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Int16 -> MVector (PrimState m) Int16 -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Int16 -> Int -> m (MVector (PrimState m) Int16) | |
| newtype Vector Int16 | |
Defined in Data.Vector.Unboxed.Base | |
| newtype MVector s Int16 | |
Defined in Data.Vector.Unboxed.Base | |
32-bit signed integer type
Instances
| Bounded Int32 | Since: base-2.1 |
| Enum Int32 | Since: base-2.1 |
| Eq Int32 | Since: base-2.1 |
| Integral Int32 | Since: base-2.1 |
| Num Int32 | Since: base-2.1 |
| Ord Int32 | Since: base-2.1 |
| Read Int32 | Since: base-2.1 |
| Real Int32 | Since: base-2.1 |
Defined in GHC.Int Methods toRational :: Int32 -> Rational # | |
| Show Int32 | Since: base-2.1 |
| Ix Int32 | Since: base-2.1 |
| Bits Int32 | Since: base-2.1 |
Defined in GHC.Int Methods (.&.) :: Int32 -> Int32 -> Int32 # (.|.) :: Int32 -> Int32 -> Int32 # xor :: Int32 -> Int32 -> Int32 # complement :: Int32 -> Int32 # shift :: Int32 -> Int -> Int32 # rotate :: Int32 -> Int -> Int32 # setBit :: Int32 -> Int -> Int32 # clearBit :: Int32 -> Int -> Int32 # complementBit :: Int32 -> Int -> Int32 # testBit :: Int32 -> Int -> Bool # bitSizeMaybe :: Int32 -> Maybe Int # shiftL :: Int32 -> Int -> Int32 # unsafeShiftL :: Int32 -> Int -> Int32 # shiftR :: Int32 -> Int -> Int32 # unsafeShiftR :: Int32 -> Int -> Int32 # rotateL :: Int32 -> Int -> Int32 # | |
| FiniteBits Int32 | Since: base-4.6.0.0 |
Defined in GHC.Int Methods finiteBitSize :: Int32 -> Int # countLeadingZeros :: Int32 -> Int # countTrailingZeros :: Int32 -> Int # | |
| NFData Int32 | |
Defined in Control.DeepSeq | |
| Hashable Int32 | |
Defined in Data.Hashable.Class | |
| Unbox Int32 | |
Defined in Data.Vector.Unboxed.Base | |
| Pretty Int32 | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Int32 | |
| Vector Vector Int32 | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Int32 -> m (Vector Int32) basicUnsafeThaw :: PrimMonad m => Vector Int32 -> m (Mutable Vector (PrimState m) Int32) basicLength :: Vector Int32 -> Int basicUnsafeSlice :: Int -> Int -> Vector Int32 -> Vector Int32 basicUnsafeIndexM :: Monad m => Vector Int32 -> Int -> m Int32 basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Int32 -> Vector Int32 -> m () | |
| MVector MVector Int32 | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Int32 -> Int basicUnsafeSlice :: Int -> Int -> MVector s Int32 -> MVector s Int32 basicOverlaps :: MVector s Int32 -> MVector s Int32 -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Int32) basicInitialize :: PrimMonad m => MVector (PrimState m) Int32 -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Int32 -> m (MVector (PrimState m) Int32) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Int32 -> Int -> m Int32 basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Int32 -> Int -> Int32 -> m () basicClear :: PrimMonad m => MVector (PrimState m) Int32 -> m () basicSet :: PrimMonad m => MVector (PrimState m) Int32 -> Int32 -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Int32 -> MVector (PrimState m) Int32 -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Int32 -> MVector (PrimState m) Int32 -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Int32 -> Int -> m (MVector (PrimState m) Int32) | |
| newtype Vector Int32 | |
Defined in Data.Vector.Unboxed.Base | |
| newtype MVector s Int32 | |
Defined in Data.Vector.Unboxed.Base | |
64-bit signed integer type
Instances
| Bounded Int64 | Since: base-2.1 |
| Enum Int64 | Since: base-2.1 |
| Eq Int64 | Since: base-2.1 |
| Integral Int64 | Since: base-2.1 |
| Num Int64 | Since: base-2.1 |
| Ord Int64 | Since: base-2.1 |
| Read Int64 | Since: base-2.1 |
| Real Int64 | Since: base-2.1 |
Defined in GHC.Int Methods toRational :: Int64 -> Rational # | |
| Show Int64 | Since: base-2.1 |
| Ix Int64 | Since: base-2.1 |
| Bits Int64 | Since: base-2.1 |
Defined in GHC.Int Methods (.&.) :: Int64 -> Int64 -> Int64 # (.|.) :: Int64 -> Int64 -> Int64 # xor :: Int64 -> Int64 -> Int64 # complement :: Int64 -> Int64 # shift :: Int64 -> Int -> Int64 # rotate :: Int64 -> Int -> Int64 # setBit :: Int64 -> Int -> Int64 # clearBit :: Int64 -> Int -> Int64 # complementBit :: Int64 -> Int -> Int64 # testBit :: Int64 -> Int -> Bool # bitSizeMaybe :: Int64 -> Maybe Int # shiftL :: Int64 -> Int -> Int64 # unsafeShiftL :: Int64 -> Int -> Int64 # shiftR :: Int64 -> Int -> Int64 # unsafeShiftR :: Int64 -> Int -> Int64 # rotateL :: Int64 -> Int -> Int64 # | |
| FiniteBits Int64 | Since: base-4.6.0.0 |
Defined in GHC.Int Methods finiteBitSize :: Int64 -> Int # countLeadingZeros :: Int64 -> Int # countTrailingZeros :: Int64 -> Int # | |
| NFData Int64 | |
Defined in Control.DeepSeq | |
| Hashable Int64 | |
Defined in Data.Hashable.Class | |
| Unbox Int64 | |
Defined in Data.Vector.Unboxed.Base | |
| Pretty Int64 | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Int64 | |
| Vector Vector Int64 | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Int64 -> m (Vector Int64) basicUnsafeThaw :: PrimMonad m => Vector Int64 -> m (Mutable Vector (PrimState m) Int64) basicLength :: Vector Int64 -> Int basicUnsafeSlice :: Int -> Int -> Vector Int64 -> Vector Int64 basicUnsafeIndexM :: Monad m => Vector Int64 -> Int -> m Int64 basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Int64 -> Vector Int64 -> m () | |
| MVector MVector Int64 | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Int64 -> Int basicUnsafeSlice :: Int -> Int -> MVector s Int64 -> MVector s Int64 basicOverlaps :: MVector s Int64 -> MVector s Int64 -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Int64) basicInitialize :: PrimMonad m => MVector (PrimState m) Int64 -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Int64 -> m (MVector (PrimState m) Int64) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Int64 -> Int -> m Int64 basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Int64 -> Int -> Int64 -> m () basicClear :: PrimMonad m => MVector (PrimState m) Int64 -> m () basicSet :: PrimMonad m => MVector (PrimState m) Int64 -> Int64 -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Int64 -> MVector (PrimState m) Int64 -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Int64 -> MVector (PrimState m) Int64 -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Int64 -> Int -> m (MVector (PrimState m) Int64) | |
| newtype Vector Int64 | |
Defined in Data.Vector.Unboxed.Base | |
| newtype MVector s Int64 | |
Defined in Data.Vector.Unboxed.Base | |
Arbitrary precision integers. In contrast with fixed-size integral types
such as Int, the Integer type represents the entire infinite range of
integers.
For more information about this type's representation, see the comments in its implementation.
Instances
Type representing arbitrary-precision non-negative integers.
>>>2^100 :: Natural1267650600228229401496703205376
Operations whose result would be negative ,throw
(Underflow :: ArithException)
>>>-1 :: Natural*** Exception: arithmetic underflow
Since: base-4.8.0.0
Instances
The Maybe type encapsulates an optional value. A value of type
either contains a value of type Maybe aa (represented as ),
or it is empty (represented as Just aNothing). Using Maybe is a good way to
deal with errors or exceptional cases without resorting to drastic
measures such as error.
The Maybe type is also a monad. It is a simple kind of error
monad, where all errors are represented by Nothing. A richer
error monad can be built using the Either type.
Instances
| Monad Maybe | Since: base-2.1 |
| Functor Maybe | Since: base-2.1 |
| MonadFail Maybe | Since: base-4.9.0.0 |
Defined in Control.Monad.Fail | |
| Applicative Maybe | Since: base-2.1 |
| Foldable Maybe | Since: base-2.1 |
Defined in Data.Foldable Methods fold :: Monoid m => Maybe m -> m # foldMap :: Monoid m => (a -> m) -> Maybe a -> m # foldMap' :: Monoid m => (a -> m) -> Maybe a -> m # foldr :: (a -> b -> b) -> b -> Maybe a -> b # foldr' :: (a -> b -> b) -> b -> Maybe a -> b # foldl :: (b -> a -> b) -> b -> Maybe a -> b # foldl' :: (b -> a -> b) -> b -> Maybe a -> b # foldr1 :: (a -> a -> a) -> Maybe a -> a # foldl1 :: (a -> a -> a) -> Maybe a -> a # elem :: Eq a => a -> Maybe a -> Bool # maximum :: Ord a => Maybe a -> a # minimum :: Ord a => Maybe a -> a # | |
| Traversable Maybe | Since: base-2.1 |
| Alternative Maybe | Since: base-2.1 |
| MonadPlus Maybe | Since: base-2.1 |
| NFData1 Maybe | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| MonadThrow Maybe | |
Defined in Control.Monad.Catch | |
| Hashable1 Maybe | |
Defined in Data.Hashable.Class | |
| MonadBaseControl Maybe Maybe | |
Defined in Control.Monad.Trans.Control Associated Types type StM Maybe a | |
| Lift a => Lift (Maybe a :: Type) | |
| Eq a => Eq (Maybe a) | Since: base-2.1 |
| Ord a => Ord (Maybe a) | Since: base-2.1 |
| Read a => Read (Maybe a) | Since: base-2.1 |
| Show a => Show (Maybe a) | Since: base-2.1 |
| Generic (Maybe a) | Since: base-4.6.0.0 |
| Semigroup a => Semigroup (Maybe a) | Since: base-4.9.0.0 |
| Semigroup a => Monoid (Maybe a) | Lift a semigroup into Since 4.11.0: constraint on inner Since: base-2.1 |
| SingKind a => SingKind (Maybe a) | Since: base-4.9.0.0 |
Defined in GHC.Generics Associated Types type DemoteRep (Maybe a) | |
| NFData a => NFData (Maybe a) | |
Defined in Control.DeepSeq | |
| Hashable a => Hashable (Maybe a) | |
Defined in Data.Hashable.Class | |
| Pretty a => Pretty (Maybe a) | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Generic1 Maybe | Since: base-4.6.0.0 |
| SingI ('Nothing :: Maybe a) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| SingI a2 => SingI ('Just a2 :: Maybe a1) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| type StM Maybe a | |
Defined in Control.Monad.Trans.Control type StM Maybe a = a | |
| type Eval (FoldMap f ('Just x) :: a2 -> Type) | |
Defined in Fcf.Class.Foldable | |
| type Eval (FoldMap f ('Nothing :: Maybe a1) :: a2 -> Type) | |
Defined in Fcf.Class.Foldable | |
| type Eval (Foldr f y ('Just x) :: a2 -> Type) | |
Defined in Fcf.Class.Foldable | |
| type Eval (Foldr f y ('Nothing :: Maybe a1) :: a2 -> Type) | |
Defined in Fcf.Class.Foldable | |
| type Rep (Maybe a) | |
Defined in GHC.Generics | |
| data Sing (b :: Maybe a) | |
| type DemoteRep (Maybe a) | |
Defined in GHC.Generics | |
| type MEmpty | |
Defined in Fcf.Class.Monoid | |
| type Rep1 Maybe | |
| type (a2 :: Maybe a1) <> ('Nothing :: Maybe a1) | |
Defined in Fcf.Class.Monoid | |
| type ('Nothing :: Maybe a) <> (b :: Maybe a) | |
Defined in Fcf.Class.Monoid | |
| type Eval (Init '[a2] :: Maybe [a1] -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (Init ('[] :: [a]) :: Maybe [a] -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (Tail (_a ': as) :: Maybe [a] -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (Tail ('[] :: [a]) :: Maybe [a] -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (Init (a2 ': (b ': as)) :: Maybe [a1] -> Type) | |
| type Eval (Head (a2 ': _as) :: Maybe a1 -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (Head ('[] :: [a]) :: Maybe a -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (Last (a2 ': (b ': as)) :: Maybe a1 -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (Last '[a2] :: Maybe a1 -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (Last ('[] :: [a]) :: Maybe a -> Type) | |
Defined in Fcf.Data.List | |
| type ('Just a2 :: Maybe a1) <> ('Just b :: Maybe a1) | |
| type Eval (FindIndex p (a2 ': as) :: Maybe Nat -> Type) | |
| type Eval (FindIndex _p ('[] :: [a]) :: Maybe Nat -> Type) | |
| type Eval (NumIter a s :: Maybe (k, Nat) -> Type) | |
| type Eval (Find p (a2 ': as) :: Maybe a1 -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (Find _p ('[] :: [a]) :: Maybe a -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (Lookup a as :: Maybe b -> Type) | |
| type Eval (Map f ('Just a3) :: Maybe a2 -> Type) | |
Defined in Fcf.Class.Functor | |
| type Eval (Map f ('Nothing :: Maybe a) :: Maybe b -> Type) | |
Instances
| Bounded Ordering | Since: base-2.1 |
| Enum Ordering | Since: base-2.1 |
| Eq Ordering | |
| Ord Ordering | |
Defined in GHC.Classes | |
| Read Ordering | Since: base-2.1 |
| Show Ordering | Since: base-2.1 |
| Generic Ordering | Since: base-4.6.0.0 |
| Semigroup Ordering | Since: base-4.9.0.0 |
| Monoid Ordering | Since: base-2.1 |
| NFData Ordering | |
Defined in Control.DeepSeq | |
| Hashable Ordering | |
Defined in Data.Hashable.Class | |
| type Rep Ordering | |
| type MEmpty | |
Defined in Fcf.Class.Monoid type MEmpty = 'EQ | |
| type 'LT <> (_b :: Ordering) | |
Defined in Fcf.Class.Monoid | |
| type 'EQ <> (b :: Ordering) | |
Defined in Fcf.Class.Monoid | |
| type 'GT <> (_b :: Ordering) | |
Defined in Fcf.Class.Monoid | |
| type (a :: Ordering) <> 'EQ | |
Defined in Fcf.Class.Monoid | |
Rational numbers, with numerator and denominator of some Integral type.
Note that Ratio's instances inherit the deficiencies from the type
parameter's. For example, Ratio Natural's Num instance has similar
problems to Natural's.
Instances
| NFData1 Ratio | Available on Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Pretty Rational | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Integral a => Lift (Ratio a :: Type) | |
| Integral a => Enum (Ratio a) | Since: base-2.0.1 |
| Eq a => Eq (Ratio a) | Since: base-2.1 |
| Integral a => Fractional (Ratio a) | Since: base-2.0.1 |
| Integral a => Num (Ratio a) | Since: base-2.0.1 |
| Integral a => Ord (Ratio a) | Since: base-2.0.1 |
| (Integral a, Read a) => Read (Ratio a) | Since: base-2.1 |
| Integral a => Real (Ratio a) | Since: base-2.0.1 |
Defined in GHC.Real Methods toRational :: Ratio a -> Rational # | |
| Integral a => RealFrac (Ratio a) | Since: base-2.0.1 |
| Show a => Show (Ratio a) | Since: base-2.0.1 |
| NFData a => NFData (Ratio a) | |
Defined in Control.DeepSeq | |
| Hashable a => Hashable (Ratio a) | |
Defined in Data.Hashable.Class | |
A value of type is a computation which, when performed,
does some I/O before returning a value of type IO aa.
There is really only one way to "perform" an I/O action: bind it to
Main.main in your program. When your program is run, the I/O will
be performed. It isn't possible to perform I/O from an arbitrary
function, unless that function is itself in the IO monad and called
at some point, directly or indirectly, from Main.main.
IO is a monad, so IO actions can be combined using either the do-notation
or the >> and >>= operations from the Monad
class.
Instances
Instances
| Bounded Word | Since: base-2.1 |
| Enum Word | Since: base-2.1 |
| Eq Word | |
| Integral Word | Since: base-2.1 |
| Num Word | Since: base-2.1 |
| Ord Word | |
| Read Word | Since: base-4.5.0.0 |
| Real Word | Since: base-2.1 |
Defined in GHC.Real Methods toRational :: Word -> Rational # | |
| Show Word | Since: base-2.1 |
| Bits Word | Since: base-2.1 |
Defined in Data.Bits Methods (.&.) :: Word -> Word -> Word # (.|.) :: Word -> Word -> Word # complement :: Word -> Word # shift :: Word -> Int -> Word # rotate :: Word -> Int -> Word # setBit :: Word -> Int -> Word # clearBit :: Word -> Int -> Word # complementBit :: Word -> Int -> Word # testBit :: Word -> Int -> Bool # bitSizeMaybe :: Word -> Maybe Int # shiftL :: Word -> Int -> Word # unsafeShiftL :: Word -> Int -> Word # shiftR :: Word -> Int -> Word # unsafeShiftR :: Word -> Int -> Word # rotateL :: Word -> Int -> Word # | |
| FiniteBits Word | Since: base-4.6.0.0 |
Defined in Data.Bits Methods finiteBitSize :: Word -> Int # countLeadingZeros :: Word -> Int # countTrailingZeros :: Word -> Int # | |
| NFData Word | |
Defined in Control.DeepSeq | |
| Hashable Word | |
Defined in Data.Hashable.Class | |
| Unbox Word | |
Defined in Data.Vector.Unboxed.Base | |
| Pretty Word | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Word | |
| Vector Vector Word | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Word -> m (Vector Word) basicUnsafeThaw :: PrimMonad m => Vector Word -> m (Mutable Vector (PrimState m) Word) basicLength :: Vector Word -> Int basicUnsafeSlice :: Int -> Int -> Vector Word -> Vector Word basicUnsafeIndexM :: Monad m => Vector Word -> Int -> m Word basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Word -> Vector Word -> m () | |
| MVector MVector Word | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Word -> Int basicUnsafeSlice :: Int -> Int -> MVector s Word -> MVector s Word basicOverlaps :: MVector s Word -> MVector s Word -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Word) basicInitialize :: PrimMonad m => MVector (PrimState m) Word -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Word -> m (MVector (PrimState m) Word) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Word -> Int -> m Word basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Word -> Int -> Word -> m () basicClear :: PrimMonad m => MVector (PrimState m) Word -> m () basicSet :: PrimMonad m => MVector (PrimState m) Word -> Word -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Word -> MVector (PrimState m) Word -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Word -> MVector (PrimState m) Word -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Word -> Int -> m (MVector (PrimState m) Word) | |
| Generic1 (URec Word :: k -> Type) | Since: base-4.9.0.0 |
| Foldable (UWord :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => UWord m -> m # foldMap :: Monoid m => (a -> m) -> UWord a -> m # foldMap' :: Monoid m => (a -> m) -> UWord a -> m # foldr :: (a -> b -> b) -> b -> UWord a -> b # foldr' :: (a -> b -> b) -> b -> UWord a -> b # foldl :: (b -> a -> b) -> b -> UWord a -> b # foldl' :: (b -> a -> b) -> b -> UWord a -> b # foldr1 :: (a -> a -> a) -> UWord a -> a # foldl1 :: (a -> a -> a) -> UWord a -> a # elem :: Eq a => a -> UWord a -> Bool # maximum :: Ord a => UWord a -> a # minimum :: Ord a => UWord a -> a # | |
| Traversable (UWord :: Type -> Type) | Since: base-4.9.0.0 |
| Functor (URec Word :: Type -> Type) | Since: base-4.9.0.0 |
| Eq (URec Word p) | Since: base-4.9.0.0 |
| Ord (URec Word p) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
| Show (URec Word p) | Since: base-4.9.0.0 |
| Generic (URec Word p) | Since: base-4.9.0.0 |
| newtype Vector Word | |
Defined in Data.Vector.Unboxed.Base | |
| data URec Word (p :: k) | Used for marking occurrences of Since: base-4.9.0.0 |
| newtype MVector s Word | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 (URec Word :: k -> Type) | |
Defined in GHC.Generics | |
| type Rep (URec Word p) | |
Defined in GHC.Generics | |
8-bit unsigned integer type
Instances
| Bounded Word8 | Since: base-2.1 |
| Enum Word8 | Since: base-2.1 |
| Eq Word8 | Since: base-2.1 |
| Integral Word8 | Since: base-2.1 |
| Num Word8 | Since: base-2.1 |
| Ord Word8 | Since: base-2.1 |
| Read Word8 | Since: base-2.1 |
| Real Word8 | Since: base-2.1 |
Defined in GHC.Word Methods toRational :: Word8 -> Rational # | |
| Show Word8 | Since: base-2.1 |
| Ix Word8 | Since: base-2.1 |
| Bits Word8 | Since: base-2.1 |
Defined in GHC.Word Methods (.&.) :: Word8 -> Word8 -> Word8 # (.|.) :: Word8 -> Word8 -> Word8 # xor :: Word8 -> Word8 -> Word8 # complement :: Word8 -> Word8 # shift :: Word8 -> Int -> Word8 # rotate :: Word8 -> Int -> Word8 # setBit :: Word8 -> Int -> Word8 # clearBit :: Word8 -> Int -> Word8 # complementBit :: Word8 -> Int -> Word8 # testBit :: Word8 -> Int -> Bool # bitSizeMaybe :: Word8 -> Maybe Int # shiftL :: Word8 -> Int -> Word8 # unsafeShiftL :: Word8 -> Int -> Word8 # shiftR :: Word8 -> Int -> Word8 # unsafeShiftR :: Word8 -> Int -> Word8 # rotateL :: Word8 -> Int -> Word8 # | |
| FiniteBits Word8 | Since: base-4.6.0.0 |
Defined in GHC.Word Methods finiteBitSize :: Word8 -> Int # countLeadingZeros :: Word8 -> Int # countTrailingZeros :: Word8 -> Int # | |
| NFData Word8 | |
Defined in Control.DeepSeq | |
| Hashable Word8 | |
Defined in Data.Hashable.Class | |
| Unbox Word8 | |
Defined in Data.Vector.Unboxed.Base | |
| ByteSource Word8 | |
Defined in Data.UUID.Types.Internal.Builder | |
| Pretty Word8 | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Word8 | |
| Vector Vector Word8 | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Word8 -> m (Vector Word8) basicUnsafeThaw :: PrimMonad m => Vector Word8 -> m (Mutable Vector (PrimState m) Word8) basicLength :: Vector Word8 -> Int basicUnsafeSlice :: Int -> Int -> Vector Word8 -> Vector Word8 basicUnsafeIndexM :: Monad m => Vector Word8 -> Int -> m Word8 basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Word8 -> Vector Word8 -> m () | |
| MVector MVector Word8 | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Word8 -> Int basicUnsafeSlice :: Int -> Int -> MVector s Word8 -> MVector s Word8 basicOverlaps :: MVector s Word8 -> MVector s Word8 -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Word8) basicInitialize :: PrimMonad m => MVector (PrimState m) Word8 -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Word8 -> m (MVector (PrimState m) Word8) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Word8 -> Int -> m Word8 basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Word8 -> Int -> Word8 -> m () basicClear :: PrimMonad m => MVector (PrimState m) Word8 -> m () basicSet :: PrimMonad m => MVector (PrimState m) Word8 -> Word8 -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Word8 -> MVector (PrimState m) Word8 -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Word8 -> MVector (PrimState m) Word8 -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Word8 -> Int -> m (MVector (PrimState m) Word8) | |
| newtype Vector Word8 | |
Defined in Data.Vector.Unboxed.Base | |
| newtype MVector s Word8 | |
Defined in Data.Vector.Unboxed.Base | |
| type ByteSink Word8 g | |
Defined in Data.UUID.Types.Internal.Builder type ByteSink Word8 g = Takes1Byte g | |
16-bit unsigned integer type
Instances
| Bounded Word16 | Since: base-2.1 |
| Enum Word16 | Since: base-2.1 |
Defined in GHC.Word | |
| Eq Word16 | Since: base-2.1 |
| Integral Word16 | Since: base-2.1 |
| Num Word16 | Since: base-2.1 |
| Ord Word16 | Since: base-2.1 |
| Read Word16 | Since: base-2.1 |
| Real Word16 | Since: base-2.1 |
Defined in GHC.Word Methods toRational :: Word16 -> Rational # | |
| Show Word16 | Since: base-2.1 |
| Ix Word16 | Since: base-2.1 |
| Bits Word16 | Since: base-2.1 |
Defined in GHC.Word Methods (.&.) :: Word16 -> Word16 -> Word16 # (.|.) :: Word16 -> Word16 -> Word16 # xor :: Word16 -> Word16 -> Word16 # complement :: Word16 -> Word16 # shift :: Word16 -> Int -> Word16 # rotate :: Word16 -> Int -> Word16 # setBit :: Word16 -> Int -> Word16 # clearBit :: Word16 -> Int -> Word16 # complementBit :: Word16 -> Int -> Word16 # testBit :: Word16 -> Int -> Bool # bitSizeMaybe :: Word16 -> Maybe Int # shiftL :: Word16 -> Int -> Word16 # unsafeShiftL :: Word16 -> Int -> Word16 # shiftR :: Word16 -> Int -> Word16 # unsafeShiftR :: Word16 -> Int -> Word16 # rotateL :: Word16 -> Int -> Word16 # | |
| FiniteBits Word16 | Since: base-4.6.0.0 |
Defined in GHC.Word Methods finiteBitSize :: Word16 -> Int # countLeadingZeros :: Word16 -> Int # countTrailingZeros :: Word16 -> Int # | |
| NFData Word16 | |
Defined in Control.DeepSeq | |
| Hashable Word16 | |
Defined in Data.Hashable.Class | |
| Unbox Word16 | |
Defined in Data.Vector.Unboxed.Base | |
| ByteSource Word16 | |
Defined in Data.UUID.Types.Internal.Builder | |
| Pretty Word16 | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Word16 | |
| Vector Vector Word16 | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Word16 -> m (Vector Word16) basicUnsafeThaw :: PrimMonad m => Vector Word16 -> m (Mutable Vector (PrimState m) Word16) basicLength :: Vector Word16 -> Int basicUnsafeSlice :: Int -> Int -> Vector Word16 -> Vector Word16 basicUnsafeIndexM :: Monad m => Vector Word16 -> Int -> m Word16 basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Word16 -> Vector Word16 -> m () | |
| MVector MVector Word16 | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Word16 -> Int basicUnsafeSlice :: Int -> Int -> MVector s Word16 -> MVector s Word16 basicOverlaps :: MVector s Word16 -> MVector s Word16 -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Word16) basicInitialize :: PrimMonad m => MVector (PrimState m) Word16 -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Word16 -> m (MVector (PrimState m) Word16) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Word16 -> Int -> m Word16 basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Word16 -> Int -> Word16 -> m () basicClear :: PrimMonad m => MVector (PrimState m) Word16 -> m () basicSet :: PrimMonad m => MVector (PrimState m) Word16 -> Word16 -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Word16 -> MVector (PrimState m) Word16 -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Word16 -> MVector (PrimState m) Word16 -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Word16 -> Int -> m (MVector (PrimState m) Word16) | |
| newtype Vector Word16 | |
Defined in Data.Vector.Unboxed.Base | |
| newtype MVector s Word16 | |
Defined in Data.Vector.Unboxed.Base | |
| type ByteSink Word16 g | |
Defined in Data.UUID.Types.Internal.Builder type ByteSink Word16 g = Takes2Bytes g | |
32-bit unsigned integer type
Instances
| Bounded Word32 | Since: base-2.1 |
| Enum Word32 | Since: base-2.1 |
Defined in GHC.Word | |
| Eq Word32 | Since: base-2.1 |
| Integral Word32 | Since: base-2.1 |
| Num Word32 | Since: base-2.1 |
| Ord Word32 | Since: base-2.1 |
| Read Word32 | Since: base-2.1 |
| Real Word32 | Since: base-2.1 |
Defined in GHC.Word Methods toRational :: Word32 -> Rational # | |
| Show Word32 | Since: base-2.1 |
| Ix Word32 | Since: base-2.1 |
| Bits Word32 | Since: base-2.1 |
Defined in GHC.Word Methods (.&.) :: Word32 -> Word32 -> Word32 # (.|.) :: Word32 -> Word32 -> Word32 # xor :: Word32 -> Word32 -> Word32 # complement :: Word32 -> Word32 # shift :: Word32 -> Int -> Word32 # rotate :: Word32 -> Int -> Word32 # setBit :: Word32 -> Int -> Word32 # clearBit :: Word32 -> Int -> Word32 # complementBit :: Word32 -> Int -> Word32 # testBit :: Word32 -> Int -> Bool # bitSizeMaybe :: Word32 -> Maybe Int # shiftL :: Word32 -> Int -> Word32 # unsafeShiftL :: Word32 -> Int -> Word32 # shiftR :: Word32 -> Int -> Word32 # unsafeShiftR :: Word32 -> Int -> Word32 # rotateL :: Word32 -> Int -> Word32 # | |
| FiniteBits Word32 | Since: base-4.6.0.0 |
Defined in GHC.Word Methods finiteBitSize :: Word32 -> Int # countLeadingZeros :: Word32 -> Int # countTrailingZeros :: Word32 -> Int # | |
| NFData Word32 | |
Defined in Control.DeepSeq | |
| Hashable Word32 | |
Defined in Data.Hashable.Class | |
| Unbox Word32 | |
Defined in Data.Vector.Unboxed.Base | |
| ByteSource Word32 | |
Defined in Data.UUID.Types.Internal.Builder | |
| Pretty Word32 | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Word32 | |
| Vector Vector Word32 | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Word32 -> m (Vector Word32) basicUnsafeThaw :: PrimMonad m => Vector Word32 -> m (Mutable Vector (PrimState m) Word32) basicLength :: Vector Word32 -> Int basicUnsafeSlice :: Int -> Int -> Vector Word32 -> Vector Word32 basicUnsafeIndexM :: Monad m => Vector Word32 -> Int -> m Word32 basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Word32 -> Vector Word32 -> m () | |
| MVector MVector Word32 | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Word32 -> Int basicUnsafeSlice :: Int -> Int -> MVector s Word32 -> MVector s Word32 basicOverlaps :: MVector s Word32 -> MVector s Word32 -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Word32) basicInitialize :: PrimMonad m => MVector (PrimState m) Word32 -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Word32 -> m (MVector (PrimState m) Word32) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Word32 -> Int -> m Word32 basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Word32 -> Int -> Word32 -> m () basicClear :: PrimMonad m => MVector (PrimState m) Word32 -> m () basicSet :: PrimMonad m => MVector (PrimState m) Word32 -> Word32 -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Word32 -> MVector (PrimState m) Word32 -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Word32 -> MVector (PrimState m) Word32 -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Word32 -> Int -> m (MVector (PrimState m) Word32) | |
| newtype Vector Word32 | |
Defined in Data.Vector.Unboxed.Base | |
| newtype MVector s Word32 | |
Defined in Data.Vector.Unboxed.Base | |
| type ByteSink Word32 g | |
Defined in Data.UUID.Types.Internal.Builder type ByteSink Word32 g = Takes4Bytes g | |
64-bit unsigned integer type
Instances
| Bounded Word64 | Since: base-2.1 |
| Enum Word64 | Since: base-2.1 |
Defined in GHC.Word | |
| Eq Word64 | Since: base-2.1 |
| Integral Word64 | Since: base-2.1 |
| Num Word64 | Since: base-2.1 |
| Ord Word64 | Since: base-2.1 |
| Read Word64 | Since: base-2.1 |
| Real Word64 | Since: base-2.1 |
Defined in GHC.Word Methods toRational :: Word64 -> Rational # | |
| Show Word64 | Since: base-2.1 |
| Ix Word64 | Since: base-2.1 |
| Bits Word64 | Since: base-2.1 |
Defined in GHC.Word Methods (.&.) :: Word64 -> Word64 -> Word64 # (.|.) :: Word64 -> Word64 -> Word64 # xor :: Word64 -> Word64 -> Word64 # complement :: Word64 -> Word64 # shift :: Word64 -> Int -> Word64 # rotate :: Word64 -> Int -> Word64 # setBit :: Word64 -> Int -> Word64 # clearBit :: Word64 -> Int -> Word64 # complementBit :: Word64 -> Int -> Word64 # testBit :: Word64 -> Int -> Bool # bitSizeMaybe :: Word64 -> Maybe Int # shiftL :: Word64 -> Int -> Word64 # unsafeShiftL :: Word64 -> Int -> Word64 # shiftR :: Word64 -> Int -> Word64 # unsafeShiftR :: Word64 -> Int -> Word64 # rotateL :: Word64 -> Int -> Word64 # | |
| FiniteBits Word64 | Since: base-4.6.0.0 |
Defined in GHC.Word Methods finiteBitSize :: Word64 -> Int # countLeadingZeros :: Word64 -> Int # countTrailingZeros :: Word64 -> Int # | |
| NFData Word64 | |
Defined in Control.DeepSeq | |
| Hashable Word64 | |
Defined in Data.Hashable.Class | |
| Unbox Word64 | |
Defined in Data.Vector.Unboxed.Base | |
| Pretty Word64 | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Lift Word64 | |
| Vector Vector Word64 | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Word64 -> m (Vector Word64) basicUnsafeThaw :: PrimMonad m => Vector Word64 -> m (Mutable Vector (PrimState m) Word64) basicLength :: Vector Word64 -> Int basicUnsafeSlice :: Int -> Int -> Vector Word64 -> Vector Word64 basicUnsafeIndexM :: Monad m => Vector Word64 -> Int -> m Word64 basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Word64 -> Vector Word64 -> m () | |
| MVector MVector Word64 | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Word64 -> Int basicUnsafeSlice :: Int -> Int -> MVector s Word64 -> MVector s Word64 basicOverlaps :: MVector s Word64 -> MVector s Word64 -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Word64) basicInitialize :: PrimMonad m => MVector (PrimState m) Word64 -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Word64 -> m (MVector (PrimState m) Word64) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Word64 -> Int -> m Word64 basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Word64 -> Int -> Word64 -> m () basicClear :: PrimMonad m => MVector (PrimState m) Word64 -> m () basicSet :: PrimMonad m => MVector (PrimState m) Word64 -> Word64 -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Word64 -> MVector (PrimState m) Word64 -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Word64 -> MVector (PrimState m) Word64 -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Word64 -> Int -> m (MVector (PrimState m) Word64) | |
| newtype Vector Word64 | |
Defined in Data.Vector.Unboxed.Base | |
| newtype MVector s Word64 | |
Defined in Data.Vector.Unboxed.Base | |
The Either type represents values with two possibilities: a value of
type is either Either a b or Left a.Right b
The Either type is sometimes used to represent a value which is
either correct or an error; by convention, the Left constructor is
used to hold an error value and the Right constructor is used to
hold a correct value (mnemonic: "right" also means "correct").
Examples
The type is the type of values which can be either
a Either String IntString or an Int. The Left constructor can be used only on
Strings, and the Right constructor can be used only on Ints:
>>>let s = Left "foo" :: Either String Int>>>sLeft "foo">>>let n = Right 3 :: Either String Int>>>nRight 3>>>:type ss :: Either String Int>>>:type nn :: Either String Int
The fmap from our Functor instance will ignore Left values, but
will apply the supplied function to values contained in a Right:
>>>let s = Left "foo" :: Either String Int>>>let n = Right 3 :: Either String Int>>>fmap (*2) sLeft "foo">>>fmap (*2) nRight 6
The Monad instance for Either allows us to chain together multiple
actions which may fail, and fail overall if any of the individual
steps failed. First we'll write a function that can either parse an
Int from a Char, or fail.
>>>import Data.Char ( digitToInt, isDigit )>>>:{let parseEither :: Char -> Either String Int parseEither c | isDigit c = Right (digitToInt c) | otherwise = Left "parse error">>>:}
The following should work, since both '1' and '2' can be
parsed as Ints.
>>>:{let parseMultiple :: Either String Int parseMultiple = do x <- parseEither '1' y <- parseEither '2' return (x + y)>>>:}
>>>parseMultipleRight 3
But the following should fail overall, since the first operation where
we attempt to parse 'm' as an Int will fail:
>>>:{let parseMultiple :: Either String Int parseMultiple = do x <- parseEither 'm' y <- parseEither '2' return (x + y)>>>:}
>>>parseMultipleLeft "parse error"
Instances
| Bitraversable Either | Since: base-4.10.0.0 |
Defined in Data.Bitraversable Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Either a b -> f (Either c d) # | |
| Bifoldable Either | Since: base-4.10.0.0 |
| Bifunctor Either | Since: base-4.8.0.0 |
| NFData2 Either | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Hashable2 Either | |
Defined in Data.Hashable.Class | |
| (Lift a, Lift b) => Lift (Either a b :: Type) | |
| Monad (Either e) | Since: base-4.4.0.0 |
| Functor (Either a) | Since: base-3.0 |
| Applicative (Either e) | Since: base-3.0 |
| Foldable (Either a) | Since: base-4.7.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Either a m -> m # foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 # toList :: Either a a0 -> [a0] # length :: Either a a0 -> Int # elem :: Eq a0 => a0 -> Either a a0 -> Bool # maximum :: Ord a0 => Either a a0 -> a0 # minimum :: Ord a0 => Either a a0 -> a0 # | |
| Traversable (Either a) | Since: base-4.7.0.0 |
Defined in Data.Traversable | |
| NFData a => NFData1 (Either a) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| e ~ SomeException => MonadThrow (Either e) | |
Defined in Control.Monad.Catch | |
| e ~ SomeException => MonadCatch (Either e) | Since: exceptions-0.8.3 |
| e ~ SomeException => MonadMask (Either e) | Since: exceptions-0.8.3 |
Defined in Control.Monad.Catch | |
| Hashable a => Hashable1 (Either a) | |
Defined in Data.Hashable.Class | |
| Generic1 (Either a :: Type -> Type) | Since: base-4.6.0.0 |
| MonadBaseControl (Either e) (Either e) | |
Defined in Control.Monad.Trans.Control Associated Types type StM (Either e) a | |
| (Eq a, Eq b) => Eq (Either a b) | Since: base-2.1 |
| (Ord a, Ord b) => Ord (Either a b) | Since: base-2.1 |
| (Read a, Read b) => Read (Either a b) | Since: base-3.0 |
| (Show a, Show b) => Show (Either a b) | Since: base-3.0 |
| Generic (Either a b) | Since: base-4.6.0.0 |
| Semigroup (Either a b) | Since: base-4.9.0.0 |
| (NFData a, NFData b) => NFData (Either a b) | |
Defined in Control.DeepSeq | |
| (Hashable a, Hashable b) => Hashable (Either a b) | |
Defined in Data.Hashable.Class | |
| type Eval (FoldMap f ('Right x :: Either a3 a1) :: a2 -> Type) | |
Defined in Fcf.Class.Foldable | |
| type Eval (FoldMap f ('Left _a :: Either a3 a1) :: a2 -> Type) | |
Defined in Fcf.Class.Foldable | |
| type Eval (Foldr f y ('Right x :: Either a3 a1) :: a2 -> Type) | |
Defined in Fcf.Class.Foldable | |
| type Eval (Foldr f y ('Left _a :: Either a3 a1) :: a2 -> Type) | |
Defined in Fcf.Class.Foldable | |
| type StM (Either e) a | |
Defined in Control.Monad.Trans.Control type StM (Either e) a = a | |
| type Rep1 (Either a :: Type -> Type) | |
Defined in GHC.Generics type Rep1 (Either a :: Type -> Type) = D1 ('MetaData "Either" "Data.Either" "base" 'False) (C1 ('MetaCons "Left" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Right" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) | |
| type Rep (Either a b) | |
Defined in GHC.Generics type Rep (Either a b) = D1 ('MetaData "Either" "Data.Either" "base" 'False) (C1 ('MetaCons "Left" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "Right" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b))) | |
| type Eval (Map f ('Right a3 :: Either a2 a1) :: Either a2 b -> Type) | |
| type Eval (Map f ('Left x :: Either a2 a1) :: Either a2 b -> Type) | |
| type Eval (Bimap f g ('Right y :: Either a b1) :: Either a' b2 -> Type) | |
| type Eval (Bimap f g ('Left x :: Either a1 b) :: Either a2 b' -> Type) | |
data Constraint #
The kind of constraints, like Show a
(Kind) This is the kind of type-level natural numbers.
Instances
| type Eval (Sum ns :: Nat -> Type) | |
Defined in Fcf.Class.Foldable | |
| type Eval (a + b :: Nat -> Type) | |
Defined in Fcf.Data.Nat | |
| type Eval (Length (a2 ': as) :: Nat -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (Length ('[] :: [a]) :: Nat -> Type) | |
Defined in Fcf.Data.List | |
| type Eval (a * b :: Nat -> Type) | |
Defined in Fcf.Data.Nat | |
| type Eval (a - b :: Nat -> Type) | |
Defined in Fcf.Data.Nat | |
| type Eval (a ^ b :: Nat -> Type) | |
Defined in Fcf.Data.Nat | |
| type Eval (FindIndex p (a2 ': as) :: Maybe Nat -> Type) | |
| type Eval (FindIndex _p ('[] :: [a]) :: Maybe Nat -> Type) | |
| type Eval (NumIter a s :: Maybe (k, Nat) -> Type) | |
type family CmpNat (a :: Nat) (b :: Nat) :: Ordering where ... #
Comparison of type-level naturals, as a function.
Since: base-4.7.0.0
class a ~R# b => Coercible (a :: k) (b :: k) #
Coercible is a two-parameter class that has instances for types a and b if
the compiler can infer that they have the same representation. This class
does not have regular instances; instead they are created on-the-fly during
type-checking. Trying to manually declare an instance of Coercible
is an error.
Nevertheless one can pretend that the following three kinds of instances exist. First, as a trivial base-case:
instance Coercible a a
Furthermore, for every type constructor there is
an instance that allows to coerce under the type constructor. For
example, let D be a prototypical type constructor (data or
newtype) with three type arguments, which have roles nominal,
representational resp. phantom. Then there is an instance of
the form
instance Coercible b b' => Coercible (D a b c) (D a b' c')
Note that the nominal type arguments are equal, the
representational type arguments can differ, but need to have a
Coercible instance themself, and the phantom type arguments can be
changed arbitrarily.
The third kind of instance exists for every newtype NT = MkNT T and
comes in two variants, namely
instance Coercible a T => Coercible a NT
instance Coercible T b => Coercible NT b
This instance is only usable if the constructor MkNT is in scope.
If, as a library author of a type constructor like Set a, you
want to prevent a user of your module to write
coerce :: Set T -> Set NT,
you need to set the role of Set's type parameter to nominal,
by writing
type role Set nominal
For more details about this feature, please refer to Safe Coercions by Joachim Breitner, Richard A. Eisenberg, Simon Peyton Jones and Stephanie Weirich.
Since: ghc-prim-4.7.0.0
CallStacks are a lightweight method of obtaining a
partial call-stack at any point in the program.
A function can request its call-site with the HasCallStack constraint.
For example, we can define
putStrLnWithCallStack :: HasCallStack => String -> IO ()
as a variant of putStrLn that will get its call-site and print it,
along with the string given as argument. We can access the
call-stack inside putStrLnWithCallStack with callStack.
putStrLnWithCallStack :: HasCallStack => String -> IO () putStrLnWithCallStack msg = do putStrLn msg putStrLn (prettyCallStack callStack)
Thus, if we call putStrLnWithCallStack we will get a formatted call-stack
alongside our string.
>>>putStrLnWithCallStack "hello"hello CallStack (from HasCallStack): putStrLnWithCallStack, called at <interactive>:2:1 in interactive:Ghci1
GHC solves HasCallStack constraints in three steps:
- If there is a
CallStackin scope -- i.e. the enclosing function has aHasCallStackconstraint -- GHC will append the new call-site to the existingCallStack. - If there is no
CallStackin scope -- e.g. in the GHCi session above -- and the enclosing definition does not have an explicit type signature, GHC will infer aHasCallStackconstraint for the enclosing definition (subject to the monomorphism restriction). - If there is no
CallStackin scope and the enclosing definition has an explicit type signature, GHC will solve theHasCallStackconstraint for the singletonCallStackcontaining just the current call-site.
CallStacks do not interact with the RTS and do not require compilation
with -prof. On the other hand, as they are built up explicitly via the
HasCallStack constraints, they will generally not contain as much
information as the simulated call-stacks maintained by the RTS.
A CallStack is a [(String, SrcLoc)]. The String is the name of
function that was called, the SrcLoc is the call-site. The list is
ordered with the most recently called function at the head.
NOTE: The intrepid user may notice that HasCallStack is just an
alias for an implicit parameter ?callStack :: CallStack. This is an
implementation detail and should not be considered part of the
CallStack API, we may decide to change the implementation in the
future.
Since: base-4.8.1.0
Haskell defines operations to read and write characters from and to files,
represented by values of type Handle. Each value of this type is a
handle: a record used by the Haskell run-time system to manage I/O
with file system objects. A handle has at least the following properties:
- whether it manages input or output or both;
- whether it is open, closed or semi-closed;
- whether the object is seekable;
- whether buffering is disabled, or enabled on a line or block basis;
- a buffer (whose length may be zero).
Most handles will also have a current I/O position indicating where the next
input or output operation will occur. A handle is readable if it
manages only input or both input and output; likewise, it is writable if
it manages only output or both input and output. A handle is open when
first allocated.
Once it is closed it can no longer be used for either input or output,
though an implementation cannot re-use its storage while references
remain to it. Handles are in the Show and Eq classes. The string
produced by showing a handle is system dependent; it should include
enough information to identify the handle for debugging. A handle is
equal according to == only to itself; no attempt
is made to compare the internal state of different handles for equality.
Instances
comparisonEquivalence :: Comparison a -> Equivalence a #
defaultEquivalence :: Eq a => Equivalence a #
defaultComparison :: Ord a => Comparison a #
Compare using compare.
(>$$<) :: Contravariant f => f b -> (a -> b) -> f a infixl 4 #
This is an infix version of contramap with the arguments flipped.
(>$<) :: Contravariant f => (a -> b) -> f b -> f a infixl 4 #
This is an infix alias for contramap.
($<) :: Contravariant f => f b -> b -> f a infixl 4 #
This is >$ with its arguments flipped.
phantom :: (Functor f, Contravariant f) => f a -> f b #
If f is both Functor and Contravariant then by the time you factor
in the laws of each of those classes, it can't actually use its argument in
any meaningful capacity.
This method is surprisingly useful. Where both instances exist and are lawful we have the following laws:
fmapf ≡phantomcontramapf ≡phantom
class Contravariant (f :: Type -> Type) where #
The class of contravariant functors.
Whereas in Haskell, one can think of a Functor as containing or producing
values, a contravariant functor is a functor that can be thought of as
consuming values.
As an example, consider the type of predicate functions a -> Bool. One
such predicate might be negative x = x < 0, which
classifies integers as to whether they are negative. However, given this
predicate, we can re-use it in other situations, providing we have a way to
map values to integers. For instance, we can use the negative predicate
on a person's bank balance to work out if they are currently overdrawn:
newtype Predicate a = Predicate { getPredicate :: a -> Bool }
instance Contravariant Predicate where
contramap f (Predicate p) = Predicate (p . f)
| `- First, map the input...
`----- then apply the predicate.
overdrawn :: Predicate Person
overdrawn = contramap personBankBalance negative
Any instance should be subject to the following laws:
Note, that the second law follows from the free theorem of the type of
contramap and the first law, so you need only check that the former
condition holds.
Minimal complete definition
Instances
Constructors
| Predicate | |
Fields
| |
Instances
| Contravariant Predicate | A |
| Semigroup (Predicate a) | |
| Monoid (Predicate a) | |
newtype Comparison a #
Defines a total ordering on a type as per compare.
This condition is not checked by the types. You must ensure that the supplied values are valid total orderings yourself.
Constructors
| Comparison | |
Fields
| |
Instances
| Contravariant Comparison | A |
Defined in Data.Functor.Contravariant Methods contramap :: (a -> b) -> Comparison b -> Comparison a # (>$) :: b -> Comparison b -> Comparison a # | |
| Semigroup (Comparison a) | |
Defined in Data.Functor.Contravariant Methods (<>) :: Comparison a -> Comparison a -> Comparison a # sconcat :: NonEmpty (Comparison a) -> Comparison a # stimes :: Integral b => b -> Comparison a -> Comparison a # | |
| Monoid (Comparison a) | |
Defined in Data.Functor.Contravariant Methods mempty :: Comparison a # mappend :: Comparison a -> Comparison a -> Comparison a # mconcat :: [Comparison a] -> Comparison a # | |
newtype Equivalence a #
This data type represents an equivalence relation.
Equivalence relations are expected to satisfy three laws:
- Reflexivity
getEquivalencef a a = True- Symmetry
getEquivalencef a b =getEquivalencef b a- Transitivity
- If
andgetEquivalencef a bare bothgetEquivalencef b cTruethen so is.getEquivalencef a c
The types alone do not enforce these laws, so you'll have to check them yourself.
Constructors
| Equivalence | |
Fields
| |
Instances
| Contravariant Equivalence | Equivalence relations are |
Defined in Data.Functor.Contravariant Methods contramap :: (a -> b) -> Equivalence b -> Equivalence a # (>$) :: b -> Equivalence b -> Equivalence a # | |
| Semigroup (Equivalence a) | |
Defined in Data.Functor.Contravariant Methods (<>) :: Equivalence a -> Equivalence a -> Equivalence a # sconcat :: NonEmpty (Equivalence a) -> Equivalence a # stimes :: Integral b => b -> Equivalence a -> Equivalence a # | |
| Monoid (Equivalence a) | |
Defined in Data.Functor.Contravariant Methods mempty :: Equivalence a # mappend :: Equivalence a -> Equivalence a -> Equivalence a # mconcat :: [Equivalence a] -> Equivalence a # | |
Dual function arrows.
Instances
| Contravariant (Op a) | |
| Category Op | |
| Floating a => Floating (Op a b) | |
| Fractional a => Fractional (Op a b) | |
| Num a => Num (Op a b) | |
| Semigroup a => Semigroup (Op a b) | |
| Monoid a => Monoid (Op a b) | |
newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1) infixr 9 #
Right-to-left composition of functors. The composition of applicative functors is always applicative, but the composition of monads is not always a monad.
Constructors
| Compose infixr 9 | |
Fields
| |
Instances
| Functor f => Generic1 (Compose f g :: k -> Type) | Since: base-4.9.0.0 |
| TestEquality f => TestEquality (Compose f g :: k2 -> Type) | The deduction (via generativity) that if Since: base-4.14.0.0 |
Defined in Data.Functor.Compose | |
| Unbox (f (g a)) => Vector Vector (Compose f g a) | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Compose f g a) -> m (Vector (Compose f g a)) basicUnsafeThaw :: PrimMonad m => Vector (Compose f g a) -> m (Mutable Vector (PrimState m) (Compose f g a)) basicLength :: Vector (Compose f g a) -> Int basicUnsafeSlice :: Int -> Int -> Vector (Compose f g a) -> Vector (Compose f g a) basicUnsafeIndexM :: Monad m => Vector (Compose f g a) -> Int -> m (Compose f g a) basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Compose f g a) -> Vector (Compose f g a) -> m () elemseq :: Vector (Compose f g a) -> Compose f g a -> b -> b | |
| Unbox (f (g a)) => MVector MVector (Compose f g a) | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s (Compose f g a) -> Int basicUnsafeSlice :: Int -> Int -> MVector s (Compose f g a) -> MVector s (Compose f g a) basicOverlaps :: MVector s (Compose f g a) -> MVector s (Compose f g a) -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Compose f g a)) basicInitialize :: PrimMonad m => MVector (PrimState m) (Compose f g a) -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Compose f g a -> m (MVector (PrimState m) (Compose f g a)) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Compose f g a) -> Int -> m (Compose f g a) basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Compose f g a) -> Int -> Compose f g a -> m () basicClear :: PrimMonad m => MVector (PrimState m) (Compose f g a) -> m () basicSet :: PrimMonad m => MVector (PrimState m) (Compose f g a) -> Compose f g a -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Compose f g a) -> MVector (PrimState m) (Compose f g a) -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Compose f g a) -> MVector (PrimState m) (Compose f g a) -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Compose f g a) -> Int -> m (MVector (PrimState m) (Compose f g a)) | |
| (Functor f, Functor g) => Functor (Compose f g) | Since: base-4.9.0.0 |
| (Applicative f, Applicative g) => Applicative (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose | |
| (Foldable f, Foldable g) => Foldable (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose Methods fold :: Monoid m => Compose f g m -> m # foldMap :: Monoid m => (a -> m) -> Compose f g a -> m # foldMap' :: Monoid m => (a -> m) -> Compose f g a -> m # foldr :: (a -> b -> b) -> b -> Compose f g a -> b # foldr' :: (a -> b -> b) -> b -> Compose f g a -> b # foldl :: (b -> a -> b) -> b -> Compose f g a -> b # foldl' :: (b -> a -> b) -> b -> Compose f g a -> b # foldr1 :: (a -> a -> a) -> Compose f g a -> a # foldl1 :: (a -> a -> a) -> Compose f g a -> a # toList :: Compose f g a -> [a] # null :: Compose f g a -> Bool # length :: Compose f g a -> Int # elem :: Eq a => a -> Compose f g a -> Bool # maximum :: Ord a => Compose f g a -> a # minimum :: Ord a => Compose f g a -> a # | |
| (Traversable f, Traversable g) => Traversable (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose | |
| (Functor f, Contravariant g) => Contravariant (Compose f g) | |
| (Eq1 f, Eq1 g) => Eq1 (Compose f g) | Since: base-4.9.0.0 |
| (Ord1 f, Ord1 g) => Ord1 (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose | |
| (Read1 f, Read1 g) => Read1 (Compose f g) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Compose f g a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Compose f g a] # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Compose f g a) # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Compose f g a] # | |
| (Show1 f, Show1 g) => Show1 (Compose f g) | Since: base-4.9.0.0 |
| (Alternative f, Applicative g) => Alternative (Compose f g) | Since: base-4.9.0.0 |
| (NFData1 f, NFData1 g) => NFData1 (Compose f g) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| (Hashable1 f, Hashable1 g) => Hashable1 (Compose f g) | |
Defined in Data.Hashable.Class | |
| (Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a) | Since: base-4.9.0.0 |
| (Typeable a, Typeable f, Typeable g, Typeable k1, Typeable k2, Data (f (g a))) => Data (Compose f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g0. g0 -> c g0) -> Compose f g a -> c (Compose f g a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Compose f g a) # toConstr :: Compose f g a -> Constr # dataTypeOf :: Compose f g a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Compose f g a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Compose f g a)) # gmapT :: (forall b. Data b => b -> b) -> Compose f g a -> Compose f g a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Compose f g a -> r # gmapQ :: (forall d. Data d => d -> u) -> Compose f g a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Compose f g a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Compose f g a -> m (Compose f g a) # | |
| (Ord1 f, Ord1 g, Ord a) => Ord (Compose f g a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Compose Methods compare :: Compose f g a -> Compose f g a -> Ordering # (<) :: Compose f g a -> Compose f g a -> Bool # (<=) :: Compose f g a -> Compose f g a -> Bool # (>) :: Compose f g a -> Compose f g a -> Bool # (>=) :: Compose f g a -> Compose f g a -> Bool # | |
| (Read1 f, Read1 g, Read a) => Read (Compose f g a) | Since: base-4.9.0.0 |
| (Show1 f, Show1 g, Show a) => Show (Compose f g a) | Since: base-4.9.0.0 |
| Generic (Compose f g a) | Since: base-4.9.0.0 |
| (NFData1 f, NFData1 g, NFData a) => NFData (Compose f g a) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| (Hashable1 f, Hashable1 g, Hashable a) => Hashable (Compose f g a) | |
Defined in Data.Hashable.Class | |
| Unbox (f (g a)) => Unbox (Compose f g a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 (Compose f g :: k -> Type) | |
Defined in Data.Functor.Compose | |
| newtype MVector s (Compose f g a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep (Compose f g a) | |
Defined in Data.Functor.Compose | |
| newtype Vector (Compose f g a) | |
Defined in Data.Vector.Unboxed.Base | |
Since Void values logically don't exist, this witnesses the
logical reasoning tool of "ex falso quodlibet".
>>>let x :: Either Void Int; x = Right 5>>>:{case x of Right r -> r Left l -> absurd l :} 5
Since: base-4.8.0.0
Uninhabited data type
Since: base-4.8.0.0
Instances
| Eq Void | Since: base-4.8.0.0 |
| Data Void | Since: base-4.8.0.0 |
Defined in Data.Void Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Void -> c Void # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Void # dataTypeOf :: Void -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Void) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Void) # gmapT :: (forall b. Data b => b -> b) -> Void -> Void # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Void -> r # gmapQ :: (forall d. Data d => d -> u) -> Void -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Void -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Void -> m Void # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Void -> m Void # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Void -> m Void # | |
| Ord Void | Since: base-4.8.0.0 |
| Read Void | Reading a Since: base-4.8.0.0 |
| Show Void | Since: base-4.8.0.0 |
| Ix Void | Since: base-4.8.0.0 |
| Generic Void | Since: base-4.8.0.0 |
| Semigroup Void | Since: base-4.9.0.0 |
| Exception Void | Since: base-4.8.0.0 |
Defined in Data.Void Methods toException :: Void -> SomeException # fromException :: SomeException -> Maybe Void # displayException :: Void -> String # | |
| NFData Void | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Hashable Void | |
Defined in Data.Hashable.Class | |
| Lift Void | Since: template-haskell-2.15.0.0 |
| type Rep Void | |
mtimesDefault :: (Integral b, Monoid a) => b -> a -> a #
data WrappedMonoid m #
Provide a Semigroup for an arbitrary Monoid.
NOTE: This is not needed anymore since Semigroup became a superclass of
Monoid in base-4.11 and this newtype be deprecated at some point in the future.
Instances
| NFData1 WrappedMonoid | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq Methods liftRnf :: (a -> ()) -> WrappedMonoid a -> () # | |
| Unbox a => Vector Vector (WrappedMonoid a) | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (WrappedMonoid a) -> m (Vector (WrappedMonoid a)) basicUnsafeThaw :: PrimMonad m => Vector (WrappedMonoid a) -> m (Mutable Vector (PrimState m) (WrappedMonoid a)) basicLength :: Vector (WrappedMonoid a) -> Int basicUnsafeSlice :: Int -> Int -> Vector (WrappedMonoid a) -> Vector (WrappedMonoid a) basicUnsafeIndexM :: Monad m => Vector (WrappedMonoid a) -> Int -> m (WrappedMonoid a) basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (WrappedMonoid a) -> Vector (WrappedMonoid a) -> m () elemseq :: Vector (WrappedMonoid a) -> WrappedMonoid a -> b -> b | |
| Unbox a => MVector MVector (WrappedMonoid a) | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s (WrappedMonoid a) -> Int basicUnsafeSlice :: Int -> Int -> MVector s (WrappedMonoid a) -> MVector s (WrappedMonoid a) basicOverlaps :: MVector s (WrappedMonoid a) -> MVector s (WrappedMonoid a) -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (WrappedMonoid a)) basicInitialize :: PrimMonad m => MVector (PrimState m) (WrappedMonoid a) -> m () basicUnsafeReplicate :: PrimMonad m => Int -> WrappedMonoid a -> m (MVector (PrimState m) (WrappedMonoid a)) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (WrappedMonoid a) -> Int -> m (WrappedMonoid a) basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (WrappedMonoid a) -> Int -> WrappedMonoid a -> m () basicClear :: PrimMonad m => MVector (PrimState m) (WrappedMonoid a) -> m () basicSet :: PrimMonad m => MVector (PrimState m) (WrappedMonoid a) -> WrappedMonoid a -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (WrappedMonoid a) -> MVector (PrimState m) (WrappedMonoid a) -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (WrappedMonoid a) -> MVector (PrimState m) (WrappedMonoid a) -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (WrappedMonoid a) -> Int -> m (MVector (PrimState m) (WrappedMonoid a)) | |
| Bounded m => Bounded (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup | |
| Enum a => Enum (WrappedMonoid a) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods succ :: WrappedMonoid a -> WrappedMonoid a # pred :: WrappedMonoid a -> WrappedMonoid a # toEnum :: Int -> WrappedMonoid a # fromEnum :: WrappedMonoid a -> Int # enumFrom :: WrappedMonoid a -> [WrappedMonoid a] # enumFromThen :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # enumFromTo :: WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # enumFromThenTo :: WrappedMonoid a -> WrappedMonoid a -> WrappedMonoid a -> [WrappedMonoid a] # | |
| Eq m => Eq (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods (==) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (/=) :: WrappedMonoid m -> WrappedMonoid m -> Bool # | |
| Data m => Data (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WrappedMonoid m -> c (WrappedMonoid m) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonoid m) # toConstr :: WrappedMonoid m -> Constr # dataTypeOf :: WrappedMonoid m -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonoid m)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonoid m)) # gmapT :: (forall b. Data b => b -> b) -> WrappedMonoid m -> WrappedMonoid m # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonoid m -> r # gmapQ :: (forall d. Data d => d -> u) -> WrappedMonoid m -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonoid m -> u # gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) # gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) # gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonoid m -> m0 (WrappedMonoid m) # | |
| Ord m => Ord (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods compare :: WrappedMonoid m -> WrappedMonoid m -> Ordering # (<) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (<=) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (>) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (>=) :: WrappedMonoid m -> WrappedMonoid m -> Bool # max :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # min :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # | |
| Read m => Read (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods readsPrec :: Int -> ReadS (WrappedMonoid m) # readList :: ReadS [WrappedMonoid m] # readPrec :: ReadPrec (WrappedMonoid m) # readListPrec :: ReadPrec [WrappedMonoid m] # | |
| Show m => Show (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods showsPrec :: Int -> WrappedMonoid m -> ShowS # show :: WrappedMonoid m -> String # showList :: [WrappedMonoid m] -> ShowS # | |
| Generic (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Associated Types type Rep (WrappedMonoid m) :: Type -> Type # Methods from :: WrappedMonoid m -> Rep (WrappedMonoid m) x # to :: Rep (WrappedMonoid m) x -> WrappedMonoid m # | |
| Monoid m => Semigroup (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods (<>) :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # sconcat :: NonEmpty (WrappedMonoid m) -> WrappedMonoid m # stimes :: Integral b => b -> WrappedMonoid m -> WrappedMonoid m # | |
| Monoid m => Monoid (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods mempty :: WrappedMonoid m # mappend :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m # mconcat :: [WrappedMonoid m] -> WrappedMonoid m # | |
| NFData m => NFData (WrappedMonoid m) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq Methods rnf :: WrappedMonoid m -> () # | |
| Hashable a => Hashable (WrappedMonoid a) | |
Defined in Data.Hashable.Class | |
| Unbox a => Unbox (WrappedMonoid a) | |
Defined in Data.Vector.Unboxed.Base | |
| Generic1 WrappedMonoid | Since: base-4.9.0.0 |
Defined in Data.Semigroup Associated Types type Rep1 WrappedMonoid :: k -> Type # Methods from1 :: forall (a :: k). WrappedMonoid a -> Rep1 WrappedMonoid a # to1 :: forall (a :: k). Rep1 WrappedMonoid a -> WrappedMonoid a # | |
| newtype MVector s (WrappedMonoid a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep (WrappedMonoid m) | |
Defined in Data.Semigroup type Rep (WrappedMonoid m) = D1 ('MetaData "WrappedMonoid" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "WrapMonoid" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonoid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 m))) | |
| newtype Vector (WrappedMonoid a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 WrappedMonoid | |
Defined in Data.Semigroup type Rep1 WrappedMonoid = D1 ('MetaData "WrappedMonoid" "Data.Semigroup" "base" 'True) (C1 ('MetaCons "WrapMonoid" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonoid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) | |
Option is effectively Maybe with a better instance of
Monoid, built off of an underlying Semigroup instead of an
underlying Monoid.
Ideally, this type would not exist at all and we would just fix the
Monoid instance of Maybe.
In GHC 8.4 and higher, the Monoid instance for Maybe has been
corrected to lift a Semigroup instance instead of a Monoid
instance. Consequently, this type is no longer useful. It will be
marked deprecated in GHC 8.8 and removed in GHC 8.10.
Instances
| Monad Option | Since: base-4.9.0.0 |
| Functor Option | Since: base-4.9.0.0 |
| MonadFix Option | Since: base-4.9.0.0 |
Defined in Data.Semigroup | |
| Applicative Option | Since: base-4.9.0.0 |
| Foldable Option | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods fold :: Monoid m => Option m -> m # foldMap :: Monoid m => (a -> m) -> Option a -> m # foldMap' :: Monoid m => (a -> m) -> Option a -> m # foldr :: (a -> b -> b) -> b -> Option a -> b # foldr' :: (a -> b -> b) -> b -> Option a -> b # foldl :: (b -> a -> b) -> b -> Option a -> b # foldl' :: (b -> a -> b) -> b -> Option a -> b # foldr1 :: (a -> a -> a) -> Option a -> a # foldl1 :: (a -> a -> a) -> Option a -> a # elem :: Eq a => a -> Option a -> Bool # maximum :: Ord a => Option a -> a # minimum :: Ord a => Option a -> a # | |
| Traversable Option | Since: base-4.9.0.0 |
| Alternative Option | Since: base-4.9.0.0 |
| MonadPlus Option | Since: base-4.9.0.0 |
| NFData1 Option | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Eq a => Eq (Option a) | Since: base-4.9.0.0 |
| Data a => Data (Option a) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Option a -> c (Option a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Option a) # toConstr :: Option a -> Constr # dataTypeOf :: Option a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Option a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Option a)) # gmapT :: (forall b. Data b => b -> b) -> Option a -> Option a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Option a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Option a -> r # gmapQ :: (forall d. Data d => d -> u) -> Option a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Option a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Option a -> m (Option a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Option a -> m (Option a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Option a -> m (Option a) # | |
| Ord a => Ord (Option a) | Since: base-4.9.0.0 |
Defined in Data.Semigroup | |
| Read a => Read (Option a) | Since: base-4.9.0.0 |
| Show a => Show (Option a) | Since: base-4.9.0.0 |
| Generic (Option a) | Since: base-4.9.0.0 |
| Semigroup a => Semigroup (Option a) | Since: base-4.9.0.0 |
| Semigroup a => Monoid (Option a) | Since: base-4.9.0.0 |
| NFData a => NFData (Option a) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| Hashable a => Hashable (Option a) | |
Defined in Data.Hashable.Class | |
| Generic1 Option | Since: base-4.9.0.0 |
| type Rep (Option a) | |
Defined in Data.Semigroup | |
| type Rep1 Option | |
Defined in Data.Semigroup | |
sortWith :: Ord b => (a -> b) -> [a] -> [a] #
The sortWith function sorts a list of elements using the
user supplied function to project something out of each element
bifoldMapDefault :: (Bitraversable t, Monoid m) => (a -> m) -> (b -> m) -> t a b -> m #
A default definition of bifoldMap in terms of the Bitraversable
operations.
bifoldMapDefaultf g ≡getConst.bitraverse(Const. f) (Const. g)
Since: base-4.10.0.0
bimapDefault :: Bitraversable t => (a -> b) -> (c -> d) -> t a c -> t b d #
A default definition of bimap in terms of the Bitraversable
operations.
bimapDefaultf g ≡runIdentity.bitraverse(Identity. f) (Identity. g)
Since: base-4.10.0.0
bifor :: (Bitraversable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f (t c d) #
bifor is bitraverse with the structure as the first argument. For a
version that ignores the results, see bifor_.
Since: base-4.10.0.0
bisequence :: (Bitraversable t, Applicative f) => t (f a) (f b) -> f (t a b) #
Sequences all the actions in a structure, building a new structure with
the same shape using the results of the actions. For a version that ignores
the results, see bisequence_.
bisequence≡bitraverseidid
Since: base-4.10.0.0
class (Bifunctor t, Bifoldable t) => Bitraversable (t :: Type -> Type -> Type) where #
Bitraversable identifies bifunctorial data structures whose elements can
be traversed in order, performing Applicative or Monad actions at each
element, and collecting a result structure with the same shape.
As opposed to Traversable data structures, which have one variety of
element on which an action can be performed, Bitraversable data structures
have two such varieties of elements.
A definition of bitraverse must satisfy the following laws:
- Naturality
for every applicative transformationbitraverse(t . f) (t . g) ≡ t .bitraversef gt- Identity
bitraverseIdentityIdentity≡Identity- Composition
Compose.fmap(bitraverseg1 g2) .bitraversef1 f2 ≡bitraverse(Compose.fmapg1 . f1) (Compose.fmapg2 . f2)
where an applicative transformation is a function
t :: (Applicativef,Applicativeg) => f a -> g a
preserving the Applicative operations:
t (purex) =purex t (f<*>x) = t f<*>t x
and the identity functor Identity and composition functors
Compose are from Data.Functor.Identity and
Data.Functor.Compose.
Some simple examples are Either and (,):
instance Bitraversable Either where bitraverse f _ (Left x) = Left <$> f x bitraverse _ g (Right y) = Right <$> g y instance Bitraversable (,) where bitraverse f g (x, y) = (,) <$> f x <*> g y
Bitraversable relates to its superclasses in the following ways:
bimapf g ≡runIdentity.bitraverse(Identity. f) (Identity. g)bifoldMapf g =getConst.bitraverse(Const. f) (Const. g)
These are available as bimapDefault and bifoldMapDefault respectively.
Since: base-4.10.0.0
Minimal complete definition
Nothing
Methods
bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> t a b -> f (t c d) #
Evaluates the relevant functions at each element in the structure, running the action, and builds a new structure with the same shape, using the results produced from sequencing the actions.
bitraversef g ≡bisequenceA.bimapf g
For a version that ignores the results, see bitraverse_.
Since: base-4.10.0.0
Instances
| Bitraversable Either | Since: base-4.10.0.0 |
Defined in Data.Bitraversable Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Either a b -> f (Either c d) # | |
| Bitraversable (,) | Since: base-4.10.0.0 |
Defined in Data.Bitraversable Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (a, b) -> f (c, d) # | |
| Bitraversable Arg | Since: base-4.10.0.0 |
Defined in Data.Semigroup Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Arg a b -> f (Arg c d) # | |
| Bitraversable ((,,) x) | Since: base-4.10.0.0 |
Defined in Data.Bitraversable Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, a, b) -> f (x, c, d) # | |
| Bitraversable (Const :: Type -> Type -> Type) | Since: base-4.10.0.0 |
Defined in Data.Bitraversable Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Const a b -> f (Const c d) # | |
| Bitraversable (Tagged :: Type -> Type -> Type) | |
Defined in Data.Tagged Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Tagged a b -> f (Tagged c d) # | |
| Bitraversable (K1 i :: Type -> Type -> Type) | Since: base-4.10.0.0 |
Defined in Data.Bitraversable Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> K1 i a b -> f (K1 i c d) # | |
| Bitraversable ((,,,) x y) | Since: base-4.10.0.0 |
Defined in Data.Bitraversable Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, y, a, b) -> f (x, y, c, d) # | |
| Bitraversable ((,,,,) x y z) | Since: base-4.10.0.0 |
Defined in Data.Bitraversable Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, y, z, a, b) -> f (x, y, z, c, d) # | |
| Bitraversable ((,,,,,) x y z w) | Since: base-4.10.0.0 |
Defined in Data.Bitraversable Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, y, z, w, a, b) -> f (x, y, z, w, c, d) # | |
| Bitraversable ((,,,,,,) x y z w v) | Since: base-4.10.0.0 |
Defined in Data.Bitraversable Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (x, y, z, w, v, a, b) -> f (x, y, z, w, v, c, d) # | |
bifind :: Bifoldable t => (a -> Bool) -> t a a -> Maybe a #
biall :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool #
Determines whether all elements of the structure satisfy their appropriate predicate argument.
Since: base-4.10.0.0
biany :: Bifoldable t => (a -> Bool) -> (b -> Bool) -> t a b -> Bool #
Determines whether any element of the structure satisfies its appropriate predicate argument.
Since: base-4.10.0.0
bielem :: (Bifoldable t, Eq a) => a -> t a a -> Bool #
Does the element occur in the structure?
Since: base-4.10.0.0
bilength :: Bifoldable t => t a b -> Int #
Returns the size/length of a finite structure as an Int.
Since: base-4.10.0.0
binull :: Bifoldable t => t a b -> Bool #
Test whether the structure is empty.
Since: base-4.10.0.0
biList :: Bifoldable t => t a a -> [a] #
Collects the list of elements of a structure, from left to right.
Since: base-4.10.0.0
biasum :: (Bifoldable t, Alternative f) => t (f a) (f a) -> f a #
The sum of a collection of actions, generalizing biconcat.
Since: base-4.10.0.0
bisequence_ :: (Bifoldable t, Applicative f) => t (f a) (f b) -> f () #
Evaluate each action in the structure from left to right, and ignore the
results. For a version that doesn't ignore the results, see
bisequence.
Since: base-4.10.0.0
bifor_ :: (Bifoldable t, Applicative f) => t a b -> (a -> f c) -> (b -> f d) -> f () #
As bitraverse_, but with the structure as the primary argument. For a
version that doesn't ignore the results, see bifor.
>>>> bifor_ ('a', "bc") print (print . reverse)'a' "cb"
Since: base-4.10.0.0
bitraverse_ :: (Bifoldable t, Applicative f) => (a -> f c) -> (b -> f d) -> t a b -> f () #
Map each element of a structure using one of two actions, evaluate these
actions from left to right, and ignore the results. For a version that
doesn't ignore the results, see bitraverse.
Since: base-4.10.0.0
bifoldlM :: (Bifoldable t, Monad m) => (a -> b -> m a) -> (a -> c -> m a) -> a -> t b c -> m a #
Left associative monadic bifold over a structure.
Since: base-4.10.0.0
bifoldl' :: Bifoldable t => (a -> b -> a) -> (a -> c -> a) -> a -> t b c -> a #
As bifoldl, but strict in the result of the reduction functions at each
step.
This ensures that each step of the bifold is forced to weak head normal form
before being applied, avoiding the collection of thunks that would otherwise
occur. This is often what you want to strictly reduce a finite structure to
a single, monolithic result (e.g., bilength).
Since: base-4.10.0.0
bifoldrM :: (Bifoldable t, Monad m) => (a -> c -> m c) -> (b -> c -> m c) -> c -> t a b -> m c #
Right associative monadic bifold over a structure.
Since: base-4.10.0.0
bifoldr' :: Bifoldable t => (a -> c -> c) -> (b -> c -> c) -> c -> t a b -> c #
As bifoldr, but strict in the result of the reduction functions at each
step.
Since: base-4.10.0.0
class Bifoldable (p :: Type -> Type -> Type) where #
Bifoldable identifies foldable structures with two different varieties
of elements (as opposed to Foldable, which has one variety of element).
Common examples are Either and (,):
instance Bifoldable Either where bifoldMap f _ (Left a) = f a bifoldMap _ g (Right b) = g b instance Bifoldable (,) where bifoldr f g z (a, b) = f a (g b z)
A minimal Bifoldable definition consists of either bifoldMap or
bifoldr. When defining more than this minimal set, one should ensure
that the following identities hold:
bifold≡bifoldMapididbifoldMapf g ≡bifoldr(mappend. f) (mappend. g)memptybifoldrf g z t ≡appEndo(bifoldMap(Endo . f) (Endo . g) t) z
If the type is also a Bifunctor instance, it should satisfy:
bifoldMapf g ≡bifold.bimapf g
which implies that
bifoldMapf g .bimaph i ≡bifoldMap(f . h) (g . i)
Since: base-4.10.0.0
Methods
bifold :: Monoid m => p m m -> m #
bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> p a b -> m #
Combines the elements of a structure, given ways of mapping them to a common monoid.
bifoldMapf g ≡bifoldr(mappend. f) (mappend. g)mempty
Since: base-4.10.0.0
bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> p a b -> c #
Combines the elements of a structure in a right associative manner.
Given a hypothetical function toEitherList :: p a b -> [Either a b]
yielding a list of all elements of a structure in order, the following
would hold:
bifoldrf g z ≡foldr(eitherf g) z . toEitherList
Since: base-4.10.0.0
bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> p a b -> c #
Combines the elements of a structure in a left associative manner. Given
a hypothetical function toEitherList :: p a b -> [Either a b] yielding a
list of all elements of a structure in order, the following would hold:
bifoldlf g z ≡foldl(acc ->either(f acc) (g acc)) z . toEitherList
Note that if you want an efficient left-fold, you probably want to use
bifoldl' instead of bifoldl. The reason is that the latter does not
force the "inner" results, resulting in a thunk chain which then must be
evaluated from the outside-in.
Since: base-4.10.0.0
Instances
| Bifoldable Either | Since: base-4.10.0.0 |
| Bifoldable (,) | Since: base-4.10.0.0 |
| Bifoldable Arg | Since: base-4.10.0.0 |
| Bifoldable ((,,) x) | Since: base-4.10.0.0 |
| Bifoldable (Const :: Type -> Type -> Type) | Since: base-4.10.0.0 |
| Bifoldable (Tagged :: Type -> Type -> Type) | |
| Bifoldable (K1 i :: Type -> Type -> Type) | Since: base-4.10.0.0 |
| Bifoldable ((,,,) x y) | Since: base-4.10.0.0 |
| Bifoldable ((,,,,) x y z) | Since: base-4.10.0.0 |
| Bifoldable ((,,,,,) x y z w) | Since: base-4.10.0.0 |
Defined in Data.Bifoldable | |
| Bifoldable ((,,,,,,) x y z w v) | Since: base-4.10.0.0 |
Defined in Data.Bifoldable | |
class Bifunctor (p :: Type -> Type -> Type) where #
A bifunctor is a type constructor that takes
two type arguments and is a functor in both arguments. That
is, unlike with Functor, a type constructor such as Either
does not need to be partially applied for a Bifunctor
instance, and the methods in this class permit mapping
functions over the Left value or the Right value,
or both at the same time.
Formally, the class Bifunctor represents a bifunctor
from Hask -> Hask.
Intuitively it is a bifunctor where both the first and second arguments are covariant.
You can define a Bifunctor by either defining bimap or by
defining both first and second.
If you supply bimap, you should ensure that:
bimapidid≡id
If you supply first and second, ensure:
firstid≡idsecondid≡id
If you supply both, you should also ensure:
bimapf g ≡firstf.secondg
These ensure by parametricity:
bimap(f.g) (h.i) ≡bimapf h.bimapg ifirst(f.g) ≡firstf.firstgsecond(f.g) ≡secondf.secondg
Since: base-4.8.0.0
Methods
bimap :: (a -> b) -> (c -> d) -> p a c -> p b d #
Map over both arguments at the same time.
bimapf g ≡firstf.secondg
Examples
>>>bimap toUpper (+1) ('j', 3)('J',4)
>>>bimap toUpper (+1) (Left 'j')Left 'J'
>>>bimap toUpper (+1) (Right 3)Right 4
Instances
| Bifunctor Either | Since: base-4.8.0.0 |
| Bifunctor (,) | Since: base-4.8.0.0 |
| Bifunctor Arg | Since: base-4.9.0.0 |
| Bifunctor ((,,) x1) | Since: base-4.8.0.0 |
| Bifunctor (Const :: Type -> Type -> Type) | Since: base-4.8.0.0 |
| Bifunctor (Tagged :: Type -> Type -> Type) | |
| Bifunctor (K1 i :: Type -> Type -> Type) | Since: base-4.9.0.0 |
| Bifunctor ((,,,) x1 x2) | Since: base-4.8.0.0 |
| Bifunctor ((,,,,) x1 x2 x3) | Since: base-4.8.0.0 |
| Bifunctor ((,,,,,) x1 x2 x3 x4) | Since: base-4.8.0.0 |
| Bifunctor ((,,,,,,) x1 x2 x3 x4 x5) | Since: base-4.8.0.0 |
showStackTrace :: IO (Maybe String) #
Get a string representation of the current execution stack state.
getStackTrace :: IO (Maybe [Location]) #
Get a trace of the current execution stack state.
Returns Nothing if stack trace support isn't available on host machine.
class Monad m => MonadIO (m :: Type -> Type) where #
Monads in which IO computations may be embedded.
Any monad built by applying a sequence of monad transformers to the
IO monad will be an instance of this class.
Instances should satisfy the following laws, which state that liftIO
is a transformer of monads:
Instances
unless :: Applicative f => Bool -> f () -> f () #
The reverse of when.
replicateM_ :: Applicative m => Int -> m a -> m () #
Like replicateM, but discards the result.
replicateM :: Applicative m => Int -> m a -> m [a] #
performs the action replicateM n actn times,
gathering the results.
Using ApplicativeDo: '' can be understood as
the replicateM 5 asdo expression
do a1 <- as a2 <- as a3 <- as a4 <- as a5 <- as pure [a1,a2,a3,a4,a5]
Note the Applicative constraint.
zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m () #
zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c] #
mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) #
The mapAndUnzipM function maps its first argument over a list, returning
the result as a pair of lists. This function is mainly used with complicated
data structures or a state monad.
forever :: Applicative f => f a -> f b #
Repeat an action indefinitely.
Using ApplicativeDo: '' can be understood as the
pseudo-forever asdo expression
do as as ..
with as repeating.
Examples
A common use of forever is to process input from network sockets,
Handles, and channels
(e.g. MVar and
Chan).
For example, here is how we might implement an echo
server, using
forever both to listen for client connections on a network socket
and to echo client input on client connection handles:
echoServer :: Socket -> IO () echoServer socket =forever$ do client <- accept socketforkFinally(echo client) (\_ -> hClose client) where echo :: Handle -> IO () echo client =forever$ hGetLine client >>= hPutStrLn client
(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c infixr 1 #
Left-to-right composition of Kleisli arrows.
'(bs ' can be understood as the >=> cs) ado expression
do b <- bs a cs b
mapAccumR :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) #
mapAccumL :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) #
forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b) #
optional :: Alternative f => f a -> f (Maybe a) #
One or none.
Lists, but with an Applicative functor based on zipping.
Constructors
| ZipList | |
Fields
| |
Instances
| Functor ZipList | Since: base-2.1 |
| Applicative ZipList | f <$> ZipList xs1 <*> ... <*> ZipList xsN
= ZipList (zipWithN f xs1 ... xsN)where (\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..]
= ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..])
= ZipList {getZipList = ["a5","b6b6","c7c7c7"]}Since: base-2.1 |
| Foldable ZipList | Since: base-4.9.0.0 |
Defined in Control.Applicative Methods fold :: Monoid m => ZipList m -> m # foldMap :: Monoid m => (a -> m) -> ZipList a -> m # foldMap' :: Monoid m => (a -> m) -> ZipList a -> m # foldr :: (a -> b -> b) -> b -> ZipList a -> b # foldr' :: (a -> b -> b) -> b -> ZipList a -> b # foldl :: (b -> a -> b) -> b -> ZipList a -> b # foldl' :: (b -> a -> b) -> b -> ZipList a -> b # foldr1 :: (a -> a -> a) -> ZipList a -> a # foldl1 :: (a -> a -> a) -> ZipList a -> a # elem :: Eq a => a -> ZipList a -> Bool # maximum :: Ord a => ZipList a -> a # minimum :: Ord a => ZipList a -> a # | |
| Traversable ZipList | Since: base-4.9.0.0 |
| Alternative ZipList | Since: base-4.11.0.0 |
| NFData1 ZipList | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| IsList (ZipList a) | Since: base-4.15.0.0 |
| Eq a => Eq (ZipList a) | Since: base-4.7.0.0 |
| Ord a => Ord (ZipList a) | Since: base-4.7.0.0 |
| Read a => Read (ZipList a) | Since: base-4.7.0.0 |
| Show a => Show (ZipList a) | Since: base-4.7.0.0 |
| Generic (ZipList a) | Since: base-4.7.0.0 |
| NFData a => NFData (ZipList a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Generic1 ZipList | Since: base-4.7.0.0 |
| type Rep (ZipList a) | |
Defined in Control.Applicative | |
| type Item (ZipList a) | |
| type Rep1 ZipList | |
Defined in Control.Applicative | |
(&&&) :: Arrow a => a b c -> a b c' -> a b (c, c') infixr 3 #
Fanout: send the input to both argument arrows and combine their output.
The default definition may be overridden with a more efficient version if desired.
Identity functor and monad. (a non-strict monad)
Since: base-4.8.0.0
Constructors
| Identity | |
Fields
| |
Instances
| Monad Identity | Since: base-4.8.0.0 |
| Functor Identity | Since: base-4.8.0.0 |
| MonadFix Identity | Since: base-4.8.0.0 |
Defined in Data.Functor.Identity | |
| Applicative Identity | Since: base-4.8.0.0 |
| Foldable Identity | Since: base-4.8.0.0 |
Defined in Data.Functor.Identity Methods fold :: Monoid m => Identity m -> m # foldMap :: Monoid m => (a -> m) -> Identity a -> m # foldMap' :: Monoid m => (a -> m) -> Identity a -> m # foldr :: (a -> b -> b) -> b -> Identity a -> b # foldr' :: (a -> b -> b) -> b -> Identity a -> b # foldl :: (b -> a -> b) -> b -> Identity a -> b # foldl' :: (b -> a -> b) -> b -> Identity a -> b # foldr1 :: (a -> a -> a) -> Identity a -> a # foldl1 :: (a -> a -> a) -> Identity a -> a # elem :: Eq a => a -> Identity a -> Bool # maximum :: Ord a => Identity a -> a # minimum :: Ord a => Identity a -> a # | |
| Foldable Tree | |
Defined in Hedgehog.Internal.Tree Methods fold :: Monoid m => Tree m -> m # foldMap :: Monoid m => (a -> m) -> Tree a -> m # foldMap' :: Monoid m => (a -> m) -> Tree a -> m # foldr :: (a -> b -> b) -> b -> Tree a -> b # foldr' :: (a -> b -> b) -> b -> Tree a -> b # foldl :: (b -> a -> b) -> b -> Tree a -> b # foldl' :: (b -> a -> b) -> b -> Tree a -> b # foldr1 :: (a -> a -> a) -> Tree a -> a # foldl1 :: (a -> a -> a) -> Tree a -> a # elem :: Eq a => a -> Tree a -> Bool # maximum :: Ord a => Tree a -> a # | |
| Foldable Node | |
Defined in Hedgehog.Internal.Tree Methods fold :: Monoid m => Node m -> m # foldMap :: Monoid m => (a -> m) -> Node a -> m # foldMap' :: Monoid m => (a -> m) -> Node a -> m # foldr :: (a -> b -> b) -> b -> Node a -> b # foldr' :: (a -> b -> b) -> b -> Node a -> b # foldl :: (b -> a -> b) -> b -> Node a -> b # foldl' :: (b -> a -> b) -> b -> Node a -> b # foldr1 :: (a -> a -> a) -> Node a -> a # foldl1 :: (a -> a -> a) -> Node a -> a # elem :: Eq a => a -> Node a -> Bool # maximum :: Ord a => Node a -> a # | |
| Traversable Identity | Since: base-4.9.0.0 |
| Traversable Tree | |
Defined in Hedgehog.Internal.Tree | |
| Traversable Node | |
Defined in Hedgehog.Internal.Tree | |
| NFData1 Identity | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Hashable1 Identity | |
Defined in Data.Hashable.Class | |
| MonadBaseControl Identity Identity | |
Defined in Control.Monad.Trans.Control Associated Types type StM Identity a | |
| Unbox a => Vector Vector (Identity a) | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Identity a) -> m (Vector (Identity a)) basicUnsafeThaw :: PrimMonad m => Vector (Identity a) -> m (Mutable Vector (PrimState m) (Identity a)) basicLength :: Vector (Identity a) -> Int basicUnsafeSlice :: Int -> Int -> Vector (Identity a) -> Vector (Identity a) basicUnsafeIndexM :: Monad m => Vector (Identity a) -> Int -> m (Identity a) basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Identity a) -> Vector (Identity a) -> m () | |
| Unbox a => MVector MVector (Identity a) | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s (Identity a) -> Int basicUnsafeSlice :: Int -> Int -> MVector s (Identity a) -> MVector s (Identity a) basicOverlaps :: MVector s (Identity a) -> MVector s (Identity a) -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Identity a)) basicInitialize :: PrimMonad m => MVector (PrimState m) (Identity a) -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Identity a -> m (MVector (PrimState m) (Identity a)) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Identity a) -> Int -> m (Identity a) basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Identity a) -> Int -> Identity a -> m () basicClear :: PrimMonad m => MVector (PrimState m) (Identity a) -> m () basicSet :: PrimMonad m => MVector (PrimState m) (Identity a) -> Identity a -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Identity a) -> MVector (PrimState m) (Identity a) -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Identity a) -> MVector (PrimState m) (Identity a) -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Identity a) -> Int -> m (MVector (PrimState m) (Identity a)) | |
| Bounded a => Bounded (Identity a) | Since: base-4.9.0.0 |
| Enum a => Enum (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods succ :: Identity a -> Identity a # pred :: Identity a -> Identity a # fromEnum :: Identity a -> Int # enumFrom :: Identity a -> [Identity a] # enumFromThen :: Identity a -> Identity a -> [Identity a] # enumFromTo :: Identity a -> Identity a -> [Identity a] # enumFromThenTo :: Identity a -> Identity a -> Identity a -> [Identity a] # | |
| Eq a => Eq (Identity a) | Since: base-4.8.0.0 |
| Floating a => Floating (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods exp :: Identity a -> Identity a # log :: Identity a -> Identity a # sqrt :: Identity a -> Identity a # (**) :: Identity a -> Identity a -> Identity a # logBase :: Identity a -> Identity a -> Identity a # sin :: Identity a -> Identity a # cos :: Identity a -> Identity a # tan :: Identity a -> Identity a # asin :: Identity a -> Identity a # acos :: Identity a -> Identity a # atan :: Identity a -> Identity a # sinh :: Identity a -> Identity a # cosh :: Identity a -> Identity a # tanh :: Identity a -> Identity a # asinh :: Identity a -> Identity a # acosh :: Identity a -> Identity a # atanh :: Identity a -> Identity a # log1p :: Identity a -> Identity a # expm1 :: Identity a -> Identity a # | |
| Fractional a => Fractional (Identity a) | Since: base-4.9.0.0 |
| Integral a => Integral (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods quot :: Identity a -> Identity a -> Identity a # rem :: Identity a -> Identity a -> Identity a # div :: Identity a -> Identity a -> Identity a # mod :: Identity a -> Identity a -> Identity a # quotRem :: Identity a -> Identity a -> (Identity a, Identity a) # divMod :: Identity a -> Identity a -> (Identity a, Identity a) # | |
| Num a => Num (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity | |
| Ord a => Ord (Identity a) | Since: base-4.8.0.0 |
Defined in Data.Functor.Identity | |
| Read a => Read (Identity a) | This instance would be equivalent to the derived instances of the
Since: base-4.8.0.0 |
| Real a => Real (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods toRational :: Identity a -> Rational # | |
| RealFloat a => RealFloat (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods floatRadix :: Identity a -> Integer # floatDigits :: Identity a -> Int # floatRange :: Identity a -> (Int, Int) # decodeFloat :: Identity a -> (Integer, Int) # encodeFloat :: Integer -> Int -> Identity a # exponent :: Identity a -> Int # significand :: Identity a -> Identity a # scaleFloat :: Int -> Identity a -> Identity a # isInfinite :: Identity a -> Bool # isDenormalized :: Identity a -> Bool # isNegativeZero :: Identity a -> Bool # | |
| RealFrac a => RealFrac (Identity a) | Since: base-4.9.0.0 |
| Show a => Show (Identity a) | This instance would be equivalent to the derived instances of the
Since: base-4.8.0.0 |
| Ix a => Ix (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods range :: (Identity a, Identity a) -> [Identity a] # index :: (Identity a, Identity a) -> Identity a -> Int # unsafeIndex :: (Identity a, Identity a) -> Identity a -> Int # inRange :: (Identity a, Identity a) -> Identity a -> Bool # rangeSize :: (Identity a, Identity a) -> Int # unsafeRangeSize :: (Identity a, Identity a) -> Int # | |
| IsString a => IsString (Identity a) | Since: base-4.9.0.0 |
Defined in Data.String Methods fromString :: String -> Identity a # | |
| Generic (Identity a) | Since: base-4.8.0.0 |
| Semigroup a => Semigroup (Identity a) | Since: base-4.9.0.0 |
| Monoid a => Monoid (Identity a) | Since: base-4.9.0.0 |
| Storable a => Storable (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods alignment :: Identity a -> Int # peekElemOff :: Ptr (Identity a) -> Int -> IO (Identity a) # pokeElemOff :: Ptr (Identity a) -> Int -> Identity a -> IO () # peekByteOff :: Ptr b -> Int -> IO (Identity a) # pokeByteOff :: Ptr b -> Int -> Identity a -> IO () # | |
| Bits a => Bits (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods (.&.) :: Identity a -> Identity a -> Identity a # (.|.) :: Identity a -> Identity a -> Identity a # xor :: Identity a -> Identity a -> Identity a # complement :: Identity a -> Identity a # shift :: Identity a -> Int -> Identity a # rotate :: Identity a -> Int -> Identity a # setBit :: Identity a -> Int -> Identity a # clearBit :: Identity a -> Int -> Identity a # complementBit :: Identity a -> Int -> Identity a # testBit :: Identity a -> Int -> Bool # bitSizeMaybe :: Identity a -> Maybe Int # bitSize :: Identity a -> Int # isSigned :: Identity a -> Bool # shiftL :: Identity a -> Int -> Identity a # unsafeShiftL :: Identity a -> Int -> Identity a # shiftR :: Identity a -> Int -> Identity a # unsafeShiftR :: Identity a -> Int -> Identity a # rotateL :: Identity a -> Int -> Identity a # | |
| FiniteBits a => FiniteBits (Identity a) | Since: base-4.9.0.0 |
Defined in Data.Functor.Identity Methods finiteBitSize :: Identity a -> Int # countLeadingZeros :: Identity a -> Int # countTrailingZeros :: Identity a -> Int # | |
| NFData a => NFData (Identity a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Hashable a => Hashable (Identity a) | |
Defined in Data.Hashable.Class | |
| Unbox a => Unbox (Identity a) | |
Defined in Data.Vector.Unboxed.Base | |
| Generic1 Identity | Since: base-4.8.0.0 |
| type StM Identity a | |
Defined in Control.Monad.Trans.Control type StM Identity a = a | |
| newtype MVector s (Identity a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep (Identity a) | |
Defined in Data.Functor.Identity | |
| newtype Vector (Identity a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 Identity | |
Defined in Data.Functor.Identity | |
withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r #
opens a file using withFile name mode actopenFile and passes
the resulting handle to the computation act. The handle will be
closed on exit from withFile, whether by normal termination or by
raising an exception. If closing the handle raises an exception, then
this exception will be raised by withFile rather than any exception
raised by act.
withFrozenCallStack :: HasCallStack => (HasCallStack => a) -> a #
Perform some computation without adding new entries to the CallStack.
Since: base-4.9.0.0
callStack :: HasCallStack => CallStack #
throwSTM :: Exception e => e -> STM a #
A variant of throw that can only be used within the STM monad.
Throwing an exception in STM aborts the transaction and propagates the
exception. If the exception is caught via catchSTM, only the changes
enclosed by the catch are rolled back; changes made outside of catchSTM
persist.
If the exception is not caught inside of the STM, it is re-thrown by
atomically, and the entire STM is rolled back.
Although throwSTM has a type that is an instance of the type of throw, the
two functions are subtly different:
throw e `seq` x ===> throw e throwSTM e `seq` x ===> x
The first example will cause the exception e to be raised,
whereas the second one won't. In fact, throwSTM will only cause
an exception to be raised when it is used within the STM monad.
The throwSTM variant should be used in preference to throw to
raise an exception within the STM monad because it guarantees
ordering with respect to other STM operations, whereas throw
does not.
A monad supporting atomic memory transactions.
Instances
| Monad STM | Since: base-4.3.0.0 |
| Functor STM | Since: base-4.3.0.0 |
| Applicative STM | Since: base-4.8.0.0 |
| Alternative STM | Since: base-4.8.0.0 |
| MonadPlus STM | Since: base-4.3.0.0 |
| MonadThrow STM | |
Defined in Control.Monad.Catch | |
| MonadCatch STM | |
| MonadBaseControl STM STM | |
Defined in Control.Monad.Trans.Control Associated Types type StM STM a | |
| type StM STM a | |
Defined in Control.Monad.Trans.Control type StM STM a = a | |
Shared memory locations that support atomic memory transactions.
A mutable variable in the IO monad
Instances
| NFData1 IORef | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Eq (IORef a) | Pointer equality. Since: base-4.0.0.0 |
| NFData (IORef a) | NOTE: Only strict in the reference and not the referenced value. Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
File and directory names are values of type String, whose precise
meaning is operating system dependent. Files can be opened, yielding a
handle which can then be used to operate on the contents of that file.
prettyCallStack :: CallStack -> String #
Pretty print a CallStack.
Since: base-4.9.0.0
prettySrcLoc :: SrcLoc -> String #
Pretty print a SrcLoc.
Since: base-4.9.0.0
class (Typeable e, Show e) => Exception e where #
Any type that you wish to throw or catch as an exception must be an
instance of the Exception class. The simplest case is a new exception
type directly below the root:
data MyException = ThisException | ThatException
deriving Show
instance Exception MyExceptionThe default method definitions in the Exception class do what we need
in this case. You can now throw and catch ThisException and
ThatException as exceptions:
*Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException))
Caught ThisException
In more complicated examples, you may wish to define a whole hierarchy of exceptions:
---------------------------------------------------------------------
-- Make the root exception type for all the exceptions in a compiler
data SomeCompilerException = forall e . Exception e => SomeCompilerException e
instance Show SomeCompilerException where
show (SomeCompilerException e) = show e
instance Exception SomeCompilerException
compilerExceptionToException :: Exception e => e -> SomeException
compilerExceptionToException = toException . SomeCompilerException
compilerExceptionFromException :: Exception e => SomeException -> Maybe e
compilerExceptionFromException x = do
SomeCompilerException a <- fromException x
cast a
---------------------------------------------------------------------
-- Make a subhierarchy for exceptions in the frontend of the compiler
data SomeFrontendException = forall e . Exception e => SomeFrontendException e
instance Show SomeFrontendException where
show (SomeFrontendException e) = show e
instance Exception SomeFrontendException where
toException = compilerExceptionToException
fromException = compilerExceptionFromException
frontendExceptionToException :: Exception e => e -> SomeException
frontendExceptionToException = toException . SomeFrontendException
frontendExceptionFromException :: Exception e => SomeException -> Maybe e
frontendExceptionFromException x = do
SomeFrontendException a <- fromException x
cast a
---------------------------------------------------------------------
-- Make an exception type for a particular frontend compiler exception
data MismatchedParentheses = MismatchedParentheses
deriving Show
instance Exception MismatchedParentheses where
toException = frontendExceptionToException
fromException = frontendExceptionFromExceptionWe can now catch a MismatchedParentheses exception as
MismatchedParentheses, SomeFrontendException or
SomeCompilerException, but not other types, e.g. IOException:
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException))
*** Exception: MismatchedParentheses
Minimal complete definition
Nothing
Methods
toException :: e -> SomeException #
fromException :: SomeException -> Maybe e #
displayException :: e -> String #
Render this exception value in a human-friendly manner.
Default implementation: .show
Since: base-4.8.0.0
Instances
The Const functor.
Instances
| Generic1 (Const a :: k -> Type) | Since: base-4.9.0.0 |
| Unbox a => Vector Vector (Const a b) | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Const a b) -> m (Vector (Const a b)) basicUnsafeThaw :: PrimMonad m => Vector (Const a b) -> m (Mutable Vector (PrimState m) (Const a b)) basicLength :: Vector (Const a b) -> Int basicUnsafeSlice :: Int -> Int -> Vector (Const a b) -> Vector (Const a b) basicUnsafeIndexM :: Monad m => Vector (Const a b) -> Int -> m (Const a b) basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Const a b) -> Vector (Const a b) -> m () | |
| Unbox a => MVector MVector (Const a b) | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s (Const a b) -> Int basicUnsafeSlice :: Int -> Int -> MVector s (Const a b) -> MVector s (Const a b) basicOverlaps :: MVector s (Const a b) -> MVector s (Const a b) -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Const a b)) basicInitialize :: PrimMonad m => MVector (PrimState m) (Const a b) -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Const a b -> m (MVector (PrimState m) (Const a b)) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Const a b) -> Int -> m (Const a b) basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Const a b) -> Int -> Const a b -> m () basicClear :: PrimMonad m => MVector (PrimState m) (Const a b) -> m () basicSet :: PrimMonad m => MVector (PrimState m) (Const a b) -> Const a b -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Const a b) -> MVector (PrimState m) (Const a b) -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Const a b) -> MVector (PrimState m) (Const a b) -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Const a b) -> Int -> m (MVector (PrimState m) (Const a b)) | |
| Bitraversable (Const :: Type -> Type -> Type) | Since: base-4.10.0.0 |
Defined in Data.Bitraversable Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> Const a b -> f (Const c d) # | |
| Bifoldable (Const :: Type -> Type -> Type) | Since: base-4.10.0.0 |
| Bifunctor (Const :: Type -> Type -> Type) | Since: base-4.8.0.0 |
| NFData2 (Const :: Type -> Type -> Type) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Hashable2 (Const :: Type -> Type -> Type) | |
Defined in Data.Hashable.Class | |
| Functor (Const m :: Type -> Type) | Since: base-2.1 |
| Monoid m => Applicative (Const m :: Type -> Type) | Since: base-2.0.1 |
| Foldable (Const m :: Type -> Type) | Since: base-4.7.0.0 |
Defined in Data.Functor.Const Methods fold :: Monoid m0 => Const m m0 -> m0 # foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 # foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 # foldr :: (a -> b -> b) -> b -> Const m a -> b # foldr' :: (a -> b -> b) -> b -> Const m a -> b # foldl :: (b -> a -> b) -> b -> Const m a -> b # foldl' :: (b -> a -> b) -> b -> Const m a -> b # foldr1 :: (a -> a -> a) -> Const m a -> a # foldl1 :: (a -> a -> a) -> Const m a -> a # elem :: Eq a => a -> Const m a -> Bool # maximum :: Ord a => Const m a -> a # minimum :: Ord a => Const m a -> a # | |
| Traversable (Const m :: Type -> Type) | Since: base-4.7.0.0 |
| Contravariant (Const a :: Type -> Type) | |
| NFData a => NFData1 (Const a :: Type -> Type) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Hashable a => Hashable1 (Const a :: Type -> Type) | |
Defined in Data.Hashable.Class | |
| Bounded a => Bounded (Const a b) | Since: base-4.9.0.0 |
| Enum a => Enum (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods succ :: Const a b -> Const a b # pred :: Const a b -> Const a b # fromEnum :: Const a b -> Int # enumFrom :: Const a b -> [Const a b] # enumFromThen :: Const a b -> Const a b -> [Const a b] # enumFromTo :: Const a b -> Const a b -> [Const a b] # enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] # | |
| Eq a => Eq (Const a b) | Since: base-4.9.0.0 |
| Floating a => Floating (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods exp :: Const a b -> Const a b # log :: Const a b -> Const a b # sqrt :: Const a b -> Const a b # (**) :: Const a b -> Const a b -> Const a b # logBase :: Const a b -> Const a b -> Const a b # sin :: Const a b -> Const a b # cos :: Const a b -> Const a b # tan :: Const a b -> Const a b # asin :: Const a b -> Const a b # acos :: Const a b -> Const a b # atan :: Const a b -> Const a b # sinh :: Const a b -> Const a b # cosh :: Const a b -> Const a b # tanh :: Const a b -> Const a b # asinh :: Const a b -> Const a b # acosh :: Const a b -> Const a b # atanh :: Const a b -> Const a b # log1p :: Const a b -> Const a b # expm1 :: Const a b -> Const a b # | |
| Fractional a => Fractional (Const a b) | Since: base-4.9.0.0 |
| Integral a => Integral (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods quot :: Const a b -> Const a b -> Const a b # rem :: Const a b -> Const a b -> Const a b # div :: Const a b -> Const a b -> Const a b # mod :: Const a b -> Const a b -> Const a b # quotRem :: Const a b -> Const a b -> (Const a b, Const a b) # divMod :: Const a b -> Const a b -> (Const a b, Const a b) # | |
| Num a => Num (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const | |
| Ord a => Ord (Const a b) | Since: base-4.9.0.0 |
| Read a => Read (Const a b) | This instance would be equivalent to the derived instances of the
Since: base-4.8.0.0 |
| Real a => Real (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods toRational :: Const a b -> Rational # | |
| RealFloat a => RealFloat (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods floatRadix :: Const a b -> Integer # floatDigits :: Const a b -> Int # floatRange :: Const a b -> (Int, Int) # decodeFloat :: Const a b -> (Integer, Int) # encodeFloat :: Integer -> Int -> Const a b # exponent :: Const a b -> Int # significand :: Const a b -> Const a b # scaleFloat :: Int -> Const a b -> Const a b # isInfinite :: Const a b -> Bool # isDenormalized :: Const a b -> Bool # isNegativeZero :: Const a b -> Bool # | |
| RealFrac a => RealFrac (Const a b) | Since: base-4.9.0.0 |
| Show a => Show (Const a b) | This instance would be equivalent to the derived instances of the
Since: base-4.8.0.0 |
| Ix a => Ix (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods range :: (Const a b, Const a b) -> [Const a b] # index :: (Const a b, Const a b) -> Const a b -> Int # unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int # inRange :: (Const a b, Const a b) -> Const a b -> Bool # rangeSize :: (Const a b, Const a b) -> Int # unsafeRangeSize :: (Const a b, Const a b) -> Int # | |
| IsString a => IsString (Const a b) | Since: base-4.9.0.0 |
Defined in Data.String Methods fromString :: String -> Const a b # | |
| Generic (Const a b) | Since: base-4.9.0.0 |
| Semigroup a => Semigroup (Const a b) | Since: base-4.9.0.0 |
| Monoid a => Monoid (Const a b) | Since: base-4.9.0.0 |
| Storable a => Storable (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const | |
| Bits a => Bits (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods (.&.) :: Const a b -> Const a b -> Const a b # (.|.) :: Const a b -> Const a b -> Const a b # xor :: Const a b -> Const a b -> Const a b # complement :: Const a b -> Const a b # shift :: Const a b -> Int -> Const a b # rotate :: Const a b -> Int -> Const a b # setBit :: Const a b -> Int -> Const a b # clearBit :: Const a b -> Int -> Const a b # complementBit :: Const a b -> Int -> Const a b # testBit :: Const a b -> Int -> Bool # bitSizeMaybe :: Const a b -> Maybe Int # isSigned :: Const a b -> Bool # shiftL :: Const a b -> Int -> Const a b # unsafeShiftL :: Const a b -> Int -> Const a b # shiftR :: Const a b -> Int -> Const a b # unsafeShiftR :: Const a b -> Int -> Const a b # rotateL :: Const a b -> Int -> Const a b # | |
| FiniteBits a => FiniteBits (Const a b) | Since: base-4.9.0.0 |
Defined in Data.Functor.Const Methods finiteBitSize :: Const a b -> Int # countLeadingZeros :: Const a b -> Int # countTrailingZeros :: Const a b -> Int # | |
| NFData a => NFData (Const a b) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Hashable a => Hashable (Const a b) | |
Defined in Data.Hashable.Class | |
| Unbox a => Unbox (Const a b) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 (Const a :: k -> Type) | |
Defined in Data.Functor.Const | |
| newtype MVector s (Const a b) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep (Const a b) | |
Defined in Data.Functor.Const | |
| newtype Vector (Const a b) | |
Defined in Data.Vector.Unboxed.Base | |
all :: Foldable t => (a -> Bool) -> t a -> Bool #
Determines whether all elements of the structure satisfy the predicate.
any :: Foldable t => (a -> Bool) -> t a -> Bool #
Determines whether any element of the structure satisfies the predicate.
concatMap :: Foldable t => (a -> [b]) -> t a -> [b] #
Map a function over all the elements of a container and concatenate the resulting lists.
concat :: Foldable t => t [a] -> [a] #
The concatenation of all the elements of a container of lists.
asum :: (Foldable t, Alternative f) => t (f a) -> f a #
The sum of a collection of actions, generalizing concat.
>>>asum [Just "Hello", Nothing, Just "World"]Just "Hello"
sequence_ :: (Foldable t, Monad m) => t (m a) -> m () #
Evaluate each monadic action in the structure from left to right,
and ignore the results. For a version that doesn't ignore the
results see sequence.
As of base 4.8.0.0, sequence_ is just sequenceA_, specialized
to Monad.
sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f () #
Evaluate each action in the structure from left to right, and
ignore the results. For a version that doesn't ignore the results
see sequenceA.
for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f () #
traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f () #
Map each element of a structure to an action, evaluate these
actions from left to right, and ignore the results. For a version
that doesn't ignore the results see traverse.
foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b #
Monadic fold over the elements of a structure, associating to the left, i.e. from left to right.
Maybe monoid returning the leftmost non-Nothing value.
is isomorphic to First a, but precedes it
historically.Alt Maybe a
>>>getFirst (First (Just "hello") <> First Nothing <> First (Just "world"))Just "hello"
Use of this type is discouraged. Note the following equivalence:
Data.Monoid.First x === Maybe (Data.Semigroup.First x)
In addition to being equivalent in the structural sense, the two
also have Monoid instances that behave the same. This type will
be marked deprecated in GHC 8.8, and removed in GHC 8.10.
Users are advised to use the variant from Data.Semigroup and wrap
it in Maybe.
Instances
| Monad First | Since: base-4.8.0.0 |
| Functor First | Since: base-4.8.0.0 |
| Applicative First | Since: base-4.8.0.0 |
| Foldable First | Since: base-4.8.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => First m -> m # foldMap :: Monoid m => (a -> m) -> First a -> m # foldMap' :: Monoid m => (a -> m) -> First a -> m # foldr :: (a -> b -> b) -> b -> First a -> b # foldr' :: (a -> b -> b) -> b -> First a -> b # foldl :: (b -> a -> b) -> b -> First a -> b # foldl' :: (b -> a -> b) -> b -> First a -> b # foldr1 :: (a -> a -> a) -> First a -> a # foldl1 :: (a -> a -> a) -> First a -> a # elem :: Eq a => a -> First a -> Bool # maximum :: Ord a => First a -> a # minimum :: Ord a => First a -> a # | |
| Traversable First | Since: base-4.8.0.0 |
| NFData1 First | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Eq a => Eq (First a) | Since: base-2.1 |
| Ord a => Ord (First a) | Since: base-2.1 |
| Read a => Read (First a) | Since: base-2.1 |
| Show a => Show (First a) | Since: base-2.1 |
| Generic (First a) | Since: base-4.7.0.0 |
| Semigroup (First a) | Since: base-4.9.0.0 |
| Monoid (First a) | Since: base-2.1 |
| NFData a => NFData (First a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Generic1 First | Since: base-4.7.0.0 |
| type Rep (First a) | |
Defined in Data.Monoid | |
| type Rep1 First | |
Defined in Data.Monoid | |
Maybe monoid returning the rightmost non-Nothing value.
is isomorphic to Last a, and thus to
Dual (First a)Dual (Alt Maybe a)
>>>getLast (Last (Just "hello") <> Last Nothing <> Last (Just "world"))Just "world"
Use of this type is discouraged. Note the following equivalence:
Data.Monoid.Last x === Maybe (Data.Semigroup.Last x)
In addition to being equivalent in the structural sense, the two
also have Monoid instances that behave the same. This type will
be marked deprecated in GHC 8.8, and removed in GHC 8.10.
Users are advised to use the variant from Data.Semigroup and wrap
it in Maybe.
Instances
| Monad Last | Since: base-4.8.0.0 |
| Functor Last | Since: base-4.8.0.0 |
| Applicative Last | Since: base-4.8.0.0 |
| Foldable Last | Since: base-4.8.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Last m -> m # foldMap :: Monoid m => (a -> m) -> Last a -> m # foldMap' :: Monoid m => (a -> m) -> Last a -> m # foldr :: (a -> b -> b) -> b -> Last a -> b # foldr' :: (a -> b -> b) -> b -> Last a -> b # foldl :: (b -> a -> b) -> b -> Last a -> b # foldl' :: (b -> a -> b) -> b -> Last a -> b # foldr1 :: (a -> a -> a) -> Last a -> a # foldl1 :: (a -> a -> a) -> Last a -> a # elem :: Eq a => a -> Last a -> Bool # maximum :: Ord a => Last a -> a # | |
| Traversable Last | Since: base-4.8.0.0 |
| NFData1 Last | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Eq a => Eq (Last a) | Since: base-2.1 |
| Ord a => Ord (Last a) | Since: base-2.1 |
| Read a => Read (Last a) | Since: base-2.1 |
| Show a => Show (Last a) | Since: base-2.1 |
| Generic (Last a) | Since: base-4.7.0.0 |
| Semigroup (Last a) | Since: base-4.9.0.0 |
| Monoid (Last a) | Since: base-2.1 |
| NFData a => NFData (Last a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Generic1 Last | Since: base-4.7.0.0 |
| type Rep (Last a) | |
Defined in Data.Monoid | |
| type Rep1 Last | |
Defined in Data.Monoid | |
newtype Ap (f :: k -> Type) (a :: k) #
This data type witnesses the lifting of a Monoid into an
Applicative pointwise.
Since: base-4.12.0.0
Instances
| Generic1 (Ap f :: k -> Type) | Since: base-4.12.0.0 |
| Monad f => Monad (Ap f) | Since: base-4.12.0.0 |
| Functor f => Functor (Ap f) | Since: base-4.12.0.0 |
| MonadFail f => MonadFail (Ap f) | Since: base-4.12.0.0 |
Defined in Data.Monoid | |
| Applicative f => Applicative (Ap f) | Since: base-4.12.0.0 |
| Foldable f => Foldable (Ap f) | Since: base-4.12.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Ap f m -> m # foldMap :: Monoid m => (a -> m) -> Ap f a -> m # foldMap' :: Monoid m => (a -> m) -> Ap f a -> m # foldr :: (a -> b -> b) -> b -> Ap f a -> b # foldr' :: (a -> b -> b) -> b -> Ap f a -> b # foldl :: (b -> a -> b) -> b -> Ap f a -> b # foldl' :: (b -> a -> b) -> b -> Ap f a -> b # foldr1 :: (a -> a -> a) -> Ap f a -> a # foldl1 :: (a -> a -> a) -> Ap f a -> a # elem :: Eq a => a -> Ap f a -> Bool # maximum :: Ord a => Ap f a -> a # | |
| Traversable f => Traversable (Ap f) | Since: base-4.12.0.0 |
| Alternative f => Alternative (Ap f) | Since: base-4.12.0.0 |
| MonadPlus f => MonadPlus (Ap f) | Since: base-4.12.0.0 |
| (Applicative f, Bounded a) => Bounded (Ap f a) | Since: base-4.12.0.0 |
| Enum (f a) => Enum (Ap f a) | Since: base-4.12.0.0 |
Defined in Data.Monoid | |
| Eq (f a) => Eq (Ap f a) | Since: base-4.12.0.0 |
| (Applicative f, Num a) => Num (Ap f a) | Since: base-4.12.0.0 |
| Ord (f a) => Ord (Ap f a) | Since: base-4.12.0.0 |
| Read (f a) => Read (Ap f a) | Since: base-4.12.0.0 |
| Show (f a) => Show (Ap f a) | Since: base-4.12.0.0 |
| Generic (Ap f a) | Since: base-4.12.0.0 |
| (Applicative f, Semigroup a) => Semigroup (Ap f a) | Since: base-4.12.0.0 |
| (Applicative f, Monoid a) => Monoid (Ap f a) | Since: base-4.12.0.0 |
| type Rep1 (Ap f :: k -> Type) | |
Defined in Data.Monoid | |
| type Rep (Ap f a) | |
Defined in Data.Monoid | |
stimesMonoid :: (Integral b, Monoid a) => b -> a -> a #
stimesIdempotent :: Integral b => b -> a -> a #
The dual of a Monoid, obtained by swapping the arguments of mappend.
>>>getDual (mappend (Dual "Hello") (Dual "World"))"WorldHello"
Instances
| Monad Dual | Since: base-4.8.0.0 |
| Functor Dual | Since: base-4.8.0.0 |
| Applicative Dual | Since: base-4.8.0.0 |
| Foldable Dual | Since: base-4.8.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Dual m -> m # foldMap :: Monoid m => (a -> m) -> Dual a -> m # foldMap' :: Monoid m => (a -> m) -> Dual a -> m # foldr :: (a -> b -> b) -> b -> Dual a -> b # foldr' :: (a -> b -> b) -> b -> Dual a -> b # foldl :: (b -> a -> b) -> b -> Dual a -> b # foldl' :: (b -> a -> b) -> b -> Dual a -> b # foldr1 :: (a -> a -> a) -> Dual a -> a # foldl1 :: (a -> a -> a) -> Dual a -> a # elem :: Eq a => a -> Dual a -> Bool # maximum :: Ord a => Dual a -> a # | |
| Traversable Dual | Since: base-4.8.0.0 |
| NFData1 Dual | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Unbox a => Vector Vector (Dual a) | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Dual a) -> m (Vector (Dual a)) basicUnsafeThaw :: PrimMonad m => Vector (Dual a) -> m (Mutable Vector (PrimState m) (Dual a)) basicLength :: Vector (Dual a) -> Int basicUnsafeSlice :: Int -> Int -> Vector (Dual a) -> Vector (Dual a) basicUnsafeIndexM :: Monad m => Vector (Dual a) -> Int -> m (Dual a) basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Dual a) -> Vector (Dual a) -> m () | |
| Unbox a => MVector MVector (Dual a) | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s (Dual a) -> Int basicUnsafeSlice :: Int -> Int -> MVector s (Dual a) -> MVector s (Dual a) basicOverlaps :: MVector s (Dual a) -> MVector s (Dual a) -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Dual a)) basicInitialize :: PrimMonad m => MVector (PrimState m) (Dual a) -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Dual a -> m (MVector (PrimState m) (Dual a)) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Dual a) -> Int -> m (Dual a) basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Dual a) -> Int -> Dual a -> m () basicClear :: PrimMonad m => MVector (PrimState m) (Dual a) -> m () basicSet :: PrimMonad m => MVector (PrimState m) (Dual a) -> Dual a -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Dual a) -> MVector (PrimState m) (Dual a) -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Dual a) -> MVector (PrimState m) (Dual a) -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Dual a) -> Int -> m (MVector (PrimState m) (Dual a)) | |
| Bounded a => Bounded (Dual a) | Since: base-2.1 |
| Eq a => Eq (Dual a) | Since: base-2.1 |
| Ord a => Ord (Dual a) | Since: base-2.1 |
| Read a => Read (Dual a) | Since: base-2.1 |
| Show a => Show (Dual a) | Since: base-2.1 |
| Generic (Dual a) | Since: base-4.7.0.0 |
| Semigroup a => Semigroup (Dual a) | Since: base-4.9.0.0 |
| Monoid a => Monoid (Dual a) | Since: base-2.1 |
| NFData a => NFData (Dual a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Unbox a => Unbox (Dual a) | |
Defined in Data.Vector.Unboxed.Base | |
| Generic1 Dual | Since: base-4.7.0.0 |
| newtype MVector s (Dual a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep (Dual a) | |
Defined in Data.Semigroup.Internal | |
| newtype Vector (Dual a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 Dual | |
Defined in Data.Semigroup.Internal | |
The monoid of endomorphisms under composition.
>>>let computation = Endo ("Hello, " ++) <> Endo (++ "!")>>>appEndo computation "Haskell""Hello, Haskell!"
Boolean monoid under conjunction (&&).
>>>getAll (All True <> mempty <> All False)False
>>>getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8]))False
Instances
| Bounded All | Since: base-2.1 |
| Eq All | Since: base-2.1 |
| Ord All | Since: base-2.1 |
| Read All | Since: base-2.1 |
| Show All | Since: base-2.1 |
| Generic All | Since: base-4.7.0.0 |
| Semigroup All | Since: base-4.9.0.0 |
| Monoid All | Since: base-2.1 |
| NFData All | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Unbox All | |
Defined in Data.Vector.Unboxed.Base | |
| Vector Vector All | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) All -> m (Vector All) basicUnsafeThaw :: PrimMonad m => Vector All -> m (Mutable Vector (PrimState m) All) basicLength :: Vector All -> Int basicUnsafeSlice :: Int -> Int -> Vector All -> Vector All basicUnsafeIndexM :: Monad m => Vector All -> Int -> m All basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) All -> Vector All -> m () | |
| MVector MVector All | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s All -> Int basicUnsafeSlice :: Int -> Int -> MVector s All -> MVector s All basicOverlaps :: MVector s All -> MVector s All -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) All) basicInitialize :: PrimMonad m => MVector (PrimState m) All -> m () basicUnsafeReplicate :: PrimMonad m => Int -> All -> m (MVector (PrimState m) All) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) All -> Int -> m All basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) All -> Int -> All -> m () basicClear :: PrimMonad m => MVector (PrimState m) All -> m () basicSet :: PrimMonad m => MVector (PrimState m) All -> All -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) All -> MVector (PrimState m) All -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) All -> MVector (PrimState m) All -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) All -> Int -> m (MVector (PrimState m) All) | |
| type Rep All | |
Defined in Data.Semigroup.Internal | |
| newtype Vector All | |
Defined in Data.Vector.Unboxed.Base | |
| type MEmpty | |
Defined in Fcf.Class.Monoid | |
| newtype MVector s All | |
Defined in Data.Vector.Unboxed.Base | |
| type ('All a :: All) <> ('All b :: All) | |
Boolean monoid under disjunction (||).
>>>getAny (Any True <> mempty <> Any False)True
>>>getAny (mconcat (map (\x -> Any (even x)) [2,4,6,7,8]))True
Instances
| Bounded Any | Since: base-2.1 |
| Eq Any | Since: base-2.1 |
| Ord Any | Since: base-2.1 |
| Read Any | Since: base-2.1 |
| Show Any | Since: base-2.1 |
| Generic Any | Since: base-4.7.0.0 |
| Semigroup Any | Since: base-4.9.0.0 |
| Monoid Any | Since: base-2.1 |
| NFData Any | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Unbox Any | |
Defined in Data.Vector.Unboxed.Base | |
| Vector Vector Any | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Any -> m (Vector Any) basicUnsafeThaw :: PrimMonad m => Vector Any -> m (Mutable Vector (PrimState m) Any) basicLength :: Vector Any -> Int basicUnsafeSlice :: Int -> Int -> Vector Any -> Vector Any basicUnsafeIndexM :: Monad m => Vector Any -> Int -> m Any basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Any -> Vector Any -> m () | |
| MVector MVector Any | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Any -> Int basicUnsafeSlice :: Int -> Int -> MVector s Any -> MVector s Any basicOverlaps :: MVector s Any -> MVector s Any -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Any) basicInitialize :: PrimMonad m => MVector (PrimState m) Any -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Any -> m (MVector (PrimState m) Any) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Any -> Int -> m Any basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Any -> Int -> Any -> m () basicClear :: PrimMonad m => MVector (PrimState m) Any -> m () basicSet :: PrimMonad m => MVector (PrimState m) Any -> Any -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Any -> MVector (PrimState m) Any -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Any -> MVector (PrimState m) Any -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Any -> Int -> m (MVector (PrimState m) Any) | |
| type Rep Any | |
Defined in Data.Semigroup.Internal | |
| newtype Vector Any | |
Defined in Data.Vector.Unboxed.Base | |
| type MEmpty | |
Defined in Fcf.Class.Monoid | |
| newtype MVector s Any | |
Defined in Data.Vector.Unboxed.Base | |
| type ('Any a :: Any) <> ('Any b :: Any) | |
Monoid under addition.
>>>getSum (Sum 1 <> Sum 2 <> mempty)3
Instances
| Monad Sum | Since: base-4.8.0.0 |
| Functor Sum | Since: base-4.8.0.0 |
| Applicative Sum | Since: base-4.8.0.0 |
| Foldable Sum | Since: base-4.8.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Sum m -> m # foldMap :: Monoid m => (a -> m) -> Sum a -> m # foldMap' :: Monoid m => (a -> m) -> Sum a -> m # foldr :: (a -> b -> b) -> b -> Sum a -> b # foldr' :: (a -> b -> b) -> b -> Sum a -> b # foldl :: (b -> a -> b) -> b -> Sum a -> b # foldl' :: (b -> a -> b) -> b -> Sum a -> b # foldr1 :: (a -> a -> a) -> Sum a -> a # foldl1 :: (a -> a -> a) -> Sum a -> a # elem :: Eq a => a -> Sum a -> Bool # maximum :: Ord a => Sum a -> a # | |
| Traversable Sum | Since: base-4.8.0.0 |
| NFData1 Sum | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Unbox a => Vector Vector (Sum a) | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Sum a) -> m (Vector (Sum a)) basicUnsafeThaw :: PrimMonad m => Vector (Sum a) -> m (Mutable Vector (PrimState m) (Sum a)) basicLength :: Vector (Sum a) -> Int basicUnsafeSlice :: Int -> Int -> Vector (Sum a) -> Vector (Sum a) basicUnsafeIndexM :: Monad m => Vector (Sum a) -> Int -> m (Sum a) basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Sum a) -> Vector (Sum a) -> m () | |
| Unbox a => MVector MVector (Sum a) | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s (Sum a) -> Int basicUnsafeSlice :: Int -> Int -> MVector s (Sum a) -> MVector s (Sum a) basicOverlaps :: MVector s (Sum a) -> MVector s (Sum a) -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Sum a)) basicInitialize :: PrimMonad m => MVector (PrimState m) (Sum a) -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Sum a -> m (MVector (PrimState m) (Sum a)) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Sum a) -> Int -> m (Sum a) basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Sum a) -> Int -> Sum a -> m () basicClear :: PrimMonad m => MVector (PrimState m) (Sum a) -> m () basicSet :: PrimMonad m => MVector (PrimState m) (Sum a) -> Sum a -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Sum a) -> MVector (PrimState m) (Sum a) -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Sum a) -> MVector (PrimState m) (Sum a) -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Sum a) -> Int -> m (MVector (PrimState m) (Sum a)) | |
| Bounded a => Bounded (Sum a) | Since: base-2.1 |
| Eq a => Eq (Sum a) | Since: base-2.1 |
| Num a => Num (Sum a) | Since: base-4.7.0.0 |
| Ord a => Ord (Sum a) | Since: base-2.1 |
| Read a => Read (Sum a) | Since: base-2.1 |
| Show a => Show (Sum a) | Since: base-2.1 |
| Generic (Sum a) | Since: base-4.7.0.0 |
| Num a => Semigroup (Sum a) | Since: base-4.9.0.0 |
| Num a => Monoid (Sum a) | Since: base-2.1 |
| NFData a => NFData (Sum a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Unbox a => Unbox (Sum a) | |
Defined in Data.Vector.Unboxed.Base | |
| Generic1 Sum | Since: base-4.7.0.0 |
| newtype MVector s (Sum a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep (Sum a) | |
Defined in Data.Semigroup.Internal | |
| newtype Vector (Sum a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 Sum | |
Defined in Data.Semigroup.Internal | |
Monoid under multiplication.
>>>getProduct (Product 3 <> Product 4 <> mempty)12
Constructors
| Product | |
Fields
| |
Instances
| Monad Product | Since: base-4.8.0.0 |
| Functor Product | Since: base-4.8.0.0 |
| Applicative Product | Since: base-4.8.0.0 |
| Foldable Product | Since: base-4.8.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Product m -> m # foldMap :: Monoid m => (a -> m) -> Product a -> m # foldMap' :: Monoid m => (a -> m) -> Product a -> m # foldr :: (a -> b -> b) -> b -> Product a -> b # foldr' :: (a -> b -> b) -> b -> Product a -> b # foldl :: (b -> a -> b) -> b -> Product a -> b # foldl' :: (b -> a -> b) -> b -> Product a -> b # foldr1 :: (a -> a -> a) -> Product a -> a # foldl1 :: (a -> a -> a) -> Product a -> a # elem :: Eq a => a -> Product a -> Bool # maximum :: Ord a => Product a -> a # minimum :: Ord a => Product a -> a # | |
| Traversable Product | Since: base-4.8.0.0 |
| NFData1 Product | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Unbox a => Vector Vector (Product a) | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Product a) -> m (Vector (Product a)) basicUnsafeThaw :: PrimMonad m => Vector (Product a) -> m (Mutable Vector (PrimState m) (Product a)) basicLength :: Vector (Product a) -> Int basicUnsafeSlice :: Int -> Int -> Vector (Product a) -> Vector (Product a) basicUnsafeIndexM :: Monad m => Vector (Product a) -> Int -> m (Product a) basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Product a) -> Vector (Product a) -> m () | |
| Unbox a => MVector MVector (Product a) | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s (Product a) -> Int basicUnsafeSlice :: Int -> Int -> MVector s (Product a) -> MVector s (Product a) basicOverlaps :: MVector s (Product a) -> MVector s (Product a) -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Product a)) basicInitialize :: PrimMonad m => MVector (PrimState m) (Product a) -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Product a -> m (MVector (PrimState m) (Product a)) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Product a) -> Int -> m (Product a) basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Product a) -> Int -> Product a -> m () basicClear :: PrimMonad m => MVector (PrimState m) (Product a) -> m () basicSet :: PrimMonad m => MVector (PrimState m) (Product a) -> Product a -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Product a) -> MVector (PrimState m) (Product a) -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Product a) -> MVector (PrimState m) (Product a) -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Product a) -> Int -> m (MVector (PrimState m) (Product a)) | |
| Bounded a => Bounded (Product a) | Since: base-2.1 |
| Eq a => Eq (Product a) | Since: base-2.1 |
| Num a => Num (Product a) | Since: base-4.7.0.0 |
Defined in Data.Semigroup.Internal | |
| Ord a => Ord (Product a) | Since: base-2.1 |
| Read a => Read (Product a) | Since: base-2.1 |
| Show a => Show (Product a) | Since: base-2.1 |
| Generic (Product a) | Since: base-4.7.0.0 |
| Num a => Semigroup (Product a) | Since: base-4.9.0.0 |
| Num a => Monoid (Product a) | Since: base-2.1 |
| NFData a => NFData (Product a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Unbox a => Unbox (Product a) | |
Defined in Data.Vector.Unboxed.Base | |
| Generic1 Product | Since: base-4.7.0.0 |
| newtype MVector s (Product a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep (Product a) | |
Defined in Data.Semigroup.Internal | |
| newtype Vector (Product a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 Product | |
Defined in Data.Semigroup.Internal | |
newtype Alt (f :: k -> Type) (a :: k) #
Monoid under <|>.
>>>getAlt (Alt (Just 12) <> Alt (Just 24))Just 12
>>>getAlt $ Alt Nothing <> Alt (Just 24)Just 24
Since: base-4.8.0.0
Instances
| Generic1 (Alt f :: k -> Type) | Since: base-4.8.0.0 |
| Unbox (f a) => Vector Vector (Alt f a) | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Alt f a) -> m (Vector (Alt f a)) basicUnsafeThaw :: PrimMonad m => Vector (Alt f a) -> m (Mutable Vector (PrimState m) (Alt f a)) basicLength :: Vector (Alt f a) -> Int basicUnsafeSlice :: Int -> Int -> Vector (Alt f a) -> Vector (Alt f a) basicUnsafeIndexM :: Monad m => Vector (Alt f a) -> Int -> m (Alt f a) basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Alt f a) -> Vector (Alt f a) -> m () | |
| Unbox (f a) => MVector MVector (Alt f a) | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s (Alt f a) -> Int basicUnsafeSlice :: Int -> Int -> MVector s (Alt f a) -> MVector s (Alt f a) basicOverlaps :: MVector s (Alt f a) -> MVector s (Alt f a) -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Alt f a)) basicInitialize :: PrimMonad m => MVector (PrimState m) (Alt f a) -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Alt f a -> m (MVector (PrimState m) (Alt f a)) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Alt f a) -> Int -> m (Alt f a) basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Alt f a) -> Int -> Alt f a -> m () basicClear :: PrimMonad m => MVector (PrimState m) (Alt f a) -> m () basicSet :: PrimMonad m => MVector (PrimState m) (Alt f a) -> Alt f a -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Alt f a) -> MVector (PrimState m) (Alt f a) -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Alt f a) -> MVector (PrimState m) (Alt f a) -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Alt f a) -> Int -> m (MVector (PrimState m) (Alt f a)) | |
| Monad f => Monad (Alt f) | Since: base-4.8.0.0 |
| Functor f => Functor (Alt f) | Since: base-4.8.0.0 |
| Applicative f => Applicative (Alt f) | Since: base-4.8.0.0 |
| Foldable f => Foldable (Alt f) | Since: base-4.12.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Alt f m -> m # foldMap :: Monoid m => (a -> m) -> Alt f a -> m # foldMap' :: Monoid m => (a -> m) -> Alt f a -> m # foldr :: (a -> b -> b) -> b -> Alt f a -> b # foldr' :: (a -> b -> b) -> b -> Alt f a -> b # foldl :: (b -> a -> b) -> b -> Alt f a -> b # foldl' :: (b -> a -> b) -> b -> Alt f a -> b # foldr1 :: (a -> a -> a) -> Alt f a -> a # foldl1 :: (a -> a -> a) -> Alt f a -> a # elem :: Eq a => a -> Alt f a -> Bool # maximum :: Ord a => Alt f a -> a # minimum :: Ord a => Alt f a -> a # | |
| Traversable f => Traversable (Alt f) | Since: base-4.12.0.0 |
| Contravariant f => Contravariant (Alt f) | |
| Alternative f => Alternative (Alt f) | Since: base-4.8.0.0 |
| MonadPlus f => MonadPlus (Alt f) | Since: base-4.8.0.0 |
| Enum (f a) => Enum (Alt f a) | Since: base-4.8.0.0 |
| Eq (f a) => Eq (Alt f a) | Since: base-4.8.0.0 |
| Num (f a) => Num (Alt f a) | Since: base-4.8.0.0 |
| Ord (f a) => Ord (Alt f a) | Since: base-4.8.0.0 |
Defined in Data.Semigroup.Internal | |
| Read (f a) => Read (Alt f a) | Since: base-4.8.0.0 |
| Show (f a) => Show (Alt f a) | Since: base-4.8.0.0 |
| Generic (Alt f a) | Since: base-4.8.0.0 |
| Alternative f => Semigroup (Alt f a) | Since: base-4.9.0.0 |
| Alternative f => Monoid (Alt f a) | Since: base-4.8.0.0 |
| Unbox (f a) => Unbox (Alt f a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 (Alt f :: k -> Type) | |
Defined in Data.Semigroup.Internal | |
| newtype MVector s (Alt f a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep (Alt f a) | |
Defined in Data.Semigroup.Internal | |
| newtype Vector (Alt f a) | |
Defined in Data.Vector.Unboxed.Base | |
someNatVal :: Natural -> SomeNat #
Convert an integer into an unknown type-level natural.
Since: base-4.10.0.0
This type represents unknown type-level natural numbers.
Since: base-4.10.0.0
unfoldr :: (b -> Maybe (a, b)) -> b -> [a] #
The unfoldr function is a `dual' to foldr: while foldr
reduces a list to a summary value, unfoldr builds a list from
a seed value. The function takes the element and returns Nothing
if it is done producing the list or returns Just (a,b), in which
case, a is a prepended to the list and b is used as the next
element in a recursive call. For example,
iterate f == unfoldr (\x -> Just (x, f x))
In some cases, unfoldr can undo a foldr operation:
unfoldr f' (foldr f z xs) == xs
if the following holds:
f' (f x y) = Just (x,y) f' z = Nothing
A simple use of unfoldr:
>>>unfoldr (\b -> if b == 0 then Nothing else Just (b, b-1)) 10[10,9,8,7,6,5,4,3,2,1]
sortOn :: Ord b => (a -> b) -> [a] -> [a] #
Sort a list by comparing the results of a key function applied to each
element. sortOn f is equivalent to sortBy (comparing f), but has the
performance advantage of only evaluating f once for each element in the
input list. This is called the decorate-sort-undecorate paradigm, or
Schwartzian transform.
Elements are arranged from from lowest to highest, keeping duplicates in the order they appeared in the input.
>>>sortOn fst [(2, "world"), (4, "!"), (1, "Hello")][(1,"Hello"),(2,"world"),(4,"!")]
Since: base-4.8.0.0
permutations :: [a] -> [[a]] #
The permutations function returns the list of all permutations of the argument.
>>>permutations "abc"["abc","bac","cba","bca","cab","acb"]
subsequences :: [a] -> [[a]] #
The subsequences function returns the list of all subsequences of the argument.
>>>subsequences "abc"["","a","b","ab","c","ac","bc","abc"]
group :: Eq a => [a] -> [[a]] #
The group function takes a list and returns a list of lists such
that the concatenation of the result is equal to the argument. Moreover,
each sublist in the result contains only equal elements. For example,
>>>group "Mississippi"["M","i","ss","i","ss","i","pp","i"]
It is a special case of groupBy, which allows the programmer to supply
their own equality test.
genericReplicate :: Integral i => i -> a -> [a] #
The genericReplicate function is an overloaded version of replicate,
which accepts any Integral value as the number of repetitions to make.
genericSplitAt :: Integral i => i -> [a] -> ([a], [a]) #
The genericSplitAt function is an overloaded version of splitAt, which
accepts any Integral value as the position at which to split.
genericDrop :: Integral i => i -> [a] -> [a] #
The genericDrop function is an overloaded version of drop, which
accepts any Integral value as the number of elements to drop.
genericTake :: Integral i => i -> [a] -> [a] #
The genericTake function is an overloaded version of take, which
accepts any Integral value as the number of elements to take.
genericLength :: Num i => [a] -> i #
\(\mathcal{O}(n)\). The genericLength function is an overloaded version
of length. In particular, instead of returning an Int, it returns any
type which is an instance of Num. It is, however, less efficient than
length.
>>>genericLength [1, 2, 3] :: Int3>>>genericLength [1, 2, 3] :: Float3.0
The transpose function transposes the rows and columns of its argument.
For example,
>>>transpose [[1,2,3],[4,5,6]][[1,4],[2,5],[3,6]]
If some of the rows are shorter than the following rows, their elements are skipped:
>>>transpose [[10,11],[20],[],[30,31,32]][[10,20,30],[11,31],[32]]
intercalate :: [a] -> [[a]] -> [a] #
intercalate xs xss is equivalent to (.
It inserts the list concat (intersperse xs xss))xs in between the lists in xss and concatenates the
result.
>>>intercalate ", " ["Lorem", "ipsum", "dolor"]"Lorem, ipsum, dolor"
intersperse :: a -> [a] -> [a] #
\(\mathcal{O}(n)\). The intersperse function takes an element and a list
and `intersperses' that element between the elements of the list. For
example,
>>>intersperse ',' "abcde""a,b,c,d,e"
isPrefixOf :: Eq a => [a] -> [a] -> Bool #
\(\mathcal{O}(\min(m,n))\). The isPrefixOf function takes two lists and
returns True iff the first list is a prefix of the second.
>>>"Hello" `isPrefixOf` "Hello World!"True
>>>"Hello" `isPrefixOf` "Wello Horld!"False
readMaybe :: Read a => String -> Maybe a #
Parse a string using the Read instance.
Succeeds if there is exactly one valid result.
>>>readMaybe "123" :: Maybe IntJust 123
>>>readMaybe "hello" :: Maybe IntNothing
Since: base-4.6.0.0
fromRight :: b -> Either a b -> b #
Return the contents of a Right-value or a default value otherwise.
Examples
Basic usage:
>>>fromRight 1 (Right 3)3>>>fromRight 1 (Left "foo")1
Since: base-4.10.0.0
fromLeft :: a -> Either a b -> a #
Return the contents of a Left-value or a default value otherwise.
Examples
Basic usage:
>>>fromLeft 1 (Left 3)3>>>fromLeft 1 (Right "foo")1
Since: base-4.10.0.0
isRight :: Either a b -> Bool #
Return True if the given value is a Right-value, False otherwise.
Examples
Basic usage:
>>>isRight (Left "foo")False>>>isRight (Right 3)True
Assuming a Left value signifies some sort of error, we can use
isRight to write a very simple reporting function that only
outputs "SUCCESS" when a computation has succeeded.
This example shows how isRight might be used to avoid pattern
matching when one does not care about the value contained in the
constructor:
>>>import Control.Monad ( when )>>>let report e = when (isRight e) $ putStrLn "SUCCESS">>>report (Left "parse error")>>>report (Right 1)SUCCESS
Since: base-4.7.0.0
isLeft :: Either a b -> Bool #
Return True if the given value is a Left-value, False otherwise.
Examples
Basic usage:
>>>isLeft (Left "foo")True>>>isLeft (Right 3)False
Assuming a Left value signifies some sort of error, we can use
isLeft to write a very simple error-reporting function that does
absolutely nothing in the case of success, and outputs "ERROR" if
any error occurred.
This example shows how isLeft might be used to avoid pattern
matching when one does not care about the value contained in the
constructor:
>>>import Control.Monad ( when )>>>let report e = when (isLeft e) $ putStrLn "ERROR">>>report (Right 1)>>>report (Left "parse error")ERROR
Since: base-4.7.0.0
partitionEithers :: [Either a b] -> ([a], [b]) #
Partitions a list of Either into two lists.
All the Left elements are extracted, in order, to the first
component of the output. Similarly the Right elements are extracted
to the second component of the output.
Examples
Basic usage:
>>>let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]>>>partitionEithers list(["foo","bar","baz"],[3,7])
The pair returned by should be the same
pair as partitionEithers x(:lefts x, rights x)
>>>let list = [ Left "foo", Right 3, Left "bar", Right 7, Left "baz" ]>>>partitionEithers list == (lefts list, rights list)True
either :: (a -> c) -> (b -> c) -> Either a b -> c #
Case analysis for the Either type.
If the value is , apply the first function to Left aa;
if it is , apply the second function to Right bb.
Examples
We create two values of type , one using the
Either String IntLeft constructor and another using the Right constructor. Then
we apply "either" the length function (if we have a String)
or the "times-two" function (if we have an Int):
>>>let s = Left "foo" :: Either String Int>>>let n = Right 3 :: Either String Int>>>either length (*2) s3>>>either length (*2) n6
comparing :: Ord a => (b -> a) -> b -> b -> Ordering #
comparing p x y = compare (p x) (p y)
Useful combinator for use in conjunction with the xxxBy family
of functions from Data.List, for example:
... sortBy (comparing fst) ...
The Down type allows you to reverse sort order conveniently. A value of type
contains a value of type Down aa (represented as ).
If Down aa has an instance associated with it then comparing two
values thus wrapped will give you the opposite of their normal sort order.
This is particularly useful when sorting in generalised list comprehensions,
as in: Ordthen sortWith by Down x
Since: base-4.6.0.0
Instances
| Monad Down | Since: base-4.11.0.0 |
| Functor Down | Since: base-4.11.0.0 |
| Applicative Down | Since: base-4.11.0.0 |
| Foldable Down | Since: base-4.12.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Down m -> m # foldMap :: Monoid m => (a -> m) -> Down a -> m # foldMap' :: Monoid m => (a -> m) -> Down a -> m # foldr :: (a -> b -> b) -> b -> Down a -> b # foldr' :: (a -> b -> b) -> b -> Down a -> b # foldl :: (b -> a -> b) -> b -> Down a -> b # foldl' :: (b -> a -> b) -> b -> Down a -> b # foldr1 :: (a -> a -> a) -> Down a -> a # foldl1 :: (a -> a -> a) -> Down a -> a # elem :: Eq a => a -> Down a -> Bool # maximum :: Ord a => Down a -> a # | |
| Traversable Down | Since: base-4.12.0.0 |
| NFData1 Down | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Unbox a => Vector Vector (Down a) | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Down a) -> m (Vector (Down a)) basicUnsafeThaw :: PrimMonad m => Vector (Down a) -> m (Mutable Vector (PrimState m) (Down a)) basicLength :: Vector (Down a) -> Int basicUnsafeSlice :: Int -> Int -> Vector (Down a) -> Vector (Down a) basicUnsafeIndexM :: Monad m => Vector (Down a) -> Int -> m (Down a) basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Down a) -> Vector (Down a) -> m () | |
| Unbox a => MVector MVector (Down a) | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s (Down a) -> Int basicUnsafeSlice :: Int -> Int -> MVector s (Down a) -> MVector s (Down a) basicOverlaps :: MVector s (Down a) -> MVector s (Down a) -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Down a)) basicInitialize :: PrimMonad m => MVector (PrimState m) (Down a) -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Down a -> m (MVector (PrimState m) (Down a)) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Down a) -> Int -> m (Down a) basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Down a) -> Int -> Down a -> m () basicClear :: PrimMonad m => MVector (PrimState m) (Down a) -> m () basicSet :: PrimMonad m => MVector (PrimState m) (Down a) -> Down a -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Down a) -> MVector (PrimState m) (Down a) -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Down a) -> MVector (PrimState m) (Down a) -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Down a) -> Int -> m (MVector (PrimState m) (Down a)) | |
| Bounded a => Bounded (Down a) | Since: base-4.14.0.0 |
| Enum a => Enum (Down a) | Since: base-4.14.0.0 |
Defined in Data.Ord | |
| Eq a => Eq (Down a) | Since: base-4.6.0.0 |
| Floating a => Floating (Down a) | Since: base-4.14.0.0 |
| Fractional a => Fractional (Down a) | Since: base-4.14.0.0 |
| Integral a => Integral (Down a) | Since: base-4.14.0.0 |
| Num a => Num (Down a) | Since: base-4.11.0.0 |
| Ord a => Ord (Down a) | Since: base-4.6.0.0 |
| Read a => Read (Down a) | This instance would be equivalent to the derived instances of the
Since: base-4.7.0.0 |
| Real a => Real (Down a) | Since: base-4.14.0.0 |
Defined in Data.Ord Methods toRational :: Down a -> Rational # | |
| RealFloat a => RealFloat (Down a) | Since: base-4.14.0.0 |
Defined in Data.Ord Methods floatRadix :: Down a -> Integer # floatDigits :: Down a -> Int # floatRange :: Down a -> (Int, Int) # decodeFloat :: Down a -> (Integer, Int) # encodeFloat :: Integer -> Int -> Down a # significand :: Down a -> Down a # scaleFloat :: Int -> Down a -> Down a # isInfinite :: Down a -> Bool # isDenormalized :: Down a -> Bool # isNegativeZero :: Down a -> Bool # | |
| RealFrac a => RealFrac (Down a) | Since: base-4.14.0.0 |
| Show a => Show (Down a) | This instance would be equivalent to the derived instances of the
Since: base-4.7.0.0 |
| Ix a => Ix (Down a) | Since: base-4.14.0.0 |
| Generic (Down a) | Since: base-4.12.0.0 |
| Semigroup a => Semigroup (Down a) | Since: base-4.11.0.0 |
| Monoid a => Monoid (Down a) | Since: base-4.11.0.0 |
| Storable a => Storable (Down a) | Since: base-4.14.0.0 |
| Bits a => Bits (Down a) | Since: base-4.14.0.0 |
Defined in Data.Ord Methods (.&.) :: Down a -> Down a -> Down a # (.|.) :: Down a -> Down a -> Down a # xor :: Down a -> Down a -> Down a # complement :: Down a -> Down a # shift :: Down a -> Int -> Down a # rotate :: Down a -> Int -> Down a # setBit :: Down a -> Int -> Down a # clearBit :: Down a -> Int -> Down a # complementBit :: Down a -> Int -> Down a # testBit :: Down a -> Int -> Bool # bitSizeMaybe :: Down a -> Maybe Int # shiftL :: Down a -> Int -> Down a # unsafeShiftL :: Down a -> Int -> Down a # shiftR :: Down a -> Int -> Down a # unsafeShiftR :: Down a -> Int -> Down a # rotateL :: Down a -> Int -> Down a # | |
| FiniteBits a => FiniteBits (Down a) | Since: base-4.14.0.0 |
Defined in Data.Ord Methods finiteBitSize :: Down a -> Int # countLeadingZeros :: Down a -> Int # countTrailingZeros :: Down a -> Int # | |
| NFData a => NFData (Down a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Unbox a => Unbox (Down a) | |
Defined in Data.Vector.Unboxed.Base | |
| Generic1 Down | Since: base-4.12.0.0 |
| newtype MVector s (Down a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep (Down a) | |
Defined in GHC.Generics | |
| newtype Vector (Down a) | |
Defined in Data.Vector.Unboxed.Base | |
| type Rep1 Down | |
Defined in GHC.Generics | |
Proxy is a type that holds no data, but has a phantom parameter of
arbitrary type (or even kind). Its use is to provide type information, even
though there is no value available of that type (or it may be too costly to
create one).
Historically, is a safer alternative to the
Proxy :: Proxy a idiom.undefined :: a
>>>Proxy :: Proxy (Void, Int -> Int)Proxy
Proxy can even hold types of higher kinds,
>>>Proxy :: Proxy EitherProxy
>>>Proxy :: Proxy FunctorProxy
>>>Proxy :: Proxy complicatedStructureProxy
Constructors
| Proxy |
Instances
| Generic1 (Proxy :: k -> Type) | Since: base-4.6.0.0 |
| Monad (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
| Functor (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
| Applicative (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
| Foldable (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => Proxy m -> m # foldMap :: Monoid m => (a -> m) -> Proxy a -> m # foldMap' :: Monoid m => (a -> m) -> Proxy a -> m # foldr :: (a -> b -> b) -> b -> Proxy a -> b # foldr' :: (a -> b -> b) -> b -> Proxy a -> b # foldl :: (b -> a -> b) -> b -> Proxy a -> b # foldl' :: (b -> a -> b) -> b -> Proxy a -> b # foldr1 :: (a -> a -> a) -> Proxy a -> a # foldl1 :: (a -> a -> a) -> Proxy a -> a # elem :: Eq a => a -> Proxy a -> Bool # maximum :: Ord a => Proxy a -> a # minimum :: Ord a => Proxy a -> a # | |
| Traversable (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
| Contravariant (Proxy :: Type -> Type) | |
| Alternative (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
| MonadPlus (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
| NFData1 (Proxy :: Type -> Type) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Hashable1 (Proxy :: Type -> Type) | |
Defined in Data.Hashable.Class | |
| Bounded (Proxy t) | Since: base-4.7.0.0 |
| Enum (Proxy s) | Since: base-4.7.0.0 |
| Eq (Proxy s) | Since: base-4.7.0.0 |
| Ord (Proxy s) | Since: base-4.7.0.0 |
| Read (Proxy t) | Since: base-4.7.0.0 |
| Show (Proxy s) | Since: base-4.7.0.0 |
| Ix (Proxy s) | Since: base-4.7.0.0 |
Defined in Data.Proxy | |
| Generic (Proxy t) | Since: base-4.6.0.0 |
| Semigroup (Proxy s) | Since: base-4.9.0.0 |
| Monoid (Proxy s) | Since: base-4.7.0.0 |
| NFData (Proxy a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Hashable (Proxy a) | |
Defined in Data.Hashable.Class | |
| type Rep1 (Proxy :: k -> Type) | |
| type Rep (Proxy t) | |
(>>>) :: forall k cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c infixr 1 #
Left-to-right composition
(<<<) :: forall k cat (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c infixr 1 #
Right-to-left composition
See openFile
Constructors
| ReadMode | |
| WriteMode | |
| AppendMode | |
| ReadWriteMode |
byteSwap64 :: Word64 -> Word64 #
Reverse order of bytes in Word64.
Since: base-4.7.0.0
byteSwap32 :: Word32 -> Word32 #
Reverse order of bytes in Word32.
Since: base-4.7.0.0
byteSwap16 :: Word16 -> Word16 #
Reverse order of bytes in Word16.
Since: base-4.7.0.0
toIntegralSized :: (Integral a, Integral b, Bits a, Bits b) => a -> Maybe b #
Attempt to convert an Integral type a to an Integral type b using
the size of the types as measured by Bits methods.
A simpler version of this function is:
toIntegral :: (Integral a, Integral b) => a -> Maybe b
toIntegral x
| toInteger x == y = Just (fromInteger y)
| otherwise = Nothing
where
y = toInteger xThis version requires going through Integer, which can be inefficient.
However, toIntegralSized is optimized to allow GHC to statically determine
the relative type sizes (as measured by bitSizeMaybe and isSigned) and
avoid going through Integer for many types. (The implementation uses
fromIntegral, which is itself optimized with rules for base types but may
go through Integer for some type pairs.)
Since: base-4.8.0.0
lcm :: Integral a => a -> a -> a #
is the smallest positive integer that both lcm x yx and y divide.
gcd :: Integral a => a -> a -> a #
is the non-negative factor of both gcd x yx and y of which
every common factor of x and y is also a factor; for example
, gcd 4 2 = 2, gcd (-4) 6 = 2 = gcd 0 44. = gcd 0 00.
(That is, the common divisor that is "greatest" in the divisibility
preordering.)
Note: Since for signed fixed-width integer types, ,
the result may be negative if one of the arguments is abs minBound < 0 (and
necessarily is if the other is minBound0 or ) for such types.minBound
(^^) :: (Fractional a, Integral b) => a -> b -> a infixr 8 #
raise a number to an integral power
denominator :: Ratio a -> a #
Extract the denominator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.
Extract the numerator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.
boundedEnumFromThen :: (Enum a, Bounded a) => a -> a -> [a] #
boundedEnumFrom :: (Enum a, Bounded a) => a -> [a] #
unzip :: [(a, b)] -> ([a], [b]) #
unzip transforms a list of pairs into a list of first components
and a list of second components.
zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] #
\(\mathcal{O}(\min(m,n))\). zipWith generalises zip by zipping with the
function given as the first argument, instead of a tupling function. For
example, is applied to two lists to produce the list of
corresponding sums:zipWith (+)
>>>zipWith (+) [1, 2, 3] [4, 5, 6][5,7,9]
zipWith is right-lazy:
zipWith f [] _|_ = []
zipWith is capable of list fusion, but it is restricted to its
first list argument and its resulting list.
break :: (a -> Bool) -> [a] -> ([a], [a]) #
break, applied to a predicate p and a list xs, returns a tuple where
first element is longest prefix (possibly empty) of xs of elements that
do not satisfy p and second element is the remainder of the list:
break (> 3) [1,2,3,4,1,2,3,4] == ([1,2,3],[4,1,2,3,4]) break (< 9) [1,2,3] == ([],[1,2,3]) break (> 9) [1,2,3] == ([1,2,3],[])
splitAt :: Int -> [a] -> ([a], [a]) #
splitAt n xs returns a tuple where first element is xs prefix of
length n and second element is the remainder of the list:
splitAt 6 "Hello World!" == ("Hello ","World!")
splitAt 3 [1,2,3,4,5] == ([1,2,3],[4,5])
splitAt 1 [1,2,3] == ([1],[2,3])
splitAt 3 [1,2,3] == ([1,2,3],[])
splitAt 4 [1,2,3] == ([1,2,3],[])
splitAt 0 [1,2,3] == ([],[1,2,3])
splitAt (-1) [1,2,3] == ([],[1,2,3])It is equivalent to ( when take n xs, drop n xs)n is not _|_
(splitAt _|_ xs = _|_).
splitAt is an instance of the more general genericSplitAt,
in which n may be of any integral type.
drop n xs returns the suffix of xs
after the first n elements, or [] if n > :length xs
drop 6 "Hello World!" == "World!" drop 3 [1,2,3,4,5] == [4,5] drop 3 [1,2] == [] drop 3 [] == [] drop (-1) [1,2] == [1,2] drop 0 [1,2] == [1,2]
It is an instance of the more general genericDrop,
in which n may be of any integral type.
take n, applied to a list xs, returns the prefix of xs
of length n, or xs itself if n > :length xs
take 5 "Hello World!" == "Hello" take 3 [1,2,3,4,5] == [1,2,3] take 3 [1,2] == [1,2] take 3 [] == [] take (-1) [1,2] == [] take 0 [1,2] == []
It is an instance of the more general genericTake,
in which n may be of any integral type.
takeWhile :: (a -> Bool) -> [a] -> [a] #
takeWhile, applied to a predicate p and a list xs, returns the
longest prefix (possibly empty) of xs of elements that satisfy p:
takeWhile (< 3) [1,2,3,4,1,2,3,4] == [1,2] takeWhile (< 9) [1,2,3] == [1,2,3] takeWhile (< 0) [1,2,3] == []
replicate :: Int -> a -> [a] #
replicate n x is a list of length n with x the value of
every element.
It is an instance of the more general genericReplicate,
in which n may be of any integral type.
scanl' :: (b -> a -> b) -> b -> [a] -> [b] #
\(\mathcal{O}(n)\). A strictly accumulating version of scanl
mapMaybe :: (a -> Maybe b) -> [a] -> [b] #
The mapMaybe function is a version of map which can throw
out elements. In particular, the functional argument returns
something of type . If this is Maybe bNothing, no element
is added on to the result list. If it is , then Just bb is
included in the result list.
Examples
Using is a shortcut for mapMaybe f x
in most cases:catMaybes $ map f x
>>>import Text.Read ( readMaybe )>>>let readMaybeInt = readMaybe :: String -> Maybe Int>>>mapMaybe readMaybeInt ["1", "Foo", "3"][1,3]>>>catMaybes $ map readMaybeInt ["1", "Foo", "3"][1,3]
If we map the Just constructor, the entire list should be returned:
>>>mapMaybe Just [1,2,3][1,2,3]
catMaybes :: [Maybe a] -> [a] #
The catMaybes function takes a list of Maybes and returns
a list of all the Just values.
Examples
Basic usage:
>>>catMaybes [Just 1, Nothing, Just 3][1,3]
When constructing a list of Maybe values, catMaybes can be used
to return all of the "success" results (if the list is the result
of a map, then mapMaybe would be more appropriate):
>>>import Text.Read ( readMaybe )>>>[readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ][Just 1,Nothing,Just 3]>>>catMaybes $ [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ][1,3]
listToMaybe :: [a] -> Maybe a #
The listToMaybe function returns Nothing on an empty list
or where Just aa is the first element of the list.
Examples
Basic usage:
>>>listToMaybe []Nothing
>>>listToMaybe [9]Just 9
>>>listToMaybe [1,2,3]Just 1
Composing maybeToList with listToMaybe should be the identity
on singleton/empty lists:
>>>maybeToList $ listToMaybe [5][5]>>>maybeToList $ listToMaybe [][]
But not on lists with more than one element:
>>>maybeToList $ listToMaybe [1,2,3][1]
maybeToList :: Maybe a -> [a] #
The maybeToList function returns an empty list when given
Nothing or a singleton list when given Just.
Examples
Basic usage:
>>>maybeToList (Just 7)[7]
>>>maybeToList Nothing[]
One can use maybeToList to avoid pattern matching when combined
with a function that (safely) works on lists:
>>>import Text.Read ( readMaybe )>>>sum $ maybeToList (readMaybe "3")3>>>sum $ maybeToList (readMaybe "")0
fromMaybe :: a -> Maybe a -> a #
The fromMaybe function takes a default value and and Maybe
value. If the Maybe is Nothing, it returns the default values;
otherwise, it returns the value contained in the Maybe.
Examples
Basic usage:
>>>fromMaybe "" (Just "Hello, World!")"Hello, World!"
>>>fromMaybe "" Nothing""
Read an integer from a string using readMaybe. If we fail to
parse an integer, we want to return 0 by default:
>>>import Text.Read ( readMaybe )>>>fromMaybe 0 (readMaybe "5")5>>>fromMaybe 0 (readMaybe "")0
maybe :: b -> (a -> b) -> Maybe a -> b #
The maybe function takes a default value, a function, and a Maybe
value. If the Maybe value is Nothing, the function returns the
default value. Otherwise, it applies the function to the value inside
the Just and returns the result.
Examples
Basic usage:
>>>maybe False odd (Just 3)True
>>>maybe False odd NothingFalse
Read an integer from a string using readMaybe. If we succeed,
return twice the integer; that is, apply (*2) to it. If instead
we fail to parse an integer, return 0 by default:
>>>import Text.Read ( readMaybe )>>>maybe 0 (*2) (readMaybe "5")10>>>maybe 0 (*2) (readMaybe "")0
Apply show to a Maybe Int. If we have Just n, we want to show
the underlying Int n. But if we have Nothing, we return the
empty string instead of (for example) "Nothing":
>>>maybe "" show (Just 5)"5">>>maybe "" show Nothing""
Case analysis for the Bool type. evaluates to bool x y px
when p is False, and evaluates to y when p is True.
This is equivalent to if p then y else x; that is, one can
think of it as an if-then-else construct with its arguments
reordered.
Examples
Basic usage:
>>>bool "foo" "bar" True"bar">>>bool "foo" "bar" False"foo"
Confirm that and bool x y pif p then y else x are
equivalent:
>>>let p = True; x = "bar"; y = "foo">>>bool x y p == if p then y else xTrue>>>let p = False>>>bool x y p == if p then y else xTrue
Since: base-4.7.0.0
is the least fixed point of the function fix ff,
i.e. the least defined x such that f x = x.
For example, we can write the factorial function using direct recursion as
>>>let fac n = if n <= 1 then 1 else n * fac (n-1) in fac 5120
This uses the fact that Haskell’s let introduces recursive bindings. We can
rewrite this definition using fix,
>>>fix (\rec n -> if n <= 1 then 1 else n * rec (n-1)) 5120
Instead of making a recursive call, we introduce a dummy parameter rec;
when used within fix, this parameter then refers to fix’s argument, hence
the recursion is reintroduced.
void :: Functor f => f a -> f () #
discards or ignores the result of evaluation, such
as the return value of an void valueIO action.
Using ApplicativeDo: '' can be understood as the
void asdo expression
do as pure ()
with an inferred Functor constraint.
Examples
Replace the contents of a with unit:Maybe Int
>>>void NothingNothing>>>void (Just 3)Just ()
Replace the contents of an
with unit, resulting in an Either Int Int:Either Int ()
>>>void (Left 8675309)Left 8675309>>>void (Right 8675309)Right ()
Replace every element of a list with unit:
>>>void [1,2,3][(),(),()]
Replace the second element of a pair with unit:
>>>void (1,2)(1,())
Discard the result of an IO action:
>>>mapM print [1,2]1 2 [(),()]>>>void $ mapM print [1,2]1 2
($>) :: Functor f => f a -> b -> f b infixl 4 #
Flipped version of <$.
Using ApplicativeDo: 'as ' can be understood as the
$> bdo expression
do as pure b
with an inferred Functor constraint.
Examples
Replace the contents of a with a constant
Maybe IntString:
>>>Nothing $> "foo"Nothing>>>Just 90210 $> "foo"Just "foo"
Replace the contents of an
with a constant Either Int IntString, resulting in an :Either
Int String
>>>Left 8675309 $> "foo"Left 8675309>>>Right 8675309 $> "foo"Right "foo"
Replace each element of a list with a constant String:
>>>[1,2,3] $> "foo"["foo","foo","foo"]
Replace the second element of a pair with a constant String:
>>>(1,2) $> "foo"(1,"foo")
Since: base-4.7.0.0
(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 #
An infix synonym for fmap.
The name of this operator is an allusion to $.
Note the similarities between their types:
($) :: (a -> b) -> a -> b (<$>) :: Functor f => (a -> b) -> f a -> f b
Whereas $ is function application, <$> is function
application lifted over a Functor.
Examples
Convert from a to a Maybe Int using Maybe
Stringshow:
>>>show <$> NothingNothing>>>show <$> Just 3Just "3"
Convert from an to an
Either Int IntEither IntString using show:
>>>show <$> Left 17Left 17>>>show <$> Right 17Right "17"
Double each element of a list:
>>>(*2) <$> [1,2,3][2,4,6]
Apply even to the second element of a pair:
>>>even <$> (2,2)(2,True)
uncurry :: (a -> b -> c) -> (a, b) -> c #
uncurry converts a curried function to a function on pairs.
Examples
>>>uncurry (+) (1,2)3
>>>uncurry ($) (show, 1)"1"
>>>map (uncurry max) [(1,2), (3,4), (6,8)][2,4,8]
An MVar (pronounced "em-var") is a synchronising variable, used
for communication between concurrent threads. It can be thought of
as a box, which may be empty or full.
Instances
| NFData1 MVar | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Eq (MVar a) | Since: base-4.1.0.0 |
| NFData (MVar a) | NOTE: Only strict in the reference and not the referenced value. Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
currentCallStack :: IO [String] #
Returns a [String] representing the current call stack. This
can be useful for debugging.
The implementation uses the call-stack simulation maintained by the
profiler, so it only works if the program was compiled with -prof
and contains suitable SCC annotations (e.g. by using -fprof-auto).
Otherwise, the list returned is likely to be empty or
uninformative.
Since: base-4.5.0.0
($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b infixr 0 #
Strict (call-by-value) application operator. It takes a function and an argument, evaluates the argument to weak head normal form (WHNF), then calls the function with that value.
flip :: (a -> b -> c) -> b -> a -> c #
takes its (first) two arguments in the reverse order of flip ff.
>>>flip (++) "hello" "world""worldhello"
const x is a unary function which evaluates to x for all inputs.
>>>const 42 "hello"42
>>>map (const 42) [0..3][42,42,42,42]
when :: Applicative f => Bool -> f () -> f () #
Conditional execution of Applicative expressions. For example,
when debug (putStrLn "Debugging")
will output the string Debugging if the Boolean value debug
is True, and otherwise do nothing.
(=<<) :: Monad m => (a -> m b) -> m a -> m b infixr 1 #
Same as >>=, but with the arguments interchanged.
liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d #
Lift a ternary function to actions.
Using ApplicativeDo: '' can be understood
as the liftA3 f as bs csdo expression
do a <- as b <- bs c <- cs pure (f a b c)
(<**>) :: Applicative f => f a -> f (a -> b) -> f b infixl 4 #
class Applicative f => Alternative (f :: Type -> Type) where #
A monoid on applicative functors.
If defined, some and many should be the least solutions
of the equations:
Methods
The identity of <|>
(<|>) :: f a -> f a -> f a infixl 3 #
An associative binary operation
One or more.
Zero or more.
Instances
class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where #
Monads that also support choice and failure.
Minimal complete definition
Nothing
Methods
The identity of mplus. It should also satisfy the equations
mzero >>= f = mzero v >> mzero = mzero
The default definition is
mzero = empty
An associative operation. The default definition is
mplus = (<|>)
Instances
Non-empty (and non-strict) list type.
Since: base-4.9.0.0
Constructors
| a :| [a] infixr 5 |
Instances
| Monad NonEmpty | Since: base-4.9.0.0 |
| Functor NonEmpty | Since: base-4.9.0.0 |
| Applicative NonEmpty | Since: base-4.9.0.0 |
| Foldable NonEmpty | Since: base-4.9.0.0 |
Defined in Data.Foldable Methods fold :: Monoid m => NonEmpty m -> m # foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m # foldMap' :: Monoid m => (a -> m) -> NonEmpty a -> m # foldr :: (a -> b -> b) -> b -> NonEmpty a -> b # foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b # foldl :: (b -> a -> b) -> b -> NonEmpty a -> b # foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b # foldr1 :: (a -> a -> a) -> NonEmpty a -> a # foldl1 :: (a -> a -> a) -> NonEmpty a -> a # elem :: Eq a => a -> NonEmpty a -> Bool # maximum :: Ord a => NonEmpty a -> a # minimum :: Ord a => NonEmpty a -> a # | |
| Traversable NonEmpty | Since: base-4.9.0.0 |
| NFData1 NonEmpty | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Lift a => Lift (NonEmpty a :: Type) | Since: template-haskell-2.15.0.0 |
| IsList (NonEmpty a) | Since: base-4.9.0.0 |
| Eq a => Eq (NonEmpty a) | Since: base-4.9.0.0 |
| Ord a => Ord (NonEmpty a) | Since: base-4.9.0.0 |
| Read a => Read (NonEmpty a) | Since: base-4.11.0.0 |
| Show a => Show (NonEmpty a) | Since: base-4.11.0.0 |
| Generic (NonEmpty a) | Since: base-4.6.0.0 |
| Semigroup (NonEmpty a) | Since: base-4.9.0.0 |
| NFData a => NFData (NonEmpty a) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| Hashable a => Hashable (NonEmpty a) | |
Defined in Data.Hashable.Class | |
| One (NonEmpty a) | |
| Pretty a => Pretty (NonEmpty a) | |
Defined in Text.PrettyPrint.Annotated.WL | |
| Generic1 NonEmpty | Since: base-4.6.0.0 |
| type Rep (NonEmpty a) | |
Defined in GHC.Generics type Rep (NonEmpty a) = D1 ('MetaData "NonEmpty" "GHC.Base" "base" 'False) (C1 ('MetaCons ":|" ('InfixI 'LeftAssociative 9) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a]))) | |
| type Item (NonEmpty a) | |
| type OneItem (NonEmpty a) | |
Defined in Relude.Container.One | |
| type Rep1 NonEmpty | |
Defined in GHC.Generics type Rep1 NonEmpty = D1 ('MetaData "NonEmpty" "GHC.Base" "base" 'False) (C1 ('MetaCons ":|" ('InfixI 'LeftAssociative 9) 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1 :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 []))) | |
getCallStack :: CallStack -> [([Char], SrcLoc)] #
Extract a list of call-sites from the CallStack.
The list is ordered by most recent call.
Since: base-4.8.1.0
type HasCallStack = ?callStack :: CallStack #
Request a CallStack.
NOTE: The implicit parameter ?callStack :: CallStack is an
implementation detail and should not be considered part of the
CallStack API, we may decide to change the implementation in the
future.
Since: base-4.9.0.0
stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a #
data SomeException #
The SomeException type is the root of the exception type hierarchy.
When an exception of type e is thrown, behind the scenes it is
encapsulated in a SomeException.
Constructors
| Exception e => SomeException e |
Instances
| Show SomeException | Since: base-3.0 |
Defined in GHC.Exception.Type Methods showsPrec :: Int -> SomeException -> ShowS # show :: SomeException -> String # showList :: [SomeException] -> ShowS # | |
| Exception SomeException | Since: base-3.0 |
Defined in GHC.Exception.Type Methods toException :: SomeException -> SomeException # fromException :: SomeException -> Maybe SomeException # displayException :: SomeException -> String # | |
fromShort :: ShortByteString -> ByteString #
O(n). Convert a ShortByteString into a ByteString.
data ShortByteString #
A compact representation of a Word8 vector.
It has a lower memory overhead than a ByteString and and does not
contribute to heap fragmentation. It can be converted to or from a
ByteString (at the cost of copying the string data). It supports very few
other operations.
It is suitable for use as an internal representation for code that needs
to keep many short strings in memory, but it should not be used as an
interchange type. That is, it should not generally be used in public APIs.
The ByteString type is usually more suitable for use in interfaces; it is
more flexible and it supports a wide range of operations.
Instances
data ByteString #
A space-efficient representation of a Word8 vector, supporting many
efficient operations.
A ByteString contains 8-bit bytes, or by using the operations from
Data.ByteString.Char8 it can be interpreted as containing 8-bit
characters.
Instances
toShort :: ByteString -> ShortByteString #
O(n). Convert a ByteString into a ShortByteString.
This makes a copy, so does not retain the input string.
A map of integers to values a.
Instances
| Functor IntMap | |
| Foldable IntMap | Folds in order of increasing key. |
Defined in Data.IntMap.Internal Methods fold :: Monoid m => IntMap m -> m # foldMap :: Monoid m => (a -> m) -> IntMap a -> m # foldMap' :: Monoid m => (a -> m) -> IntMap a -> m # foldr :: (a -> b -> b) -> b -> IntMap a -> b # foldr' :: (a -> b -> b) -> b -> IntMap a -> b # foldl :: (b -> a -> b) -> b -> IntMap a -> b # foldl' :: (b -> a -> b) -> b -> IntMap a -> b # foldr1 :: (a -> a -> a) -> IntMap a -> a # foldl1 :: (a -> a -> a) -> IntMap a -> a # elem :: Eq a => a -> IntMap a -> Bool # maximum :: Ord a => IntMap a -> a # minimum :: Ord a => IntMap a -> a # | |
| Traversable IntMap | Traverses in order of increasing key. |
| Eq1 IntMap | Since: containers-0.5.9 |
| Ord1 IntMap | Since: containers-0.5.9 |
Defined in Data.IntMap.Internal | |
| Read1 IntMap | Since: containers-0.5.9 |
Defined in Data.IntMap.Internal | |
| Show1 IntMap | Since: containers-0.5.9 |
| IsList (IntMap a) | Since: containers-0.5.6.2 |
| Eq a => Eq (IntMap a) | |
| Data a => Data (IntMap a) | |
Defined in Data.IntMap.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntMap a -> c (IntMap a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IntMap a) # toConstr :: IntMap a -> Constr # dataTypeOf :: IntMap a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IntMap a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (IntMap a)) # gmapT :: (forall b. Data b => b -> b) -> IntMap a -> IntMap a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntMap a -> r # gmapQ :: (forall d. Data d => d -> u) -> IntMap a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IntMap a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntMap a -> m (IntMap a) # | |
| Ord a => Ord (IntMap a) | |
Defined in Data.IntMap.Internal | |
| Read e => Read (IntMap e) | |
| Show a => Show (IntMap a) | |
| Semigroup (IntMap a) | Since: containers-0.5.7 |
| Monoid (IntMap a) | |
| NFData a => NFData (IntMap a) | |
Defined in Data.IntMap.Internal | |
| One (IntMap v) | |
| type Item (IntMap a) | |
Defined in Data.IntMap.Internal | |
| type OneItem (IntMap v) | |
Defined in Relude.Container.One | |
A set of integers.
Instances
| IsList IntSet | Since: containers-0.5.6.2 |
| Eq IntSet | |
| Data IntSet | |
Defined in Data.IntSet.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IntSet -> c IntSet # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c IntSet # toConstr :: IntSet -> Constr # dataTypeOf :: IntSet -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c IntSet) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c IntSet) # gmapT :: (forall b. Data b => b -> b) -> IntSet -> IntSet # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IntSet -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IntSet -> r # gmapQ :: (forall d. Data d => d -> u) -> IntSet -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IntSet -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IntSet -> m IntSet # | |
| Ord IntSet | |
| Read IntSet | |
| Show IntSet | |
| Semigroup IntSet | Since: containers-0.5.7 |
| Monoid IntSet | |
| NFData IntSet | |
Defined in Data.IntSet.Internal | |
| One IntSet | |
| type Item IntSet | |
Defined in Data.IntSet.Internal | |
| type OneItem IntSet | |
Defined in Relude.Container.One | |
A Map from keys k to values a.
The Semigroup operation for Map is union, which prefers
values from the left operand. If m1 maps a key k to a value
a1, and m2 maps the same key to a different value a2, then
their union m1 <> m2 maps k to a1.
Instances
| Eq2 Map | Since: containers-0.5.9 |
| Ord2 Map | Since: containers-0.5.9 |
Defined in Data.Map.Internal | |
| Show2 Map | Since: containers-0.5.9 |
| Functor (Map k) | |
| Foldable (Map k) | Folds in order of increasing key. |
Defined in Data.Map.Internal Methods fold :: Monoid m => Map k m -> m # foldMap :: Monoid m => (a -> m) -> Map k a -> m # foldMap' :: Monoid m => (a -> m) -> Map k a -> m # foldr :: (a -> b -> b) -> b -> Map k a -> b # foldr' :: (a -> b -> b) -> b -> Map k a -> b # foldl :: (b -> a -> b) -> b -> Map k a -> b # foldl' :: (b -> a -> b) -> b -> Map k a -> b # foldr1 :: (a -> a -> a) -> Map k a -> a # foldl1 :: (a -> a -> a) -> Map k a -> a # elem :: Eq a => a -> Map k a -> Bool # maximum :: Ord a => Map k a -> a # minimum :: Ord a => Map k a -> a # | |
| Traversable (Map k) | Traverses in order of increasing key. |
| Eq k => Eq1 (Map k) | Since: containers-0.5.9 |
| Ord k => Ord1 (Map k) | Since: containers-0.5.9 |
Defined in Data.Map.Internal | |
| (Ord k, Read k) => Read1 (Map k) | Since: containers-0.5.9 |
Defined in Data.Map.Internal | |
| Show k => Show1 (Map k) | Since: containers-0.5.9 |
| Ord k => IsList (Map k v) | Since: containers-0.5.6.2 |
| (Eq k, Eq a) => Eq (Map k a) | |
| (Data k, Data a, Ord k) => Data (Map k a) | |
Defined in Data.Map.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Map k a -> c (Map k a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Map k a) # toConstr :: Map k a -> Constr # dataTypeOf :: Map k a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Map k a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Map k a)) # gmapT :: (forall b. Data b => b -> b) -> Map k a -> Map k a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Map k a -> r # gmapQ :: (forall d. Data d => d -> u) -> Map k a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Map k a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k a -> m (Map k a) # | |
| (Ord k, Ord v) => Ord (Map k v) | |
| (Ord k, Read k, Read e) => Read (Map k e) | |
| (Show k, Show a) => Show (Map k a) | |
| Ord k => Semigroup (Map k v) | |
| Ord k => Monoid (Map k v) | |
| (NFData k, NFData a) => NFData (Map k a) | |
Defined in Data.Map.Internal | |
| One (Map k v) | |
| type Item (Map k v) | |
Defined in Data.Map.Internal | |
| type OneItem (Map k v) | |
Defined in Relude.Container.One | |
General-purpose finite sequences.
Instances
| Monad Seq | |
| Functor Seq | |
| MonadFix Seq | Since: containers-0.5.11 |
Defined in Data.Sequence.Internal | |
| Applicative Seq | Since: containers-0.5.4 |
| Foldable Seq | |
Defined in Data.Sequence.Internal Methods fold :: Monoid m => Seq m -> m # foldMap :: Monoid m => (a -> m) -> Seq a -> m # foldMap' :: Monoid m => (a -> m) -> Seq a -> m # foldr :: (a -> b -> b) -> b -> Seq a -> b # foldr' :: (a -> b -> b) -> b -> Seq a -> b # foldl :: (b -> a -> b) -> b -> Seq a -> b # foldl' :: (b -> a -> b) -> b -> Seq a -> b # foldr1 :: (a -> a -> a) -> Seq a -> a # foldl1 :: (a -> a -> a) -> Seq a -> a # elem :: Eq a => a -> Seq a -> Bool # maximum :: Ord a => Seq a -> a # | |
| Traversable Seq | |
| Eq1 Seq | Since: containers-0.5.9 |
| Ord1 Seq | Since: containers-0.5.9 |
Defined in Data.Sequence.Internal | |
| Read1 Seq | Since: containers-0.5.9 |
Defined in Data.Sequence.Internal | |
| Show1 Seq | Since: containers-0.5.9 |
| MonadZip Seq |
|
| Alternative Seq | Since: containers-0.5.4 |
| MonadPlus Seq | |
| UnzipWith Seq | |
Defined in Data.Sequence.Internal Methods unzipWith' :: (x -> (a, b)) -> Seq x -> (Seq a, Seq b) | |
| IsList (Seq a) | |
| Eq a => Eq (Seq a) | |
| Data a => Data (Seq a) | |
Defined in Data.Sequence.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Seq a -> c (Seq a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Seq a) # dataTypeOf :: Seq a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Seq a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Seq a)) # gmapT :: (forall b. Data b => b -> b) -> Seq a -> Seq a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r # gmapQ :: (forall d. Data d => d -> u) -> Seq a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Seq a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) # | |
| Ord a => Ord (Seq a) | |
| Read a => Read (Seq a) | |
| Show a => Show (Seq a) | |
| a ~ Char => IsString (Seq a) | Since: containers-0.5.7 |
Defined in Data.Sequence.Internal Methods fromString :: String -> Seq a # | |
| Semigroup (Seq a) | Since: containers-0.5.7 |
| Monoid (Seq a) | |
| NFData a => NFData (Seq a) | |
Defined in Data.Sequence.Internal | |
| One (Seq a) | |
| Pretty a => Pretty (Seq a) | |
Defined in Text.PrettyPrint.Annotated.WL | |
| type Item (Seq a) | |
Defined in Data.Sequence.Internal | |
| type OneItem (Seq a) | |
Defined in Relude.Container.One | |
A set of values a.
Instances
| Foldable Set | Folds in order of increasing key. |
Defined in Data.Set.Internal Methods fold :: Monoid m => Set m -> m # foldMap :: Monoid m => (a -> m) -> Set a -> m # foldMap' :: Monoid m => (a -> m) -> Set a -> m # foldr :: (a -> b -> b) -> b -> Set a -> b # foldr' :: (a -> b -> b) -> b -> Set a -> b # foldl :: (b -> a -> b) -> b -> Set a -> b # foldl' :: (b -> a -> b) -> b -> Set a -> b # foldr1 :: (a -> a -> a) -> Set a -> a # foldl1 :: (a -> a -> a) -> Set a -> a # elem :: Eq a => a -> Set a -> Bool # maximum :: Ord a => Set a -> a # | |
| Eq1 Set | Since: containers-0.5.9 |
| Ord1 Set | Since: containers-0.5.9 |
Defined in Data.Set.Internal | |
| Show1 Set | Since: containers-0.5.9 |
| Ord a => IsList (Set a) | Since: containers-0.5.6.2 |
| Eq a => Eq (Set a) | |
| (Data a, Ord a) => Data (Set a) | |
Defined in Data.Set.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Set a -> c (Set a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Set a) # dataTypeOf :: Set a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Set a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Set a)) # gmapT :: (forall b. Data b => b -> b) -> Set a -> Set a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Set a -> r # gmapQ :: (forall d. Data d => d -> u) -> Set a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Set a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Set a -> m (Set a) # | |
| Ord a => Ord (Set a) | |
| (Read a, Ord a) => Read (Set a) | |
| Show a => Show (Set a) | |
| Ord a => Semigroup (Set a) | Since: containers-0.5.7 |
| Ord a => Monoid (Set a) | |
| NFData a => NFData (Set a) | |
Defined in Data.Set.Internal | |
| One (Set a) | |
| type Item (Set a) | |
Defined in Data.Set.Internal | |
| type OneItem (Set a) | |
Defined in Relude.Container.One | |
a variant of deepseq that is useful in some circumstances:
force x = x `deepseq` x
force x fully evaluates x, and then returns it. Note that
force x only performs evaluation when the value of force x
itself is demanded, so essentially it turns shallow evaluation into
deep evaluation.
force can be conveniently used in combination with ViewPatterns:
{-# LANGUAGE BangPatterns, ViewPatterns #-}
import Control.DeepSeq
someFun :: ComplexData -> SomeResult
someFun (force -> !arg) = {- 'arg' will be fully evaluated -}Another useful application is to combine force with
evaluate in order to force deep evaluation
relative to other IO operations:
import Control.Exception (evaluate)
import Control.DeepSeq
main = do
result <- evaluate $ force $ pureComputation
{- 'result' will be fully evaluated at this point -}
return ()Finally, here's an exception safe variant of the readFile' example:
readFile' :: FilePath -> IO String
readFile' fn = bracket (openFile fn ReadMode) hClose $ \h ->
evaluate . force =<< hGetContents hSince: deepseq-1.2.0.0
($!!) :: NFData a => (a -> b) -> a -> b infixr 0 #
the deep analogue of $!. In the expression f $!! x, x is
fully evaluated before the function f is applied to it.
Since: deepseq-1.2.0.0
deepseq :: NFData a => a -> b -> b #
deepseq: fully evaluates the first argument, before returning the
second.
The name deepseq is used to illustrate the relationship to seq:
where seq is shallow in the sense that it only evaluates the top
level of its argument, deepseq traverses the entire data structure
evaluating it completely.
deepseq can be useful for forcing pending exceptions,
eradicating space leaks, or forcing lazy I/O to happen. It is
also useful in conjunction with parallel Strategies (see the
parallel package).
There is no guarantee about the ordering of evaluation. The
implementation may evaluate the components of the structure in
any order or in parallel. To impose an actual order on
evaluation, use pseq from Control.Parallel in the
parallel package.
Since: deepseq-1.1.0.0
A class of types that can be fully evaluated.
Since: deepseq-1.1.0.0
Minimal complete definition
Nothing
Methods
rnf should reduce its argument to normal form (that is, fully
evaluate all sub-components), and then return ().
Generic NFData deriving
Starting with GHC 7.2, you can automatically derive instances
for types possessing a Generic instance.
Note: Generic1 can be auto-derived starting with GHC 7.4
{-# LANGUAGE DeriveGeneric #-}
import GHC.Generics (Generic, Generic1)
import Control.DeepSeq
data Foo a = Foo a String
deriving (Eq, Generic, Generic1)
instance NFData a => NFData (Foo a)
instance NFData1 Foo
data Colour = Red | Green | Blue
deriving Generic
instance NFData ColourStarting with GHC 7.10, the example above can be written more
concisely by enabling the new DeriveAnyClass extension:
{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-}
import GHC.Generics (Generic)
import Control.DeepSeq
data Foo a = Foo a String
deriving (Eq, Generic, Generic1, NFData, NFData1)
data Colour = Red | Green | Blue
deriving (Generic, NFData)
Compatibility with previous deepseq versions
Prior to version 1.4.0.0, the default implementation of the rnf
method was defined as
rnfa =seqa ()
However, starting with deepseq-1.4.0.0, the default
implementation is based on DefaultSignatures allowing for
more accurate auto-derived NFData instances. If you need the
previously used exact default rnf method implementation
semantics, use
instance NFData Colour where rnf x = seq x ()
or alternatively
instance NFData Colour where rnf = rwhnf
or
{-# LANGUAGE BangPatterns #-}
instance NFData Colour where rnf !_ = ()Instances
| NFData Bool | |
Defined in Control.DeepSeq | |
| NFData Char | |
Defined in Control.DeepSeq | |
| NFData Double | |
Defined in Control.DeepSeq | |
| NFData Float | |
Defined in Control.DeepSeq | |
| NFData Int | |
Defined in Control.DeepSeq | |
| NFData Int8 | |
Defined in Control.DeepSeq | |
| NFData Int16 | |
Defined in Control.DeepSeq | |
| NFData Int32 | |
Defined in Control.DeepSeq | |
| NFData Int64 | |
Defined in Control.DeepSeq | |
| NFData Integer | |
Defined in Control.DeepSeq | |
| NFData Natural | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData Ordering | |
Defined in Control.DeepSeq | |
| NFData Word | |
Defined in Control.DeepSeq | |
| NFData Word8 | |
Defined in Control.DeepSeq | |
| NFData Word16 | |
Defined in Control.DeepSeq | |
| NFData Word32 | |
Defined in Control.DeepSeq | |
| NFData Word64 | |
Defined in Control.DeepSeq | |
| NFData CallStack | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData () | |
Defined in Control.DeepSeq | |
| NFData TyCon | NOTE: Prior to Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData Void | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData Unique | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData Version | Since: deepseq-1.3.0.0 |
Defined in Control.DeepSeq | |
| NFData ThreadId | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData ExitCode | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData MaskingState | Since: deepseq-1.4.4.0 |
Defined in Control.DeepSeq Methods rnf :: MaskingState -> () # | |
| NFData TypeRep | NOTE: Prior to Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData All | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData Any | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CChar | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CSChar | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CUChar | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CShort | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CUShort | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CInt | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CUInt | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CLong | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CULong | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CLLong | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CULLong | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CBool | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| NFData CFloat | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CDouble | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CPtrdiff | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CSize | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CWchar | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CSigAtomic | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq Methods rnf :: CSigAtomic -> () # | |
| NFData CClock | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CTime | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CUSeconds | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CSUSeconds | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq Methods rnf :: CSUSeconds -> () # | |
| NFData CFile | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CFpos | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CJmpBuf | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CIntPtr | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CUIntPtr | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CIntMax | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData CUIntMax | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData Fingerprint | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq Methods rnf :: Fingerprint -> () # | |
| NFData SrcLoc | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData ShortByteString | |
Defined in Data.ByteString.Short.Internal Methods rnf :: ShortByteString -> () # | |
| NFData ByteString | |
Defined in Data.ByteString.Internal Methods rnf :: ByteString -> () # | |
| NFData IntSet | |
Defined in Data.IntSet.Internal | |
| NFData Doc | |
Defined in Text.PrettyPrint.HughesPJ | |
| NFData TextDetails | |
Defined in Text.PrettyPrint.Annotated.HughesPJ Methods rnf :: TextDetails -> () # | |
| NFData UnicodeException | |
Defined in Data.Text.Encoding.Error Methods rnf :: UnicodeException -> () # | |
| NFData ZonedTime | |
Defined in Data.Time.LocalTime.Internal.ZonedTime | |
| NFData LocalTime | |
Defined in Data.Time.LocalTime.Internal.LocalTime | |
| NFData Scientific | |
Defined in Data.Scientific | |
| NFData JSONPathElement | |
Defined in Data.Aeson.Types.Internal | |
| NFData Value | |
Defined in Data.Aeson.Types.Internal | |
| NFData UUID | |
Defined in Data.UUID.Types.Internal | |
| NFData a => NFData [a] | |
Defined in Control.DeepSeq | |
| NFData a => NFData (Maybe a) | |
Defined in Control.DeepSeq | |
| NFData a => NFData (Ratio a) | |
Defined in Control.DeepSeq | |
| NFData (Ptr a) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData (FunPtr a) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (Complex a) | |
Defined in Control.DeepSeq | |
| NFData a => NFData (Min a) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (Max a) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (First a) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (Last a) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData m => NFData (WrappedMonoid m) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq Methods rnf :: WrappedMonoid m -> () # | |
| NFData a => NFData (Option a) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData (StableName a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq Methods rnf :: StableName a -> () # | |
| NFData a => NFData (ZipList a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (Identity a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData (IORef a) | NOTE: Only strict in the reference and not the referenced value. Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (First a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (Last a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (Dual a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (Sum a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (Product a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (Down a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData (MVar a) | NOTE: Only strict in the reference and not the referenced value. Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (NonEmpty a) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData a => NFData (IntMap a) | |
Defined in Data.IntMap.Internal | |
| NFData a => NFData (SCC a) | |
Defined in Data.Graph | |
| NFData a => NFData (Tree a) | |
| NFData a => NFData (Seq a) | |
Defined in Data.Sequence.Internal | |
| NFData a => NFData (FingerTree a) | |
Defined in Data.Sequence.Internal Methods rnf :: FingerTree a -> () # | |
| NFData a => NFData (Digit a) | |
Defined in Data.Sequence.Internal | |
| NFData a => NFData (Node a) | |
Defined in Data.Sequence.Internal | |
| NFData a => NFData (Elem a) | |
Defined in Data.Sequence.Internal | |
| NFData a => NFData (Set a) | |
Defined in Data.Set.Internal | |
| NFData a => NFData (Doc a) | |
Defined in Text.PrettyPrint.Annotated.HughesPJ | |
| NFData a => NFData (AnnotDetails a) | |
Defined in Text.PrettyPrint.Annotated.HughesPJ Methods rnf :: AnnotDetails a -> () # | |
| NFData a => NFData (HashSet a) | |
Defined in Data.HashSet.Base | |
| NFData a => NFData (Vector a) | |
Defined in Data.Vector | |
| NFData (Vector a) | |
Defined in Data.Vector.Unboxed.Base | |
| NFData (Vector a) | |
Defined in Data.Vector.Storable | |
| NFData (Vector a) | |
Defined in Data.Vector.Primitive | |
| NFData a => NFData (Hashed a) | |
Defined in Data.Hashable.Class | |
| NFData a => NFData (DList a) | |
Defined in Data.DList | |
| NFData a => NFData (IResult a) | |
Defined in Data.Aeson.Types.Internal | |
| NFData a => NFData (Result a) | |
Defined in Data.Aeson.Types.Internal | |
| NFData a => NFData (Doc a) | |
Defined in Text.PrettyPrint.Annotated.WL | |
| NFData a => NFData (SimpleDoc a) | |
Defined in Text.PrettyPrint.Annotated.WL | |
| NFData (a -> b) | This instance is for convenience and consistency with Since: deepseq-1.3.0.0 |
Defined in Control.DeepSeq | |
| (NFData a, NFData b) => NFData (Either a b) | |
Defined in Control.DeepSeq | |
| (NFData a, NFData b) => NFData (a, b) | |
Defined in Control.DeepSeq | |
| (NFData a, NFData b) => NFData (Array a b) | |
Defined in Control.DeepSeq | |
| NFData (Fixed a) | Since: deepseq-1.3.0.0 |
Defined in Control.DeepSeq | |
| (NFData a, NFData b) => NFData (Arg a b) | Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| NFData (Proxy a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData (STRef s a) | NOTE: Only strict in the reference and not the referenced value. Since: deepseq-1.4.2.0 |
Defined in Control.DeepSeq | |
| (NFData k, NFData a) => NFData (Map k a) | |
Defined in Data.Map.Internal | |
| (NFData k, NFData v) => NFData (HashMap k v) | |
Defined in Data.HashMap.Base | |
| NFData (MVector s a) | |
Defined in Data.Vector.Unboxed.Base | |
| (NFData k, NFData v) => NFData (Leaf k v) | |
Defined in Data.HashMap.Base | |
| NFData (Path b t) | |
Defined in Path.Internal | |
| (NFData i, NFData r) => NFData (IResult i r) | |
Defined in Data.Attoparsec.Internal.Types | |
| (NFData a1, NFData a2, NFData a3) => NFData (a1, a2, a3) | |
Defined in Control.DeepSeq | |
| NFData a => NFData (Const a b) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| NFData (a :~: b) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| NFData b => NFData (Tagged s b) | |
Defined in Data.Tagged | |
| (NFData a1, NFData a2, NFData a3, NFData a4) => NFData (a1, a2, a3, a4) | |
Defined in Control.DeepSeq | |
| (NFData1 f, NFData1 g, NFData a) => NFData (Product f g a) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| (NFData1 f, NFData1 g, NFData a) => NFData (Sum f g a) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| NFData (a :~~: b) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| (NFData a1, NFData a2, NFData a3, NFData a4, NFData a5) => NFData (a1, a2, a3, a4, a5) | |
Defined in Control.DeepSeq | |
| (NFData1 f, NFData1 g, NFData a) => NFData (Compose f g a) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| (NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6) => NFData (a1, a2, a3, a4, a5, a6) | |
Defined in Control.DeepSeq | |
| (NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7) => NFData (a1, a2, a3, a4, a5, a6, a7) | |
Defined in Control.DeepSeq | |
| (NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8) => NFData (a1, a2, a3, a4, a5, a6, a7, a8) | |
Defined in Control.DeepSeq | |
| (NFData a1, NFData a2, NFData a3, NFData a4, NFData a5, NFData a6, NFData a7, NFData a8, NFData a9) => NFData (a1, a2, a3, a4, a5, a6, a7, a8, a9) | |
Defined in Control.DeepSeq | |
newtype MaybeT (m :: Type -> Type) a #
The parameterizable maybe monad, obtained by composing an arbitrary
monad with the Maybe monad.
Computations are actions that may produce a value or exit.
The return function yields a computation that produces that
value, while >>= sequences two subcomputations, exiting if either
computation does.
Instances
| MonadTrans MaybeT | |
Defined in Control.Monad.Trans.Maybe | |
| MonadTransDistributive MaybeT | |
Defined in Hedgehog.Internal.Distributive Associated Types type Transformer f MaybeT m | |
| MonadTransControl MaybeT | |
| MonadState s m => MonadState s (MaybeT m) | |
| MonadReader r m => MonadReader r (MaybeT m) | |
| MonadBaseControl b m => MonadBaseControl b (MaybeT m) | |
Defined in Control.Monad.Trans.Control Associated Types type StM (MaybeT m) a | |
| Monad m => Monad (MaybeT m) | |
| Functor m => Functor (MaybeT m) | |
| MonadFix m => MonadFix (MaybeT m) | |
Defined in Control.Monad.Trans.Maybe | |
| Monad m => MonadFail (MaybeT m) | |
Defined in Control.Monad.Trans.Maybe | |
| (Functor m, Monad m) => Applicative (MaybeT m) | |
| Foldable f => Foldable (MaybeT f) | |
Defined in Control.Monad.Trans.Maybe Methods fold :: Monoid m => MaybeT f m -> m # foldMap :: Monoid m => (a -> m) -> MaybeT f a -> m # foldMap' :: Monoid m => (a -> m) -> MaybeT f a -> m # foldr :: (a -> b -> b) -> b -> MaybeT f a -> b # foldr' :: (a -> b -> b) -> b -> MaybeT f a -> b # foldl :: (b -> a -> b) -> b -> MaybeT f a -> b # foldl' :: (b -> a -> b) -> b -> MaybeT f a -> b # foldr1 :: (a -> a -> a) -> MaybeT f a -> a # foldl1 :: (a -> a -> a) -> MaybeT f a -> a # elem :: Eq a => a -> MaybeT f a -> Bool # maximum :: Ord a => MaybeT f a -> a # minimum :: Ord a => MaybeT f a -> a # | |
| Traversable f => Traversable (MaybeT f) | |
Defined in Control.Monad.Trans.Maybe | |
| Contravariant m => Contravariant (MaybeT m) | |
| Eq1 m => Eq1 (MaybeT m) | |
| Ord1 m => Ord1 (MaybeT m) | |
Defined in Control.Monad.Trans.Maybe | |
| Read1 m => Read1 (MaybeT m) | |
Defined in Control.Monad.Trans.Maybe | |
| Show1 m => Show1 (MaybeT m) | |
| MonadZip m => MonadZip (MaybeT m) | |
| MonadIO m => MonadIO (MaybeT m) | |
Defined in Control.Monad.Trans.Maybe | |
| (Functor m, Monad m) => Alternative (MaybeT m) | |
| Monad m => MonadPlus (MaybeT m) | |
| MonadThrow m => MonadThrow (MaybeT m) | Throws exceptions into the base monad. |
Defined in Control.Monad.Catch | |
| MonadCatch m => MonadCatch (MaybeT m) | Catches exceptions from the base monad. |
| MonadMask m => MonadMask (MaybeT m) | Since: exceptions-0.10.0 |
Defined in Control.Monad.Catch | |
| PrimMonad m => PrimMonad (MaybeT m) | |
| MonadGen m => MonadGen (MaybeT m) | |
| MonadTest m => MonadTest (MaybeT m) | |
Defined in Hedgehog.Internal.Property | |
| MonadResource m => MonadResource (MaybeT m) | |
Defined in Control.Monad.Trans.Resource.Internal Methods liftResourceT :: ResourceT IO a -> MaybeT m a | |
| (Eq1 m, Eq a) => Eq (MaybeT m a) | |
| (Ord1 m, Ord a) => Ord (MaybeT m a) | |
Defined in Control.Monad.Trans.Maybe | |
| (Read1 m, Read a) => Read (MaybeT m a) | |
| (Show1 m, Show a) => Show (MaybeT m a) | |
| type StT MaybeT a | |
Defined in Control.Monad.Trans.Control | |
| type Transformer f MaybeT m | |
Defined in Hedgehog.Internal.Distributive | |
| type PrimState (MaybeT m) | |
Defined in Control.Monad.Primitive type PrimState (MaybeT m) = PrimState m | |
| type GenBase (MaybeT m) | |
Defined in Hedgehog.Internal.Gen | |
| type StM (MaybeT m) a | |
Defined in Control.Monad.Trans.Control | |
newtype ExceptT e (m :: Type -> Type) a #
A monad transformer that adds exceptions to other monads.
ExceptT constructs a monad parameterized over two things:
- e - The exception type.
- m - The inner monad.
The return function yields a computation that produces the given
value, while >>= sequences two subcomputations, exiting on the
first exception.
Instances
| MonadState s m => MonadState s (ExceptT e m) | Since: mtl-2.2 |
| MonadReader r m => MonadReader r (ExceptT e m) | Since: mtl-2.2 |
| MonadBaseControl b m => MonadBaseControl b (ExceptT e m) | |
Defined in Control.Monad.Trans.Control Associated Types type StM (ExceptT e m) a | |
| MonadTrans (ExceptT e) | |
Defined in Control.Monad.Trans.Except | |
| MonadTransDistributive (ExceptT x) | |
Defined in Hedgehog.Internal.Distributive Associated Types type Transformer f (ExceptT x) m | |
| MonadTransControl (ExceptT e) | |
| Monad m => Monad (ExceptT e m) | |
| Functor m => Functor (ExceptT e m) | |
| MonadFix m => MonadFix (ExceptT e m) | |
Defined in Control.Monad.Trans.Except | |
| MonadFail m => MonadFail (ExceptT e m) | |
Defined in Control.Monad.Trans.Except | |
| (Functor m, Monad m) => Applicative (ExceptT e m) | |
Defined in Control.Monad.Trans.Except | |
| Foldable f => Foldable (ExceptT e f) | |
Defined in Control.Monad.Trans.Except Methods fold :: Monoid m => ExceptT e f m -> m # foldMap :: Monoid m => (a -> m) -> ExceptT e f a -> m # foldMap' :: Monoid m => (a -> m) -> ExceptT e f a -> m # foldr :: (a -> b -> b) -> b -> ExceptT e f a -> b # foldr' :: (a -> b -> b) -> b -> ExceptT e f a -> b # foldl :: (b -> a -> b) -> b -> ExceptT e f a -> b # foldl' :: (b -> a -> b) -> b -> ExceptT e f a -> b # foldr1 :: (a -> a -> a) -> ExceptT e f a -> a # foldl1 :: (a -> a -> a) -> ExceptT e f a -> a # toList :: ExceptT e f a -> [a] # null :: ExceptT e f a -> Bool # length :: ExceptT e f a -> Int # elem :: Eq a => a -> ExceptT e f a -> Bool # maximum :: Ord a => ExceptT e f a -> a # minimum :: Ord a => ExceptT e f a -> a # | |
| Traversable f => Traversable (ExceptT e f) | |
Defined in Control.Monad.Trans.Except | |
| Contravariant m => Contravariant (ExceptT e m) | |
| (Eq e, Eq1 m) => Eq1 (ExceptT e m) | |
| (Ord e, Ord1 m) => Ord1 (ExceptT e m) | |
Defined in Control.Monad.Trans.Except | |
| (Read e, Read1 m) => Read1 (ExceptT e m) | |
Defined in Control.Monad.Trans.Except Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (ExceptT e m a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [ExceptT e m a] # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (ExceptT e m a) # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [ExceptT e m a] # | |
| (Show e, Show1 m) => Show1 (ExceptT e m) | |
| MonadZip m => MonadZip (ExceptT e m) | |
| MonadIO m => MonadIO (ExceptT e m) | |
Defined in Control.Monad.Trans.Except | |
| (Functor m, Monad m, Monoid e) => Alternative (ExceptT e m) | |
| (Monad m, Monoid e) => MonadPlus (ExceptT e m) | |
| MonadThrow m => MonadThrow (ExceptT e m) | Throws exceptions into the base monad. |
Defined in Control.Monad.Catch | |
| MonadCatch m => MonadCatch (ExceptT e m) | Catches exceptions from the base monad. |
| MonadMask m => MonadMask (ExceptT e m) | Since: exceptions-0.9.0 |
Defined in Control.Monad.Catch Methods mask :: ((forall a. ExceptT e m a -> ExceptT e m a) -> ExceptT e m b) -> ExceptT e m b # uninterruptibleMask :: ((forall a. ExceptT e m a -> ExceptT e m a) -> ExceptT e m b) -> ExceptT e m b # generalBracket :: ExceptT e m a -> (a -> ExitCase b -> ExceptT e m c) -> (a -> ExceptT e m b) -> ExceptT e m (b, c) # | |
| PrimMonad m => PrimMonad (ExceptT e m) | |
| MonadGen m => MonadGen (ExceptT x m) | |
| MonadTest m => MonadTest (ExceptT x m) | |
Defined in Hedgehog.Internal.Property | |
| MonadResource m => MonadResource (ExceptT e m) | |
Defined in Control.Monad.Trans.Resource.Internal Methods liftResourceT :: ResourceT IO a -> ExceptT e m a | |
| (Eq e, Eq1 m, Eq a) => Eq (ExceptT e m a) | |
| (Ord e, Ord1 m, Ord a) => Ord (ExceptT e m a) | |
Defined in Control.Monad.Trans.Except Methods compare :: ExceptT e m a -> ExceptT e m a -> Ordering # (<) :: ExceptT e m a -> ExceptT e m a -> Bool # (<=) :: ExceptT e m a -> ExceptT e m a -> Bool # (>) :: ExceptT e m a -> ExceptT e m a -> Bool # (>=) :: ExceptT e m a -> ExceptT e m a -> Bool # | |
| (Read e, Read1 m, Read a) => Read (ExceptT e m a) | |
| (Show e, Show1 m, Show a) => Show (ExceptT e m a) | |
| type Transformer f (ExceptT x) m | |
Defined in Hedgehog.Internal.Distributive | |
| type StT (ExceptT e) a | |
Defined in Control.Monad.Trans.Control | |
| type PrimState (ExceptT e m) | |
Defined in Control.Monad.Primitive type PrimState (ExceptT e m) = PrimState m | |
| type GenBase (ExceptT x m) | |
Defined in Hedgehog.Internal.Gen | |
| type StM (ExceptT e m) a | |
Defined in Control.Monad.Trans.Control | |
class MonadTrans (t :: (Type -> Type) -> Type -> Type) where #
The class of monad transformers. Instances should satisfy the
following laws, which state that lift is a monad transformation:
Methods
lift :: Monad m => m a -> t m a #
Lift a computation from the argument monad to the constructed monad.
Instances
data IdentityT (f :: k -> Type) (a :: k) #
The trivial monad transformer, which maps a monad to an equivalent monad.
Instances
class Monad m => MonadState s (m :: Type -> Type) | m -> s #
Minimal definition is either both of get and put or just state
Instances
| MonadState s m => MonadState s (ResourceT m) | |
| MonadState s m => MonadState s (TreeT m) | |
| MonadState s m => MonadState s (TestT m) | |
| MonadState s m => MonadState s (PropertyT m) | |
| MonadState s m => MonadState s (GenT m) | |
| MonadState s m => MonadState s (MaybeT m) | |
| MonadState s m => MonadState s (ListT m) | |
| (Monoid w, MonadState s m) => MonadState s (WriterT w m) | |
| (Monoid w, MonadState s m) => MonadState s (WriterT w m) | |
| Monad m => MonadState s (StateT s m) | |
| Monad m => MonadState s (StateT s m) | |
| MonadState s m => MonadState s (ReaderT r m) | |
| MonadState s m => MonadState s (IdentityT m) | |
| MonadState s m => MonadState s (ExceptT e m) | Since: mtl-2.2 |
| (Error e, MonadState s m) => MonadState s (ErrorT e m) | |
| MonadState s m => MonadState s (ContT r m) | |
| (Monad m, Monoid w) => MonadState s (RWST r w s m) | |
| (Monad m, Monoid w) => MonadState s (RWST r w s m) | |
class Monad m => MonadReader r (m :: Type -> Type) | m -> r where #
See examples in Control.Monad.Reader.
Note, the partially applied function type (->) r is a simple reader monad.
See the instance declaration below.
Methods
Arguments
| :: (r -> r) | The function to modify the environment. |
| -> m a |
|
| -> m a |
Executes a computation in a modified environment.
Arguments
| :: (r -> a) | The selector function to apply to the environment. |
| -> m a |
Retrieves a function of the current environment.
Instances
| MonadReader r m => MonadReader r (ResourceT m) | |
| MonadReader r m => MonadReader r (TreeT m) | |
| MonadReader r m => MonadReader r (TestT m) | |
| MonadReader r m => MonadReader r (PropertyT m) | |
| MonadReader r m => MonadReader r (GenT m) | |
| MonadReader r m => MonadReader r (MaybeT m) | |
| MonadReader r m => MonadReader r (ListT m) | |
| (Monoid w, MonadReader r m) => MonadReader r (WriterT w m) | |
| (Monoid w, MonadReader r m) => MonadReader r (WriterT w m) | |
| MonadReader r m => MonadReader r (StateT s m) | |
| MonadReader r m => MonadReader r (StateT s m) | |
| Monad m => MonadReader r (ReaderT r m) | |
| MonadReader r m => MonadReader r (IdentityT m) | |
| MonadReader r m => MonadReader r (ExceptT e m) | Since: mtl-2.2 |
| (Error e, MonadReader r m) => MonadReader r (ErrorT e m) | |
| MonadReader r ((->) r :: Type -> Type) | |
| MonadReader r' m => MonadReader r' (ContT r m) | |
| (Monad m, Monoid w) => MonadReader r (RWST r w s m) | |
| (Monad m, Monoid w) => MonadReader r (RWST r w s m) | |
runExceptT :: ExceptT e m a -> m (Either e a) #
The inverse of ExceptT.
newtype ReaderT r (m :: Type -> Type) a #
The reader monad transformer, which adds a read-only environment to the given monad.
The return function ignores the environment, while >>= passes
the inherited environment to both subcomputations.
Constructors
| ReaderT | |
Fields
| |
Instances
| MonadState s m => MonadState s (ReaderT r m) | |
| Monad m => MonadReader r (ReaderT r m) | |
| MonadBaseControl b m => MonadBaseControl b (ReaderT r m) | |
Defined in Control.Monad.Trans.Control Associated Types type StM (ReaderT r m) a | |
| MonadTrans (ReaderT r) | |
Defined in Control.Monad.Trans.Reader | |
| MonadTransDistributive (ReaderT r) | |
Defined in Hedgehog.Internal.Distributive Associated Types type Transformer f (ReaderT r) m | |
| MonadTransControl (ReaderT r) | |
| Monad m => Monad (ReaderT r m) | |
| Functor m => Functor (ReaderT r m) | |
| MonadFix m => MonadFix (ReaderT r m) | |
Defined in Control.Monad.Trans.Reader | |
| MonadFail m => MonadFail (ReaderT r m) | |
Defined in Control.Monad.Trans.Reader | |
| Applicative m => Applicative (ReaderT r m) | |
Defined in Control.Monad.Trans.Reader | |
| Contravariant m => Contravariant (ReaderT r m) | |
| MonadZip m => MonadZip (ReaderT r m) | |
| MonadIO m => MonadIO (ReaderT r m) | |
Defined in Control.Monad.Trans.Reader | |
| Alternative m => Alternative (ReaderT r m) | |
| MonadPlus m => MonadPlus (ReaderT r m) | |
| MonadThrow m => MonadThrow (ReaderT r m) | |
Defined in Control.Monad.Catch | |
| MonadCatch m => MonadCatch (ReaderT r m) | |
| MonadMask m => MonadMask (ReaderT r m) | |
Defined in Control.Monad.Catch Methods mask :: ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b # uninterruptibleMask :: ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b # generalBracket :: ReaderT r m a -> (a -> ExitCase b -> ReaderT r m c) -> (a -> ReaderT r m b) -> ReaderT r m (b, c) # | |
| PrimMonad m => PrimMonad (ReaderT r m) | |
| MonadGen m => MonadGen (ReaderT r m) | |
| MonadTest m => MonadTest (ReaderT r m) | |
Defined in Hedgehog.Internal.Property | |
| MonadResource m => MonadResource (ReaderT r m) | |
Defined in Control.Monad.Trans.Resource.Internal Methods liftResourceT :: ResourceT IO a -> ReaderT r m a | |
| type Transformer f (ReaderT r) m | |
Defined in Hedgehog.Internal.Distributive | |
| type StT (ReaderT r) a | |
Defined in Control.Monad.Trans.Control type StT (ReaderT r) a = a | |
| type PrimState (ReaderT r m) | |
Defined in Control.Monad.Primitive type PrimState (ReaderT r m) = PrimState m | |
| type GenBase (ReaderT r m) | |
Defined in Hedgehog.Internal.Gen | |
| type StM (ReaderT r m) a | |
Defined in Control.Monad.Trans.Control | |
Arguments
| :: (r' -> r) | The function to modify the environment. |
| -> Reader r a | Computation to run in the modified environment. |
| -> Reader r' a |
Execute a computation in a modified environment
(a specialization of withReaderT).
runReader(withReaderf m) =runReaderm . f
Arguments
| :: forall r' r (m :: Type -> Type) a. (r' -> r) | The function to modify the environment. |
| -> ReaderT r m a | Computation to run in the modified environment. |
| -> ReaderT r' m a |
Execute a computation in a modified environment
(a more general version of local).
runReaderT(withReaderTf m) =runReaderTm . f
newtype StateT s (m :: Type -> Type) a #
A state transformer monad parameterized by:
s- The state.m- The inner monad.
The return function leaves the state unchanged, while >>= uses
the final state of the first computation as the initial state of
the second.
Instances
| Monad m => MonadState s (StateT s m) | |
| MonadReader r m => MonadReader r (StateT s m) | |
| MonadBaseControl b m => MonadBaseControl b (StateT s m) | |
Defined in Control.Monad.Trans.Control Associated Types type StM (StateT s m) a | |
| MonadTrans (StateT s) | |
Defined in Control.Monad.Trans.State.Strict | |
| MonadTransDistributive (StateT s) | |
Defined in Hedgehog.Internal.Distributive Associated Types type Transformer f (StateT s) m | |
| MonadTransControl (StateT s) | |
| Monad m => Monad (StateT s m) | |
| Functor m => Functor (StateT s m) | |
| MonadFix m => MonadFix (StateT s m) | |
Defined in Control.Monad.Trans.State.Strict | |
| MonadFail m => MonadFail (StateT s m) | |
Defined in Control.Monad.Trans.State.Strict | |
| (Functor m, Monad m) => Applicative (StateT s m) | |
Defined in Control.Monad.Trans.State.Strict | |
| Contravariant m => Contravariant (StateT s m) | |
| MonadIO m => MonadIO (StateT s m) | |
Defined in Control.Monad.Trans.State.Strict | |
| (Functor m, MonadPlus m) => Alternative (StateT s m) | |
| MonadPlus m => MonadPlus (StateT s m) | |
| MonadThrow m => MonadThrow (StateT s m) | |
Defined in Control.Monad.Catch | |
| MonadCatch m => MonadCatch (StateT s m) | |
| MonadMask m => MonadMask (StateT s m) | |
Defined in Control.Monad.Catch Methods mask :: ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b # uninterruptibleMask :: ((forall a. StateT s m a -> StateT s m a) -> StateT s m b) -> StateT s m b # generalBracket :: StateT s m a -> (a -> ExitCase b -> StateT s m c) -> (a -> StateT s m b) -> StateT s m (b, c) # | |
| PrimMonad m => PrimMonad (StateT s m) | |
| MonadGen m => MonadGen (StateT r m) | |
| MonadTest m => MonadTest (StateT s m) | |
Defined in Hedgehog.Internal.Property | |
| MonadResource m => MonadResource (StateT s m) | |
Defined in Control.Monad.Trans.Resource.Internal Methods liftResourceT :: ResourceT IO a -> StateT s m a | |
| type Transformer f (StateT s) m | |
Defined in Hedgehog.Internal.Distributive | |
| type StT (StateT s) a | |
Defined in Control.Monad.Trans.Control type StT (StateT s) a = (a, s) | |
| type PrimState (StateT s m) | |
Defined in Control.Monad.Primitive type PrimState (StateT s m) = PrimState m | |
| type GenBase (StateT r m) | |
Defined in Hedgehog.Internal.Gen | |
| type StM (StateT s m) a | |
Defined in Control.Monad.Trans.Control | |
Arguments
| :: State s a | state-passing computation to execute |
| -> s | initial value |
| -> s | final state |
evalStateT :: Monad m => StateT s m a -> s -> m a #
Evaluate a state computation with the given initial state and return the final value, discarding the final state.
evalStateTm s =liftMfst(runStateTm s)
execStateT :: Monad m => StateT s m a -> s -> m s #
Evaluate a state computation with the given initial state and return the final state, discarding the final value.
execStateTm s =liftMsnd(runStateTm s)
modifyTVar' :: TVar a -> (a -> a) -> STM () #
Strict version of modifyTVar.
Since: stm-2.3
tryReadTMVar :: TMVar a -> STM (Maybe a) #
A version of readTMVar which does not retry. Instead it
returns Nothing if no value is available.
Since: stm-2.3
tryPutTMVar :: TMVar a -> a -> STM Bool #
tryTakeTMVar :: TMVar a -> STM (Maybe a) #
A version of takeTMVar that does not retry. The tryTakeTMVar
function returns Nothing if the TMVar was empty, or if
the Just aTMVar was full with contents a. After tryTakeTMVar, the
TMVar is left empty.
newEmptyTMVar :: STM (TMVar a) #
Create a TMVar which is initially empty.
A TMVar is a synchronising variable, used
for communication between concurrent threads. It can be thought of
as a box, which may be empty or full.
decodeUtf8' :: ByteString -> Either UnicodeException Text #
Decode a ByteString containing UTF-8 encoded text.
If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.
decodeUtf8With :: OnDecodeError -> ByteString -> Text #
Decode a ByteString containing UTF-8 encoded text.
NOTE: The replacement character returned by OnDecodeError
MUST be within the BMP plane; surrogate code points will
automatically be remapped to the replacement char U+FFFD
(since 0.11.3.0), whereas code points beyond the BMP will throw an
error (since 1.2.3.1); For earlier versions of text using
those unsupported code points would result in undefined behavior.
A space efficient, packed, unboxed Unicode text type.
Instances
lenientDecode :: OnDecodeError #
Replace an invalid input byte with the Unicode replacement character U+FFFD.
strictDecode :: OnDecodeError #
Throw a UnicodeException if decoding fails.
type OnError a b = String -> Maybe a -> Maybe b #
Function type for handling a coding error. It is supplied with two inputs:
- A
Stringthat describes the error. - The input value that caused the error. If the error arose
because the end of input was reached or could not be identified
precisely, this value will be
Nothing.
If the handler returns a value wrapped with Just, that value will
be used in the output as the replacement for the invalid input. If
it returns Nothing, no value will be used in the output.
Should the handler need to abort processing, it should use error
or throw an exception (preferably a UnicodeException). It may
use the description provided to construct a more helpful error
report.
type OnDecodeError = OnError Word8 Char #
A handler for a decoding error.
data UnicodeException #
An exception type for representing Unicode encoding errors.
Instances
| Eq UnicodeException | |
Defined in Data.Text.Encoding.Error Methods (==) :: UnicodeException -> UnicodeException -> Bool # (/=) :: UnicodeException -> UnicodeException -> Bool # | |
| Show UnicodeException | |
Defined in Data.Text.Encoding.Error Methods showsPrec :: Int -> UnicodeException -> ShowS # show :: UnicodeException -> String # showList :: [UnicodeException] -> ShowS # | |
| Exception UnicodeException | |
Defined in Data.Text.Encoding.Error Methods toException :: UnicodeException -> SomeException # | |
| NFData UnicodeException | |
Defined in Data.Text.Encoding.Error Methods rnf :: UnicodeException -> () # | |
appliedTo :: Applicative f => f a -> f (a -> b) -> f b #
pass :: Applicative f => f () #
guarded :: Alternative f => (a -> Bool) -> a -> f a #
error :: forall (r :: RuntimeRep) (a :: TYPE r) t. (HasCallStack, IsText t) => t -> a #
traceM :: Applicative f => String -> f () #
traceShowId :: Show a => a -> a #
traceShowM :: (Show a, Applicative f) => a -> f () #
evaluateNF :: (NFData a, MonadIO m) => a -> m a #
evaluateNF_ :: (NFData a, MonadIO m) => a -> m () #
evaluateWHNF :: MonadIO m => a -> m a #
evaluateWHNF_ :: MonadIO m => a -> m () #
pattern Exc :: Exception e => e -> SomeException #
bug :: (HasCallStack, Exception e) => e -> a #
appendFileBS :: MonadIO m => FilePath -> ByteString -> m () #
appendFileLBS :: MonadIO m => FilePath -> LByteString -> m () #
appendFileLText :: MonadIO m => FilePath -> LText -> m () #
appendFileText :: MonadIO m => FilePath -> Text -> m () #
readFileBS :: MonadIO m => FilePath -> m ByteString #
readFileLBS :: MonadIO m => FilePath -> m LByteString #
readFileLText :: MonadIO m => FilePath -> m LText #
readFileText :: MonadIO m => FilePath -> m Text #
writeFileBS :: MonadIO m => FilePath -> ByteString -> m () #
writeFileLBS :: MonadIO m => FilePath -> LByteString -> m () #
writeFileLText :: MonadIO m => FilePath -> LText -> m () #
writeFileText :: MonadIO m => FilePath -> Text -> m () #
asumMap :: forall b m f a. (Foldable f, Alternative m) => (a -> m b) -> f a -> m b #
flipfoldl' :: Foldable f => (a -> b -> b) -> b -> f a -> b #
atomically :: MonadIO m => STM a -> m a #
newEmptyMVar :: MonadIO m => m (MVar a) #
newEmptyTMVarIO :: MonadIO m => m (TMVar a) #
newTMVarIO :: MonadIO m => a -> m (TMVar a) #
readTVarIO :: MonadIO m => TVar a -> m a #
tryPutMVar :: MonadIO m => MVar a -> a -> m Bool #
tryReadMVar :: MonadIO m => MVar a -> m (Maybe a) #
tryTakeMVar :: MonadIO m => MVar a -> m (Maybe a) #
exitFailure :: MonadIO m => m a #
exitSuccess :: MonadIO m => m a #
appendFile :: MonadIO m => FilePath -> String -> m () #
atomicModifyIORef :: MonadIO m => IORef a -> (a -> (a, b)) -> m b #
atomicModifyIORef' :: MonadIO m => IORef a -> (a -> (a, b)) -> m b #
atomicModifyIORef'_ :: MonadIO m => IORef a -> (a -> a) -> m () #
atomicModifyIORef_ :: MonadIO m => IORef a -> (a -> a) -> m () #
atomicWriteIORef :: MonadIO m => IORef a -> a -> m () #
modifyIORef :: MonadIO m => IORef a -> (a -> a) -> m () #
modifyIORef' :: MonadIO m => IORef a -> (a -> a) -> m () #
writeIORef :: MonadIO m => IORef a -> a -> m () #
viaNonEmpty :: (NonEmpty a -> b) -> [a] -> Maybe b #
whenNotNull :: Applicative f => [a] -> (NonEmpty a -> f ()) -> f () #
whenNotNullM :: Monad m => m [a] -> (NonEmpty a -> m ()) -> m () #
leftToMaybe :: Either l r -> Maybe l #
maybeToLeft :: r -> Maybe l -> Either l r #
maybeToRight :: l -> Maybe r -> Either l r #
rightToMaybe :: Either l r -> Maybe r #
whenLeft :: Applicative f => a -> Either l r -> (l -> f a) -> f a #
whenLeftM_ :: Monad m => m (Either l r) -> (l -> m ()) -> m () #
whenLeft_ :: Applicative f => Either l r -> (l -> f ()) -> f () #
whenRight :: Applicative f => a -> Either l r -> (r -> f a) -> f a #
whenRightM :: Monad m => a -> m (Either l r) -> (r -> m a) -> m a #
whenRightM_ :: Monad m => m (Either l r) -> (r -> m ()) -> m () #
whenRight_ :: Applicative f => Either l r -> (r -> f ()) -> f () #
whenJust :: Applicative f => Maybe a -> (a -> f ()) -> f () #
whenNothing :: Applicative f => Maybe a -> f a -> f a #
whenNothingM :: Monad m => m (Maybe a) -> m a -> m a #
whenNothingM_ :: Monad m => m (Maybe a) -> m () -> m () #
whenNothing_ :: Applicative f => Maybe a -> f () -> f () #
evaluatingState :: s -> State s a -> a #
evaluatingStateT :: Functor f => s -> StateT s f a -> f a #
executingState :: s -> State s a -> s #
executingStateT :: Functor f => s -> StateT s f a -> f s #
hoistMaybe :: forall (m :: Type -> Type) a. Applicative m => Maybe a -> MaybeT m a #
usingReader :: r -> Reader r a -> a #
usingReaderT :: r -> ReaderT r m a -> m a #
usingState :: s -> State s a -> (a, s) #
usingStateT :: s -> StateT s m a -> m (a, s) #
maybeToMonoid :: Monoid m => Maybe m -> m #
memptyIfFalse :: Monoid m => Bool -> m -> m #
memptyIfTrue :: Monoid m => Bool -> m -> m #
unstableNub :: (Eq a, Hashable a) => [a] -> [a] #
integerToNatural :: Integer -> Maybe Natural #
putBS :: MonadIO m => ByteString -> m () #
putBSLn :: MonadIO m => ByteString -> m () #
putLBS :: MonadIO m => LByteString -> m () #
putLBSLn :: MonadIO m => LByteString -> m () #
putLTextLn :: MonadIO m => LText -> m () #
fromLazy :: LazyStrict l s => l -> s #
fromStrict :: LazyStrict l s => s -> l #
Minimal complete definition
Nothing
Methods
hashWithSalt :: Int -> a -> Int #
Instances
Instances
| One ShortByteString | |
| One ByteString | |
Defined in Relude.Container.One Associated Types type OneItem ByteString # Methods one :: OneItem ByteString -> ByteString # | |
| One ByteString | |
Defined in Relude.Container.One Associated Types type OneItem ByteString # Methods one :: OneItem ByteString -> ByteString # | |
| One IntSet | |
| One Text | |
| One Text | |
| One [a] | |
| One (NonEmpty a) | |
| One (IntMap v) | |
| One (Seq a) | |
| One (Set a) | |
| Hashable a => One (HashSet a) | |
| One (Map k v) | |
| Hashable k => One (HashMap k v) | |
Instances
| type OneItem ShortByteString | |
Defined in Relude.Container.One | |
| type OneItem ByteString | |
Defined in Relude.Container.One | |
| type OneItem ByteString | |
Defined in Relude.Container.One | |
| type OneItem IntSet | |
Defined in Relude.Container.One | |
| type OneItem Text | |
Defined in Relude.Container.One | |
| type OneItem Text | |
Defined in Relude.Container.One | |
| type OneItem [a] | |
Defined in Relude.Container.One type OneItem [a] = a | |
| type OneItem (NonEmpty a) | |
Defined in Relude.Container.One | |
| type OneItem (IntMap v) | |
Defined in Relude.Container.One | |
| type OneItem (Seq a) | |
Defined in Relude.Container.One | |
| type OneItem (Set a) | |
Defined in Relude.Container.One | |
| type OneItem (HashSet a) | |
Defined in Relude.Container.One | |
| type OneItem (Map k v) | |
Defined in Relude.Container.One | |
| type OneItem (HashMap k v) | |
Defined in Relude.Container.One | |
Constructors
| Undefined |
Instances
| Bounded Undefined | |
| Enum Undefined | |
Defined in Relude.Debug Methods succ :: Undefined -> Undefined # pred :: Undefined -> Undefined # fromEnum :: Undefined -> Int # enumFrom :: Undefined -> [Undefined] # enumFromThen :: Undefined -> Undefined -> [Undefined] # enumFromTo :: Undefined -> Undefined -> [Undefined] # enumFromThenTo :: Undefined -> Undefined -> Undefined -> [Undefined] # | |
| Eq Undefined | |
| Data Undefined | |
Defined in Relude.Debug Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Undefined -> c Undefined # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Undefined # toConstr :: Undefined -> Constr # dataTypeOf :: Undefined -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Undefined) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Undefined) # gmapT :: (forall b. Data b => b -> b) -> Undefined -> Undefined # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Undefined -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Undefined -> r # gmapQ :: (forall d. Data d => d -> u) -> Undefined -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Undefined -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Undefined -> m Undefined # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Undefined -> m Undefined # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Undefined -> m Undefined # | |
| Ord Undefined | |
| Read Undefined | |
| Show Undefined | |
| Generic Undefined | |
| type Rep Undefined | |
Constructors
| Bug SomeException CallStack |
Instances
| Show Bug | |
| Exception Bug | |
Defined in Relude.Exception Methods toException :: Bug -> SomeException # fromException :: SomeException -> Maybe Bug # displayException :: Bug -> String # | |
class ConvertUtf8 a b where #
Methods
encodeUtf8 :: a -> b #
decodeUtf8 :: b -> a #
decodeUtf8Strict :: b -> Either UnicodeException a #
Instances
type LByteString = ByteString #
class LazyStrict l s | l -> s, s -> l where #
Instances
Instances
| ToLText String | |
Defined in Relude.String.Conversion | |
| EncodingError ToLText "ShortByteString" "LText" => ToLText ShortByteString | |
Defined in Relude.String.Conversion Methods toLText :: ShortByteString -> LText # | |
| EncodingError ToLText "ByteString" "LText" => ToLText ByteString | |
Defined in Relude.String.Conversion Methods toLText :: ByteString -> LText # | |
| ToLText Text | |
Defined in Relude.String.Conversion | |
| ToLText Text | |
Defined in Relude.String.Conversion | |
| EncodingError ToLText "LByteString" "LText" => ToLText LByteString | |
Defined in Relude.String.Conversion Methods toLText :: LByteString -> LText # | |
Instances
| ToString String | |
Defined in Relude.String.Conversion | |
| EncodingError ToString "ShortByteString" "String" => ToString ShortByteString | |
Defined in Relude.String.Conversion Methods toString :: ShortByteString -> String # | |
| EncodingError ToString "ByteString" "String" => ToString ByteString | |
Defined in Relude.String.Conversion Methods toString :: ByteString -> String # | |
| ToString Text | |
Defined in Relude.String.Conversion | |
| EncodingError ToString "LByteString" "String" => ToString LByteString | |
Defined in Relude.String.Conversion Methods toString :: LByteString -> String # | |
| ToString LText | |
Defined in Relude.String.Conversion | |
Instances
| ToText String | |
Defined in Relude.String.Conversion | |
| EncodingError ToText "ShortByteString" "Text" => ToText ShortByteString | |
Defined in Relude.String.Conversion Methods toText :: ShortByteString -> Text # | |
| EncodingError ToText "ByteString" "Text" => ToText ByteString | |
Defined in Relude.String.Conversion Methods toText :: ByteString -> Text # | |
| ToText Text | |
Defined in Relude.String.Conversion | |
| EncodingError ToText "LByteString" "Text" => ToText LByteString | |
Defined in Relude.String.Conversion Methods toText :: LByteString -> Text # | |
| ToText LText | |
Defined in Relude.String.Conversion | |
Instances
| Eq2 HashMap | |
| Ord2 HashMap | |
Defined in Data.HashMap.Base | |
| Show2 HashMap | |
| Hashable2 HashMap | |
Defined in Data.HashMap.Base | |
| Functor (HashMap k) | |
| Foldable (HashMap k) | |
Defined in Data.HashMap.Base Methods fold :: Monoid m => HashMap k m -> m # foldMap :: Monoid m => (a -> m) -> HashMap k a -> m # foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m # foldr :: (a -> b -> b) -> b -> HashMap k a -> b # foldr' :: (a -> b -> b) -> b -> HashMap k a -> b # foldl :: (b -> a -> b) -> b -> HashMap k a -> b # foldl' :: (b -> a -> b) -> b -> HashMap k a -> b # foldr1 :: (a -> a -> a) -> HashMap k a -> a # foldl1 :: (a -> a -> a) -> HashMap k a -> a # toList :: HashMap k a -> [a] # length :: HashMap k a -> Int # elem :: Eq a => a -> HashMap k a -> Bool # maximum :: Ord a => HashMap k a -> a # minimum :: Ord a => HashMap k a -> a # | |
| Traversable (HashMap k) | |
Defined in Data.HashMap.Base | |
| Eq k => Eq1 (HashMap k) | |
| Ord k => Ord1 (HashMap k) | |
Defined in Data.HashMap.Base | |
| (Eq k, Hashable k, Read k) => Read1 (HashMap k) | |
Defined in Data.HashMap.Base | |
| Show k => Show1 (HashMap k) | |
| Hashable k => Hashable1 (HashMap k) | |
Defined in Data.HashMap.Base | |
| (Eq k, Hashable k) => IsList (HashMap k v) | |
| (Eq k, Eq v) => Eq (HashMap k v) | |
| (Data k, Data v, Eq k, Hashable k) => Data (HashMap k v) | |
Defined in Data.HashMap.Base Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashMap k v -> c (HashMap k v) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashMap k v) # toConstr :: HashMap k v -> Constr # dataTypeOf :: HashMap k v -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashMap k v)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashMap k v)) # gmapT :: (forall b. Data b => b -> b) -> HashMap k v -> HashMap k v # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashMap k v -> r # gmapQ :: (forall d. Data d => d -> u) -> HashMap k v -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HashMap k v -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashMap k v -> m (HashMap k v) # | |
| (Ord k, Ord v) => Ord (HashMap k v) | |
Defined in Data.HashMap.Base | |
| (Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) | |
| (Show k, Show v) => Show (HashMap k v) | |
| (Eq k, Hashable k) => Semigroup (HashMap k v) | |
| (Eq k, Hashable k) => Monoid (HashMap k v) | |
| (NFData k, NFData v) => NFData (HashMap k v) | |
Defined in Data.HashMap.Base | |
| (Hashable k, Hashable v) => Hashable (HashMap k v) | |
Defined in Data.HashMap.Base | |
| Hashable k => One (HashMap k v) | |
| type Item (HashMap k v) | |
Defined in Data.HashMap.Base | |
| type OneItem (HashMap k v) | |
Defined in Relude.Container.One | |
Instances
| Foldable HashSet | |
Defined in Data.HashSet.Base Methods fold :: Monoid m => HashSet m -> m # foldMap :: Monoid m => (a -> m) -> HashSet a -> m # foldMap' :: Monoid m => (a -> m) -> HashSet a -> m # foldr :: (a -> b -> b) -> b -> HashSet a -> b # foldr' :: (a -> b -> b) -> b -> HashSet a -> b # foldl :: (b -> a -> b) -> b -> HashSet a -> b # foldl' :: (b -> a -> b) -> b -> HashSet a -> b # foldr1 :: (a -> a -> a) -> HashSet a -> a # foldl1 :: (a -> a -> a) -> HashSet a -> a # elem :: Eq a => a -> HashSet a -> Bool # maximum :: Ord a => HashSet a -> a # minimum :: Ord a => HashSet a -> a # | |
| Eq1 HashSet | |
| Ord1 HashSet | |
Defined in Data.HashSet.Base | |
| Show1 HashSet | |
| Hashable1 HashSet | |
Defined in Data.HashSet.Base | |
| (Eq a, Hashable a) => IsList (HashSet a) | |
| Eq a => Eq (HashSet a) | |
| (Data a, Eq a, Hashable a) => Data (HashSet a) | |
Defined in Data.HashSet.Base Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashSet a -> c (HashSet a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashSet a) # toConstr :: HashSet a -> Constr # dataTypeOf :: HashSet a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HashSet a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashSet a)) # gmapT :: (forall b. Data b => b -> b) -> HashSet a -> HashSet a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashSet a -> r # gmapQ :: (forall d. Data d => d -> u) -> HashSet a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> HashSet a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashSet a -> m (HashSet a) # | |
| Ord a => Ord (HashSet a) | |
| (Eq a, Hashable a, Read a) => Read (HashSet a) | |
| Show a => Show (HashSet a) | |
| (Hashable a, Eq a) => Semigroup (HashSet a) | |
| (Hashable a, Eq a) => Monoid (HashSet a) | |
| NFData a => NFData (HashSet a) | |
Defined in Data.HashSet.Base | |
| Hashable a => Hashable (HashSet a) | |
Defined in Data.HashSet.Base | |
| Hashable a => One (HashSet a) | |
| type Item (HashSet a) | |
Defined in Data.HashSet.Base | |
| type OneItem (HashSet a) | |
Defined in Relude.Container.One | |