Safe Haskell | None |
---|
- ($) :: (a -> b) -> a -> b
- ($!) :: (a -> b) -> a -> b
- (&&) :: Bool -> Bool -> Bool
- (||) :: Bool -> Bool -> Bool
- (.) :: Category cat => forall b c a. cat b c -> cat a b -> cat a c
- not :: Bool -> Bool
- otherwise :: Bool
- fst :: (a, b) -> a
- snd :: (a, b) -> b
- id :: Category cat => forall a. cat a a
- maybe :: b -> (a -> b) -> Maybe a -> b
- either :: (a -> c) -> (b -> c) -> Either a b -> c
- flip :: (a -> b -> c) -> b -> a -> c
- const :: a -> b -> a
- error :: [Char] -> a
- putStr :: MonadIO m => Text -> m ()
- putStrLn :: MonadIO m => Text -> m ()
- getArgs :: MonadIO m => m [Text]
- odd :: Integral a => a -> Bool
- even :: Integral a => a -> Bool
- uncurry :: (a -> b -> c) -> (a, b) -> c
- curry :: ((a, b) -> c) -> a -> b -> c
- swap :: (a, b) -> (b, a)
- until :: (a -> Bool) -> (a -> a) -> a -> a
- asTypeOf :: a -> a -> a
- undefined :: a
- seq :: a -> b -> b
- class Eq a => Ord a where
- class Eq a where
- 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 Show a
- class Read a
- class Functor f where
- class Monad m where
- (=<<) :: Monad m => (a -> m b) -> m a -> m b
- class IsString a where
- fromString :: String -> a
- class Num a where
- class (Num a, Ord a) => Real a where
- toRational :: a -> Rational
- class (Real a, Enum a) => Integral a where
- class Num a => Fractional a where
- (/) :: a -> a -> a
- recip :: a -> a
- fromRational :: Rational -> a
- class Fractional a => Floating a where
- class (Real a, Fractional a) => RealFrac a where
- 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
- exponent :: a -> Int
- significand :: a -> a
- scaleFloat :: Int -> a -> a
- isNaN :: a -> Bool
- isInfinite :: a -> Bool
- isDenormalized :: a -> Bool
- isNegativeZero :: a -> Bool
- isIEEE :: a -> Bool
- atan2 :: a -> a -> a
- data Maybe a
- data Ordering
- data Bool
- data Char
- data IO a
- data Either a b
- data ByteString
- type LByteString = ByteString
- data Text
- type LText = Text
- data Map k a
- data HashMap k v
- data IntMap a
- data Set a
- data HashSet a
- data IntSet
- data Seq a
- data Vector a
- type UVector = Vector
- class (Vector Vector a, MVector MVector a) => Unbox a
- type SVector = Vector
- class Storable a
- class Hashable a where
- hashWithSalt :: Int -> a -> Int
- hash :: a -> Int
- data Word
- data Word8
- data Word32
- data Word64
- data Int
- data Int32
- data Int64
- data Integer
- type Rational = Ratio Integer
- data Float
- data Double
- (^) :: (Num a, Integral b) => a -> b -> a
- (^^) :: (Fractional a, Integral b) => a -> b -> a
- subtract :: Num a => a -> a -> a
- fromIntegral :: (Integral a, Num b) => a -> b
- realToFrac :: (Real a, Fractional b) => a -> b
- class Monoid a where
- (<>) :: Monoid m => m -> m -> m
- first :: Arrow a => forall b c d. a b c -> a (b, d) (c, d)
- second :: Arrow a => forall b c d. a b c -> a (d, b) (d, c)
- (***) :: Arrow a => forall b c b' c'. a b c -> a b' c' -> a (b, b') (c, c')
- (&&&) :: Arrow a => forall b c c'. a b c -> a b c' -> a b (c, c')
- mapMaybe :: (a -> Maybe b) -> [a] -> [b]
- catMaybes :: [Maybe a] -> [a]
- fromMaybe :: a -> Maybe a -> a
- isJust :: Maybe a -> Bool
- isNothing :: Maybe a -> Bool
- listToMaybe :: [a] -> Maybe a
- maybeToList :: Maybe a -> [a]
- partitionEithers :: [Either a b] -> ([a], [b])
- lefts :: [Either a b] -> [a]
- rights :: [Either a b] -> [b]
- on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
- comparing :: Ord a => (b -> a) -> b -> b -> Ordering
- equating :: Eq a => (b -> a) -> b -> b -> Bool
- newtype Down a = Down a
- class Functor f => Applicative f where
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- (<|>) :: Alternative f => forall a. f a -> f a -> f a
- (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
- lift :: MonadTrans t => forall m a. Monad m => m a -> t m a
- class Monad m => MonadIO m where
- liftIO :: MonadIO m => forall a. IO a -> m a
- class (Typeable e, Show e) => Exception e where
- toException :: e -> SomeException
- fromException :: SomeException -> Maybe e
- class Typeable a where
- typeOf :: a -> TypeRep
- data SomeException
- data IOException
- throwIO :: (MonadBase IO m, Exception e) => e -> m a
- try :: (MonadBaseControl IO m, Exception e) => m a -> m (Either e a)
- tryJust :: (MonadBaseControl IO m, Exception e) => (e -> Maybe b) -> m a -> m (Either b a)
- catch :: (MonadBaseControl IO m, Exception e) => m a -> (e -> m a) -> m a
- catchJust :: (MonadBaseControl IO m, Exception e) => (e -> Maybe b) -> m a -> (b -> m a) -> m a
- handle :: (MonadBaseControl IO m, Exception e) => (e -> m a) -> m a -> m a
- handleJust :: (MonadBaseControl IO m, Exception e) => (e -> Maybe b) -> (b -> m a) -> m a -> m a
- bracket :: MonadBaseControl IO m => m a -> (a -> m b) -> (a -> m c) -> m c
- bracket_ :: MonadBaseControl IO m => m a -> m b -> m c -> m c
- bracketOnError :: MonadBaseControl IO m => m a -> (a -> m b) -> (a -> m c) -> m c
- onException :: MonadBaseControl IO m => m a -> m b -> m a
- finally :: MonadBaseControl IO m => m a -> m b -> m a
- mask :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m b) -> m b
- mask_ :: MonadBaseControl IO m => m a -> m a
- uninterruptibleMask :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m b) -> m b
- uninterruptibleMask_ :: MonadBaseControl IO m => m a -> m a
- data FilePath
- (</>) :: FilePath -> FilePath -> FilePath
- (<.>) :: FilePath -> Text -> FilePath
- hasExtension :: FilePath -> Text -> Bool
- basename :: FilePath -> FilePath
- filename :: FilePath -> FilePath
- directory :: FilePath -> FilePath
- type String = [Char]
- hash :: Hashable a => a -> Int
- hashWithSalt :: Hashable a => Int -> a -> Int
- print :: Show a => a -> IO ()
- readArgs :: (MonadIO m, ArgumentTuple a) => m a
Standard
Operators
($) :: (a -> b) -> a -> b
($!) :: (a -> b) -> a -> b
(.) :: Category cat => forall b c a. cat b c -> cat a b -> cat a c
Functions
fst :: (a, b) -> a
snd :: (a, b) -> b
id :: Category cat => forall a. cat a a
flip :: (a -> b -> c) -> b -> a -> c
const :: a -> b -> a
uncurry :: (a -> b -> c) -> (a, b) -> c
curry :: ((a, b) -> c) -> a -> b -> c
swap :: (a, b) -> (b, a)
asTypeOf :: a -> a -> a
undefined :: a
seq :: a -> b -> b
Type classes
Ord Bool | |
Ord Char | |
Ord Double | |
Ord Float | |
Ord Int | |
Ord Int8 | |
Ord Int16 | |
Ord Int32 | |
Ord Int64 | |
Ord Integer | |
Ord Ordering | |
Ord Word | |
Ord Word8 | |
Ord Word16 | |
Ord Word32 | |
Ord Word64 | |
Ord () | |
Ord ArithException | |
Ord ArrayException | |
Ord AsyncException | |
Ord ThreadId | |
Ord ByteString | |
Ord Text | |
Ord Root | |
Ord FilePath | |
Ord ByteString | |
Ord Text | |
Ord Any | |
Ord All | |
Ord TypeRep | |
Ord TyCon | |
Ord TypeRepKey | |
Ord CULong | |
Ord CChar | |
Ord IntSet | |
Ord CInt | |
Ord ThreadStatus | |
Ord BlockReason | |
Ord Fixity | |
Ord Associativity | |
Ord Arity | |
Ord CSize | |
Ord ExitCode | |
Ord NewlineMode | |
Ord Newline | |
Ord BufferMode | |
Ord CWchar | |
Ord CUShort | |
Ord CUSeconds | |
Ord CULLong | |
Ord CUIntPtr | |
Ord CUIntMax | |
Ord CUInt | |
Ord CUChar | |
Ord CTime | |
Ord CSigAtomic | |
Ord CShort | |
Ord CSUSeconds | |
Ord CSChar | |
Ord CPtrdiff | |
Ord CLong | |
Ord CLLong | |
Ord CIntPtr | |
Ord CIntMax | |
Ord CFloat | |
Ord CDouble | |
Ord CClock | |
Ord a => Ord [a] | |
Integral a => Ord (Ratio a) | |
Ord a => Ord (Maybe a) | |
Ord a => Ord (Identity a) | |
Ord a => Ord (Vector a) | |
(Unbox a, Ord a) => Ord (Vector a) | |
(Storable a, Ord a) => Ord (Vector a) | |
(Prim a, Ord a) => Ord (Vector a) | |
Ord a => Ord (Sum a) | |
Ord a => Ord (Product a) | |
Ord a => Ord (Last a) | |
Ord a => Ord (First a) | |
Ord a => Ord (Dual a) | |
Ord a => Ord (Down a) | |
Ord a => Ord (Set a) | |
Ord a => Ord (IntMap a) | |
Ord a => Ord (ViewR a) | |
Ord a => Ord (ViewL a) | |
Ord a => Ord (Seq a) | |
(Ord a, Ord b) => Ord (Either a b) | |
(Ord a, Ord b) => Ord (a, b) | |
(Ord1 m, Ord a) => Ord (MaybeT m a) | |
(Ord1 m, Ord a) => Ord (ListT m a) | |
(Ord1 f, Ord a) => Ord (IdentityT f a) | |
Ord a => Ord (Stream Id a) | |
(Ord k, Ord v) => Ord (Map k v) | |
(Ord a, Ord b, Ord c) => Ord (a, b, c) | |
(Ord w, Ord1 m, Ord a) => Ord (WriterT w m a) | |
(Ord w, Ord1 m, Ord a) => Ord (WriterT w m a) | |
(Ord e, Ord1 m, Ord a) => Ord (ErrorT e m a) | |
(Ord e, Ord1 m, Ord a) => Ord (ExceptT e m a) | |
(Ord a, Ord b, Ord c, Ord d) => Ord (a, b, c, d) | |
(Ord a, Ord b, Ord c, Ord d, Ord e) => Ord (a, b, c, d, e) | |
(Ord a, Ord b, Ord c, Ord d, Ord e, Ord f) => Ord (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) | |
(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) | |
(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) | |
(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) | |
(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) | |
(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) | |
(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) | |
(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) | |
(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) |
class Eq a where
Eq Bool | |
Eq Char | |
Eq Double | |
Eq Float | |
Eq Int | |
Eq Int8 | |
Eq Int16 | |
Eq Int32 | |
Eq Int64 | |
Eq Integer | |
Eq Ordering | |
Eq Word | |
Eq Word8 | |
Eq Word16 | |
Eq Word32 | |
Eq Word64 | |
Eq () | |
Eq ArithException | |
Eq MaskingState | |
Eq ArrayException | |
Eq AsyncException | |
Eq IOException | |
Eq ThreadId | |
Eq ByteString | |
Eq Text | |
Eq Root | |
Eq FilePath | |
Eq Handle | |
Eq CodePoint | |
Eq DecoderState | |
Eq ByteString | |
Eq Text | |
Eq UnicodeException | |
Eq Any | |
Eq All | |
Eq TypeRep | |
Eq TyCon | |
Eq TypeRepKey | |
Eq CULong | |
Eq CChar | |
Eq IntSet | |
Eq CInt | |
Eq IOErrorType | |
Eq SpecConstrAnnotation | |
Eq ThreadStatus | |
Eq BlockReason | |
Eq Fixity | |
Eq Associativity | |
Eq Arity | |
Eq CSize | |
Eq ExitCode | |
Eq NewlineMode | |
Eq Newline | |
Eq BufferMode | |
Eq CWchar | |
Eq CUShort | |
Eq CUSeconds | |
Eq CULLong | |
Eq CUIntPtr | |
Eq CUIntMax | |
Eq CUInt | |
Eq CUChar | |
Eq CTime | |
Eq CSigAtomic | |
Eq CShort | |
Eq CSUSeconds | |
Eq CSChar | |
Eq CPtrdiff | |
Eq CLong | |
Eq CLLong | |
Eq CIntPtr | |
Eq CIntMax | |
Eq CFloat | |
Eq CDouble | |
Eq CClock | |
Eq a => Eq [a] | |
Eq a => Eq (Ratio a) | |
Eq (TVar a) | |
Eq a => Eq (Maybe a) | |
Eq a => Eq (Identity a) | |
(Hashable a, Eq a) => Eq (HashSet a) | |
Eq a => Eq (Vector a) | |
(Unbox a, Eq a) => Eq (Vector a) | |
(Storable a, Eq a) => Eq (Vector a) | |
(Prim a, Eq a) => Eq (Vector a) | |
Eq a => Eq (Sum a) | |
Eq a => Eq (Product a) | |
Eq a => Eq (Last a) | |
Eq a => Eq (First a) | |
Eq a => Eq (Dual a) | |
Eq a => Eq (Down a) | |
Eq a => Eq (Set a) | |
Eq a => Eq (IntMap a) | |
Eq a => Eq (ViewR a) | |
Eq a => Eq (ViewL a) | |
Eq a => Eq (Seq a) | |
Eq a => Eq (Complex a) | |
(Eq a, Eq b) => Eq (Either a b) | |
(Eq a, Eq b) => Eq (a, b) | |
Eq (m a) => Eq (NonGreedy m a) | |
(Eq a, Eq b) => Eq (:& a b) | |
(Eq1 m, Eq a) => Eq (MaybeT m a) | |
(Eq1 m, Eq a) => Eq (ListT m a) | |
(Eq1 f, Eq a) => Eq (IdentityT f a) | |
(Eq k, Eq v) => Eq (Leaf k v) | |
(Eq k, Eq v) => Eq (HashMap k v) | |
Eq a => Eq (Stream Id a) | |
(Eq k, Eq a) => Eq (Map k a) | |
(Eq a, Eq b, Eq c) => Eq (a, b, c) | |
(Eq w, Eq1 m, Eq a) => Eq (WriterT w m a) | |
(Eq w, Eq1 m, Eq a) => Eq (WriterT w m a) | |
(Eq e, Eq1 m, Eq a) => Eq (ErrorT e m a) | |
(Eq e, Eq1 m, Eq a) => Eq (ExceptT e m a) | |
(Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) | |
(Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e) | |
(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 Bounded a where
class Enum a where
succ :: a -> a
pred :: a -> a
enumFrom :: a -> [a]
enumFromThen :: a -> a -> [a]
enumFromTo :: a -> a -> [a]
enumFromThenTo :: a -> a -> a -> [a]
Enum Bool | |
Enum Char | |
Enum Double | |
Enum Float | |
Enum Int | |
Enum Int8 | |
Enum Int16 | |
Enum Int32 | |
Enum Int64 | |
Enum Integer | |
Enum Ordering | |
Enum Word | |
Enum Word8 | |
Enum Word16 | |
Enum Word32 | |
Enum Word64 | |
Enum () | |
Enum CULong | |
Enum CChar | |
Enum CInt | |
Enum CSize | |
Enum CWchar | |
Enum CUShort | |
Enum CUSeconds | |
Enum CULLong | |
Enum CUIntPtr | |
Enum CUIntMax | |
Enum CUInt | |
Enum CUChar | |
Enum CTime | |
Enum CSigAtomic | |
Enum CShort | |
Enum CSUSeconds | |
Enum CSChar | |
Enum CPtrdiff | |
Enum CLong | |
Enum CLLong | |
Enum CIntPtr | |
Enum CIntMax | |
Enum CFloat | |
Enum CDouble | |
Enum CClock | |
Integral a => Enum (Ratio a) |
class Show a
Show Bool | |
Show Char | |
Show Double | |
Show Float | |
Show Int | |
Show Int8 | |
Show Int16 | |
Show Int32 | |
Show Int64 | |
Show Integer | |
Show Ordering | |
Show Word | |
Show Word8 | |
Show Word16 | |
Show Word32 | |
Show Word64 | |
Show () | |
Show ArithException | |
Show ErrorCall | |
Show MaskingState | |
Show ArrayException | |
Show AssertionFailed | |
Show BlockedIndefinitelyOnMVar | |
Show BlockedIndefinitelyOnSTM | |
Show Deadlock | |
Show AsyncException | |
Show IOException | |
Show SomeException | |
Show ThreadId | |
Show ByteString | |
Show Text | |
Show Root | |
Show FilePath | |
Show Handle | |
Show CodePoint | |
Show DecoderState | |
Show ByteString | |
Show Text | |
Show Decoding | |
Show UnicodeException | |
Show Any | |
Show All | |
Show TypeRep | |
Show TyCon | |
Show CULong | |
Show CChar | |
Show IntSet | |
Show CInt | |
Show IOErrorType | |
Show ThreadStatus | |
Show BlockReason | |
Show Fixity | |
Show Associativity | |
Show Arity | |
Show CSize | |
Show ExitCode | |
Show NewlineMode | |
Show Newline | |
Show BufferMode | |
Show HandleType | |
Show CWchar | |
Show CUShort | |
Show CUSeconds | |
Show CULLong | |
Show CUIntPtr | |
Show CUIntMax | |
Show CUInt | |
Show CUChar | |
Show CTime | |
Show CSigAtomic | |
Show CShort | |
Show CSUSeconds | |
Show CSChar | |
Show CPtrdiff | |
Show CLong | |
Show CLLong | |
Show CIntPtr | |
Show CIntMax | |
Show CFloat | |
Show CDouble | |
Show CClock | |
Show a => Show [a] | |
(Integral a, Show a) => Show (Ratio a) | |
Show (Rules a) | |
Show a => Show (Maybe a) | |
Show a => Show (Identity a) | |
Show a => Show (HashSet a) | |
Show a => Show (Vector a) | |
(Show a, Unbox a) => Show (Vector a) | |
(Show a, Storable a) => Show (Vector a) | |
(Show a, Prim a) => Show (Vector a) | |
Show a => Show (Sum a) | |
Show a => Show (Product a) | |
Show a => Show (Last a) | |
Show a => Show (First a) | |
Show a => Show (Dual a) | |
Show a => Show (Set a) | |
Show a => Show (IntMap a) | |
Show a => Show (ViewR a) | |
Show a => Show (ViewL a) | |
Show a => Show (Seq a) | |
Show a => Show (Complex a) | |
(Show a, Show b) => Show (Either a b) | |
(Show a, Show b) => Show (a, b) | |
Show (m a) => Show (NonGreedy m a) | |
(Show a, Show b) => Show (:& a b) | |
Show (ST s a) | |
(Show1 m, Show a) => Show (MaybeT m a) | |
(Show1 m, Show a) => Show (ListT m a) | |
(Show1 f, Show a) => Show (IdentityT f a) | |
(Show k, Show v) => Show (HashMap k v) | |
(Show k, Show a) => Show (Map k a) | |
(Show a, Show b, Show c) => Show (a, b, c) | |
(Show w, Show1 m, Show a) => Show (WriterT w m a) | |
(Show w, Show1 m, Show a) => Show (WriterT w m a) | |
(Show e, Show1 m, Show a) => Show (ErrorT e m a) | |
(Show e, Show1 m, Show a) => Show (ExceptT e m a) | |
(Show a, Show b, Show c, Show d) => Show (a, b, c, d) | |
(Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e) | |
(Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f) | |
(Show a, Show b, Show c, Show d, Show e, Show f, Show g) => Show (a, b, c, d, e, f, g) | |
(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) | |
(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) | |
(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) | |
(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) | |
(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) | |
(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) | |
(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) | |
(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) |
class Read a
Read Bool | |
Read Char | |
Read Double | |
Read Float | |
Read Int | |
Read Int8 | |
Read Int16 | |
Read Int32 | |
Read Int64 | |
Read Integer | |
Read Ordering | |
Read Word | |
Read Word8 | |
Read Word16 | |
Read Word32 | |
Read Word64 | |
Read () | |
Read ByteString | |
Read Text | |
Read ByteString | |
Read Text | |
Read Any | |
Read All | |
Read Lexeme | |
Read CULong | |
Read CChar | |
Read IntSet | |
Read CInt | |
Read Fixity | |
Read Associativity | |
Read Arity | |
Read CSize | |
Read ExitCode | |
Read NewlineMode | |
Read Newline | |
Read BufferMode | |
Read CWchar | |
Read CUShort | |
Read CUSeconds | |
Read CULLong | |
Read CUIntPtr | |
Read CUIntMax | |
Read CUInt | |
Read CUChar | |
Read CTime | |
Read CSigAtomic | |
Read CShort | |
Read CSUSeconds | |
Read CSChar | |
Read CPtrdiff | |
Read CLong | |
Read CLLong | |
Read CIntPtr | |
Read CIntMax | |
Read CFloat | |
Read CDouble | |
Read CClock | |
Read a => Read [a] | |
(Integral a, Read a) => Read (Ratio a) | |
Read a => Read (Maybe a) | |
Read a => Read (Identity a) | |
(Eq a, Hashable a, Read a) => Read (HashSet a) | |
Read a => Read (Vector a) | |
(Read a, Unbox a) => Read (Vector a) | |
(Read a, Storable a) => Read (Vector a) | |
(Read a, Prim a) => Read (Vector a) | |
Read a => Read (Sum a) | |
Read a => Read (Product a) | |
Read a => Read (Last a) | |
Read a => Read (First a) | |
Read a => Read (Dual a) | |
(Read a, Ord a) => Read (Set a) | |
Read e => Read (IntMap e) | |
Read a => Read (ViewR a) | |
Read a => Read (ViewL a) | |
Read a => Read (Seq a) | |
Read a => Read (Complex a) | |
(Read a, Read b) => Read (Either a b) | |
(Read a, Read b) => Read (a, b) | |
(Read1 m, Read a) => Read (MaybeT m a) | |
(Read1 m, Read a) => Read (ListT m a) | |
(Read1 f, Read a) => Read (IdentityT f a) | |
(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) | |
(Ord k, Read k, Read e) => Read (Map k e) | |
(Ix a, Read a, Read b) => Read (Array a b) | |
(Read a, Read b, Read c) => Read (a, b, c) | |
(Read w, Read1 m, Read a) => Read (WriterT w m a) | |
(Read w, Read1 m, Read a) => Read (WriterT w m a) | |
(Read e, Read1 m, Read a) => Read (ErrorT e m a) | |
(Read e, Read1 m, Read a) => Read (ExceptT e m a) | |
(Read a, Read b, Read c, Read d) => Read (a, b, c, d) | |
(Read a, Read b, Read c, Read d, Read e) => Read (a, b, c, d, e) | |
(Read a, Read b, Read c, Read d, Read e, Read f) => Read (a, b, c, d, e, f) | |
(Read a, Read b, Read c, Read d, Read e, Read f, Read g) => Read (a, b, c, d, e, f, g) | |
(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) | |
(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) | |
(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) | |
(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) | |
(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) | |
(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) | |
(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) | |
(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) |
class Functor f where
Functor [] | |
Functor IO | |
Functor Handler | |
Functor STM | |
Functor Maybe | |
Functor Identity | |
Functor Vector | |
Functor ReadP | |
Functor ZipList | |
Functor IntMap | |
Functor Node | |
Functor Digit | |
Functor FingerTree | |
Functor Elem | |
Functor Id | |
Functor ViewR | |
Functor ViewL | |
Functor Seq | |
Functor ((->) r) | |
Functor (Either a) | |
Functor ((,) a) | |
Functor (ST s) | |
Functor m => Functor (MaybeT m) | |
Functor m => Functor (ListT m) | |
Functor m => Functor (IdentityT m) | |
Functor (HashMap k) | |
Arrow a => Functor (ArrowMonad a) | |
Functor (ST s) | |
Monad m => Functor (WrappedMonad m) | |
Functor (Const m) | |
Functor (Map k) | |
Functor (State s) | |
Functor m => Functor (WriterT w m) | |
Functor m => Functor (WriterT w m) | |
Functor m => Functor (ErrorT e m) | |
Functor m => Functor (ExceptT e m) | |
Functor m => Functor (StateT s m) | |
Functor m => Functor (StateT s m) | |
Functor m => Functor (ReaderT r m) | |
Arrow a => Functor (WrappedArrow a b) | |
Functor m => Functor (RWST r w s m) | |
Functor m => Functor (RWST r w s m) |
class Monad m where
Monad [] | |
Monad IO | |
Monad STM | |
Monad Maybe | |
Monad Identity | |
Monad Vector | |
Monad ReadP | |
Monad P | |
Monad Id | |
Monad Seq | |
Monad ((->) r) | |
Monad (Either e) | |
Monad (ST s) | |
Monad m => Monad (MaybeT m) | |
Monad m => Monad (ListT m) | |
Monad m => Monad (IdentityT m) | |
ArrowApply a => Monad (ArrowMonad a) | |
Monad (ST s) | |
Monad (State s) | |
(Monoid w, Monad m) => Monad (WriterT w m) | |
(Monoid w, Monad m) => Monad (WriterT w m) | |
(Monad m, Error e) => Monad (ErrorT e m) | |
Monad m => Monad (ExceptT e m) | |
Monad m => Monad (StateT s m) | |
Monad m => Monad (StateT s m) | |
Monad m => Monad (ReaderT r m) | |
(Monoid w, Monad m) => Monad (RWST r w s m) | |
(Monoid w, Monad m) => Monad (RWST r w s m) |
class IsString a where
fromString :: String -> a
Numeric type classes
class Num a where
(+) :: a -> a -> a
(*) :: a -> a -> a
(-) :: a -> a -> a
negate :: a -> a
abs :: a -> a
signum :: a -> a
fromInteger :: Integer -> a
Num Double | |
Num Float | |
Num Int | |
Num Int8 | |
Num Int16 | |
Num Int32 | |
Num Int64 | |
Num Integer | |
Num Word | |
Num Word8 | |
Num Word16 | |
Num Word32 | |
Num Word64 | |
Num CodePoint | |
Num DecoderState | |
Num CULong | |
Num CChar | |
Num CInt | |
Num CSize | |
Num CWchar | |
Num CUShort | |
Num CUSeconds | |
Num CULLong | |
Num CUIntPtr | |
Num CUIntMax | |
Num CUInt | |
Num CUChar | |
Num CTime | |
Num CSigAtomic | |
Num CShort | |
Num CSUSeconds | |
Num CSChar | |
Num CPtrdiff | |
Num CLong | |
Num CLLong | |
Num CIntPtr | |
Num CIntMax | |
Num CFloat | |
Num CDouble | |
Num CClock | |
Integral a => Num (Ratio a) | |
RealFloat a => Num (Complex a) |
class (Num a, Ord a) => Real a where
toRational :: a -> Rational
Real Double | |
Real Float | |
Real Int | |
Real Int8 | |
Real Int16 | |
Real Int32 | |
Real Int64 | |
Real Integer | |
Real Word | |
Real Word8 | |
Real Word16 | |
Real Word32 | |
Real Word64 | |
Real CULong | |
Real CChar | |
Real CInt | |
Real CSize | |
Real CWchar | |
Real CUShort | |
Real CUSeconds | |
Real CULLong | |
Real CUIntPtr | |
Real CUIntMax | |
Real CUInt | |
Real CUChar | |
Real CTime | |
Real CSigAtomic | |
Real CShort | |
Real CSUSeconds | |
Real CSChar | |
Real CPtrdiff | |
Real CLong | |
Real CLLong | |
Real CIntPtr | |
Real CIntMax | |
Real CFloat | |
Real CDouble | |
Real CClock | |
Integral a => Real (Ratio a) |
class (Real a, Enum a) => Integral a where
quot :: a -> a -> a
rem :: a -> a -> a
div :: a -> a -> a
mod :: a -> a -> a
quotRem :: a -> a -> (a, a)
divMod :: a -> a -> (a, a)
Integral Int | |
Integral Int8 | |
Integral Int16 | |
Integral Int32 | |
Integral Int64 | |
Integral Integer | |
Integral Word | |
Integral Word8 | |
Integral Word16 | |
Integral Word32 | |
Integral Word64 | |
Integral CULong | |
Integral CChar | |
Integral CInt | |
Integral CSize | |
Integral CWchar | |
Integral CUShort | |
Integral CULLong | |
Integral CUIntPtr | |
Integral CUIntMax | |
Integral CUInt | |
Integral CUChar | |
Integral CSigAtomic | |
Integral CShort | |
Integral CSChar | |
Integral CPtrdiff | |
Integral CLong | |
Integral CLLong | |
Integral CIntPtr | |
Integral CIntMax |
class Num a => Fractional a where
Fractional Double | |
Fractional Float | |
Fractional CFloat | |
Fractional CDouble | |
Integral a => Fractional (Ratio a) | |
RealFloat a => Fractional (Complex a) |
class Fractional a => Floating a where
class (Real a, Fractional a) => RealFrac a where
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
significand :: a -> a
scaleFloat :: Int -> a -> a
isInfinite :: a -> Bool
isDenormalized :: a -> Bool
isNegativeZero :: a -> Bool
atan2 :: a -> a -> a
Data types
data Maybe a
Monad Maybe | |
Functor Maybe | |
Typeable1 Maybe | |
MonadPlus Maybe | |
Applicative Maybe | |
Generic1 Maybe | |
Alternative Maybe | |
MonadBase Maybe Maybe | |
MonadBaseControl Maybe Maybe | |
Eq a => Eq (Maybe a) | |
Ord a => Ord (Maybe a) | |
Read a => Read (Maybe a) | |
Show a => Show (Maybe a) | |
Generic (Maybe a) | |
Arguable a => Argument (Maybe a) | use Maybe when it should be parsed from one or zero (greedily) |
Hashable a => Hashable (Maybe a) | |
Monoid a => Monoid (Maybe a) |
data Ordering
data Bool
data Char
Bounded Char | |
Enum Char | |
Eq Char | |
Ord Char | |
Read Char | |
Show Char | |
Typeable Char | |
Generic Char | |
Arguable Char | char is a special case, so that we don't force the user to single-quote their input |
Arguable String | string is a special case, so that we don't force the user to double-quote their input |
Argument String | make sure strings are handled as a separate type, not a list of chars |
Hashable Char | |
ErrorList Char | |
Unbox Char | |
Storable Char | |
Vector Vector Char | |
MVector MVector Char | |
IsString [Char] |
data IO a
data Either a b
Typeable2 Either | |
Monad (Either e) | |
Functor (Either a) | |
Error e => MonadPlus (Either e) | |
Applicative (Either e) | |
Generic1 (Either a) | |
Error e => Alternative (Either e) | |
MonadBase (Either e) (Either e) | |
MonadBaseControl (Either e) (Either e) | |
(Eq a, Eq b) => Eq (Either a b) | |
(Ord a, Ord b) => Ord (Either a b) | |
(Read a, Read b) => Read (Either a b) | |
(Show a, Show b) => Show (Either a b) | |
Generic (Either a b) | |
(Hashable a, Hashable b) => Hashable (Either a b) |
Re-exports
Packed reps
data ByteString
type LByteString = ByteStringSource
data Text
A space efficient, packed, unboxed Unicode text type.
Eq Text | |
Data Text | This instance preserves data abstraction at the cost of inefficiency. We omit reflection services for the sake of data abstraction. This instance was created by copying the updated behavior of
The original discussion is archived here: could we get a Data instance for Data.Text.Text? The followup discussion that changed the behavior of |
Ord Text | |
Read Text | |
Show Text | |
Typeable Text | |
IsString Text | |
Arguable Text | Text is a special case, so that we don't force the user to double-quote their input |
Hashable Text | |
Monoid Text | |
NFData Text |
Containers
data Map k a
Typeable2 Map | |
Functor (Map k) | |
Foldable (Map k) | |
Traversable (Map k) | |
(Eq k, Eq a) => Eq (Map k a) | |
(Data k, Data a, Ord k) => Data (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 => Monoid (Map k v) | |
(NFData k, NFData a) => NFData (Map k a) |
data HashMap k v
A map from keys to values. A map cannot contain duplicate keys; each key can map to at most one value.
Typeable2 HashMap | |
Functor (HashMap k) | |
Foldable (HashMap k) | |
Traversable (HashMap k) | |
(Eq k, Eq v) => Eq (HashMap k v) | |
(Data k, Data v, Eq k, Hashable k) => Data (HashMap k v) | |
(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) | |
(Show k, Show v) => Show (HashMap k v) | |
(Eq k, Hashable k) => Monoid (HashMap k v) | |
(NFData k, NFData v) => NFData (HashMap k v) |
data IntMap a
data Set a
data HashSet a
A set of values. A set cannot contain duplicate values.
data IntSet
data Seq a
data Vector a
Boxed vectors, supporting efficient slicing.
Monad Vector | |
Functor Vector | |
Typeable1 Vector | |
MonadPlus Vector | |
Applicative Vector | |
Foldable Vector | |
Traversable Vector | |
Alternative Vector | |
Vector Vector a | |
Eq a => Eq (Vector a) | |
Data a => Data (Vector a) | |
Ord a => Ord (Vector a) | |
Read a => Read (Vector a) | |
Show a => Show (Vector a) | |
Monoid (Vector a) | |
NFData a => NFData (Vector a) |
class (Vector Vector a, MVector MVector a) => Unbox a
Unbox Bool | |
Unbox Char | |
Unbox Double | |
Unbox Float | |
Unbox Int | |
Unbox Int8 | |
Unbox Int16 | |
Unbox Int32 | |
Unbox Int64 | |
Unbox Word | |
Unbox Word8 | |
Unbox Word16 | |
Unbox Word32 | |
Unbox Word64 | |
Unbox () | |
(RealFloat a, Unbox a) => Unbox (Complex a) | |
(Unbox a, Unbox b) => Unbox (a, b) | |
(Unbox a, Unbox b, Unbox c) => Unbox (a, b, c) | |
(Unbox a, Unbox b, Unbox c, Unbox d) => Unbox (a, b, c, d) | |
(Unbox a, Unbox b, Unbox c, Unbox d, Unbox e) => Unbox (a, b, c, d, e) | |
(Unbox a, Unbox b, Unbox c, Unbox d, Unbox e, Unbox f) => Unbox (a, b, c, d, e, f) |
class Storable a
Storable Bool | |
Storable Char | |
Storable Double | |
Storable Float | |
Storable Int | |
Storable Int8 | |
Storable Int16 | |
Storable Int32 | |
Storable Int64 | |
Storable Word | |
Storable Word8 | |
Storable Word16 | |
Storable Word32 | |
Storable Word64 | |
Storable CodePoint | |
Storable DecoderState | |
Storable Fingerprint | |
Storable CULong | |
Storable CChar | |
Storable CInt | |
Storable CSize | |
Storable CWchar | |
Storable CUShort | |
Storable CUSeconds | |
Storable CULLong | |
Storable CUIntPtr | |
Storable CUIntMax | |
Storable CUInt | |
Storable CUChar | |
Storable CTime | |
Storable CSigAtomic | |
Storable CShort | |
Storable CSUSeconds | |
Storable CSChar | |
Storable CPtrdiff | |
Storable CLong | |
Storable CLLong | |
Storable CIntPtr | |
Storable CIntMax | |
Storable CFloat | |
Storable CDouble | |
Storable CClock | |
Storable (StablePtr a) | |
Storable (Ptr a) | |
Storable (FunPtr a) |
class Hashable a where
The class of types that can be converted to a hash value.
Minimal implementation: hashWithSalt
.
hashWithSalt :: Int -> a -> Int
Return a hash value for the argument, using the given salt.
The general contract of hashWithSalt
is:
- If two values are equal according to the
==
method, then applying thehashWithSalt
method on each of the two values must produce the same integer result if the same salt is used in each case. - It is not required that if two values are unequal
according to the
==
method, then applying thehashWithSalt
method on each of the two values must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal values may improve the performance of hashing-based data structures. - This method can be used to compute different hash values for
the same input by providing a different salt in each
application of the method. This implies that any instance
that defines
hashWithSalt
must make use of the salt in its implementation.
Like hashWithSalt
, but no salt is used. The default
implementation uses hashWithSalt
with some default salt.
Instances might want to implement this method to provide a more
efficient implementation than the default implementation.
Numbers
data Word
data Word8
data Word32
data Word64
data Int
data Int32
data Int64
data Integer
data Float
data Double
Numeric functions
(^^) :: (Fractional a, Integral b) => a -> b -> a
fromIntegral :: (Integral a, Num b) => a -> b
realToFrac :: (Real a, Fractional b) => a -> b
Monoids
class Monoid a where
Monoid Ordering | |
Monoid () | |
Monoid ByteString | |
Monoid Text | |
Monoid FilePath | |
Monoid ByteString | |
Monoid Text | |
Monoid Any | |
Monoid All | |
Monoid IntSet | |
Monoid [a] | |
Monoid a => Monoid (Maybe a) | |
(Hashable a, Eq a) => Monoid (HashSet a) | |
Monoid (Vector a) | |
Unbox a => Monoid (Vector a) | |
Storable a => Monoid (Vector a) | |
Prim a => Monoid (Vector a) | |
Num a => Monoid (Sum a) | |
Num a => Monoid (Product a) | |
Monoid (Last a) | |
Monoid (First a) | |
Monoid (Endo a) | |
Monoid a => Monoid (Dual a) | |
Ord a => Monoid (Set a) | |
Monoid (IntMap a) | |
Monoid (Seq a) | |
Monoid b => Monoid (a -> b) | |
(Monoid a, Monoid b) => Monoid (a, b) | |
(Eq k, Hashable k) => Monoid (HashMap k v) | |
Ord k => Monoid (Map k v) | |
(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c) | |
(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d) | |
(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e) |
Arrow
first :: Arrow a => forall b c d. a b c -> a (b, d) (c, d)
second :: Arrow a => forall b c d. a b c -> a (d, b) (d, c)
(***) :: Arrow a => forall b c b' c'. a b c -> a b' c' -> a (b, b') (c, c')
(&&&) :: Arrow a => forall b c c'. a b c -> a b c' -> a b (c, c')
Maybe
listToMaybe :: [a] -> Maybe a
maybeToList :: Maybe a -> [a]
Either
partitionEithers :: [Either a b] -> ([a], [b])
Ord
on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
Applicative
class Functor f => Applicative f where
(<|>) :: Alternative f => forall a. f a -> f a -> f a
Monad
Transformers
lift :: MonadTrans t => forall m a. Monad m => m a -> t m a
Lift a computation from the argument monad to the constructed monad.
class Monad m => MonadIO m 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:
MonadIO IO | |
MonadIO m => MonadIO (MaybeT m) | |
MonadIO m => MonadIO (ListT m) | |
MonadIO m => MonadIO (IdentityT m) | |
(Monoid w, MonadIO m) => MonadIO (WriterT w m) | |
(Monoid w, MonadIO m) => MonadIO (WriterT w m) | |
(Error e, MonadIO m) => MonadIO (ErrorT e m) | |
MonadIO m => MonadIO (ExceptT e m) | |
MonadIO m => MonadIO (StateT s m) | |
MonadIO m => MonadIO (StateT s m) | |
MonadIO m => MonadIO (ReaderT r m) | |
(Monoid w, MonadIO m) => MonadIO (RWST r w s m) | |
(Monoid w, MonadIO m) => MonadIO (RWST r w s m) |
Exceptions
class (Typeable e, Show e) => Exception e where
toException :: e -> SomeException
fromException :: SomeException -> Maybe e
Exception ArithException | |
Exception ErrorCall | |
Exception ArrayException | |
Exception AssertionFailed | |
Exception BlockedIndefinitelyOnMVar | |
Exception BlockedIndefinitelyOnSTM | |
Exception Deadlock | |
Exception AsyncException | |
Exception IOException | |
Exception SomeException | |
Exception UnicodeException | |
Exception ExitCode |
class Typeable a where
typeOf :: a -> TypeRep
data IOException
try :: (MonadBaseControl IO m, Exception e) => m a -> m (Either e a)
Generalized version of try
.
Note, when the given computation throws an exception any monadic
side effects in m
will be discarded.
tryJust :: (MonadBaseControl IO m, Exception e) => (e -> Maybe b) -> m a -> m (Either b a)
Generalized version of tryJust
.
Note, when the given computation throws an exception any monadic
side effects in m
will be discarded.
:: (MonadBaseControl IO m, Exception e) | |
=> m a | The computation to run |
-> (e -> m a) | Handler to invoke if an exception is raised |
-> m a |
Generalized version of catch
.
Note, when the given computation throws an exception any monadic
side effects in m
will be discarded.
:: (MonadBaseControl IO m, Exception e) | |
=> (e -> Maybe b) | Predicate to select exceptions |
-> m a | Computation to run |
-> (b -> m a) | Handler |
-> m a |
Generalized version of catchJust
.
Note, when the given computation throws an exception any monadic
side effects in m
will be discarded.
handle :: (MonadBaseControl IO m, Exception e) => (e -> m a) -> m a -> m a
Generalized version of handle
.
Note, when the given computation throws an exception any monadic
side effects in m
will be discarded.
handleJust :: (MonadBaseControl IO m, Exception e) => (e -> Maybe b) -> (b -> m a) -> m a -> m a
Generalized version of handleJust
.
Note, when the given computation throws an exception any monadic
side effects in m
will be discarded.
:: MonadBaseControl IO m | |
=> m a | computation to run first ("acquire resource") |
-> (a -> m b) | computation to run last ("release resource") |
-> (a -> m c) | computation to run in-between |
-> m c |
Generalized version of bracket
.
Note:
- When the "acquire" or "release" computations throw exceptions
any monadic side effects in
m
will be discarded. - When the "in-between" computation throws an exception any
monadic side effects in
m
produced by that computation will be discarded but the side effects of the "acquire" or "release" computations will be retained. - Also, any monadic side effects in
m
of the "release" computation will be discarded; it is run only for its side effects inIO
.
Note that when your acquire
and release
computations are of type IO
it will be more efficient to write:
liftBaseOp
(bracket
acquire release)
:: MonadBaseControl IO m | |
=> m a | computation to run first ("acquire resource") |
-> m b | computation to run last ("release resource") |
-> m c | computation to run in-between |
-> m c |
Generalized version of bracket_
.
Note any monadic side effects in m
of both the "acquire" and
"release" computations will be discarded. To keep the monadic
side effects of the "acquire" computation, use bracket
with
constant functions instead.
Note that when your acquire
and release
computations are of type IO
it will be more efficient to write:
liftBaseOp_
(bracket_
acquire release)
:: MonadBaseControl IO m | |
=> m a | computation to run first ("acquire resource") |
-> (a -> m b) | computation to run last ("release resource") |
-> (a -> m c) | computation to run in-between |
-> m c |
Generalized version of bracketOnError
.
Note:
- When the "acquire" or "release" computations throw exceptions
any monadic side effects in
m
will be discarded. - When the "in-between" computation throws an exception any
monadic side effects in
m
produced by that computation will be discarded but the side effects of the "acquire" computation will be retained. - Also, any monadic side effects in
m
of the "release" computation will be discarded; it is run only for its side effects inIO
.
Note that when your acquire
and release
computations are of
type IO
it will be more efficient to write:
liftBaseOp
(bracketOnError
acquire release)
onException :: MonadBaseControl IO m => m a -> m b -> m a
Generalized version of onException
.
Note, any monadic side effects in m
of the "afterward"
computation will be discarded.
:: MonadBaseControl IO m | |
=> m a | computation to run first |
-> m b | computation to run afterward (even if an exception was raised) |
-> m a |
Generalized version of finally
.
Note, any monadic side effects in m
of the "afterward"
computation will be discarded.
mask :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m b) -> m b
Generalized version of mask
.
mask_ :: MonadBaseControl IO m => m a -> m a
Generalized version of mask_
.
uninterruptibleMask :: MonadBaseControl IO m => ((forall a. m a -> m a) -> m b) -> m b
Generalized version of uninterruptibleMask
.
uninterruptibleMask_ :: MonadBaseControl IO m => m a -> m a
Generalized version of uninterruptibleMask_
.
Files
data FilePath
(<.>) :: FilePath -> Text -> FilePath
An alias for addExtension
.
hasExtension :: FilePath -> Text -> Bool
Get whether a FilePath
’s last extension is the predicate.
basename :: FilePath -> FilePath
Retrieve a FilePath
’s basename component.
basename "foo/bar.txt" == "bar"
filename :: FilePath -> FilePath
Retrieve a FilePath
’s filename component.
filename "foo/bar.txt" == "bar.txt"
directory :: FilePath -> FilePath
Retrieves the FilePath
’s directory. If the path is already a
directory, it is returned unchanged.
Strings
Hashing
hash :: Hashable a => a -> Int
Like hashWithSalt
, but no salt is used. The default
implementation uses hashWithSalt
with some default salt.
Instances might want to implement this method to provide a more
efficient implementation than the default implementation.
hashWithSalt :: Hashable a => Int -> a -> Int
Return a hash value for the argument, using the given salt.
The general contract of hashWithSalt
is:
- If two values are equal according to the
==
method, then applying thehashWithSalt
method on each of the two values must produce the same integer result if the same salt is used in each case. - It is not required that if two values are unequal
according to the
==
method, then applying thehashWithSalt
method on each of the two values must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal values may improve the performance of hashing-based data structures. - This method can be used to compute different hash values for
the same input by providing a different salt in each
application of the method. This implies that any instance
that defines
hashWithSalt
must make use of the salt in its implementation.
Command line args
readArgs :: (MonadIO m, ArgumentTuple a) => m aSource