basic-prelude-0.3.10: An enhanced core prelude; a common foundation for alternate preludes.

Safe HaskellNone

CorePrelude

Contents

Synopsis

Standard

Operators

($) :: (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

Functions

not :: Bool -> 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 ()Source

putStrLn :: MonadIO m => Text -> m ()Source

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

seq :: a -> b -> b

Type classes

class Eq a => Ord a where

Methods

compare :: a -> a -> Ordering

(<) :: a -> a -> Bool

(>=) :: a -> a -> Bool

(>) :: a -> a -> Bool

(<=) :: a -> a -> Bool

max :: a -> a -> a

min :: a -> a -> a

Instances

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

Methods

(==) :: a -> a -> Bool

(/=) :: a -> a -> Bool

Instances

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

Methods

minBound :: a

maxBound :: a

Instances

Bounded Bool 
Bounded Char 
Bounded Int 
Bounded Int8 
Bounded Int16 
Bounded Int32 
Bounded Int64 
Bounded Ordering 
Bounded Word 
Bounded Word8 
Bounded Word16 
Bounded Word32 
Bounded Word64 
Bounded () 
Bounded Any 
Bounded All 
Bounded CULong 
Bounded CChar 
Bounded CInt 
Bounded CSize 
Bounded CWchar 
Bounded CUShort 
Bounded CULLong 
Bounded CUIntPtr 
Bounded CUIntMax 
Bounded CUInt 
Bounded CUChar 
Bounded CSigAtomic 
Bounded CShort 
Bounded CSChar 
Bounded CPtrdiff 
Bounded CLong 
Bounded CLLong 
Bounded CIntPtr 
Bounded CIntMax 
Bounded a => Bounded (Sum a) 
Bounded a => Bounded (Product a) 
Bounded a => Bounded (Dual a) 
(Bounded a, Bounded b) => Bounded (a, b) 
(Bounded a, Bounded b, Bounded c) => Bounded (a, b, c) 
(Bounded a, Bounded b, Bounded c, Bounded d) => Bounded (a, b, c, d) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e) => Bounded (a, b, c, d, e) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f) => Bounded (a, b, c, d, e, f) 
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g) => Bounded (a, b, c, d, e, f, g) 
(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) 
(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) 
(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) 
(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) 
(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) 
(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) 
(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) 
(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) 

class Enum a where

Methods

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]

Instances

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

Instances

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

Instances

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

Methods

fmap :: (a -> b) -> f a -> f b

(<$) :: a -> f b -> f a

Instances

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

Methods

(>>=) :: m a -> (a -> m b) -> m b

(>>) :: m a -> m b -> m b

return :: a -> m a

fail :: String -> m a

Instances

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) 

(=<<) :: Monad m => (a -> m b) -> m a -> m b

class IsString a where

Methods

fromString :: String -> a

Numeric type classes

class Num a where

Methods

(+) :: a -> a -> a

(*) :: a -> a -> a

(-) :: a -> a -> a

negate :: a -> a

abs :: a -> a

signum :: a -> a

fromInteger :: Integer -> a

Instances

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

Methods

toRational :: a -> Rational

Instances

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

Methods

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)

toInteger :: a -> Integer

Instances

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

Methods

(/) :: a -> a -> a

recip :: a -> a

fromRational :: Rational -> a

Instances

Fractional Double 
Fractional Float 
Fractional CFloat 
Fractional CDouble 
Integral a => Fractional (Ratio a) 
RealFloat a => Fractional (Complex a) 

class Fractional a => Floating a where

Methods

pi :: a

exp :: a -> a

sqrt :: a -> a

log :: a -> a

(**) :: a -> a -> a

logBase :: a -> a -> a

sin :: a -> a

tan :: a -> a

cos :: a -> a

asin :: a -> a

atan :: a -> a

acos :: a -> a

sinh :: a -> a

tanh :: a -> a

cosh :: a -> a

asinh :: a -> a

atanh :: a -> a

acosh :: a -> a

Instances

Floating Double 
Floating Float 
Floating CFloat 
Floating CDouble 
RealFloat a => Floating (Complex a) 

class (Real a, Fractional a) => RealFrac a where

Methods

properFraction :: Integral b => a -> (b, a)

truncate :: Integral b => a -> b

round :: Integral b => a -> b

ceiling :: Integral b => a -> b

floor :: Integral b => a -> b

Instances

RealFrac Double 
RealFrac Float 
RealFrac CFloat 
RealFrac CDouble 
Integral a => RealFrac (Ratio a) 

class (RealFrac a, Floating a) => RealFloat a where

Methods

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

Instances

Data types

data Maybe a

Constructors

Nothing 
Just a 

Instances

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 Char

Instances

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

Instances

Monad IO 
Functor IO 
Typeable1 IO 
MonadPlus IO 
Applicative IO 
PrimMonad IO 
MonadIO IO 
Alternative IO 
MonadBase IO IO 
MonadBaseControl IO IO 

data Either a b

Constructors

Left a 
Right b 

Instances

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

type LByteString = ByteStringSource

data Text

A space efficient, packed, unboxed Unicode text type.

Instances

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 Data.Set.Set and Data.Map.Map. If you feel a mistake has been made, please feel free to submit improvements.

The original discussion is archived here: could we get a Data instance for Data.Text.Text?

The followup discussion that changed the behavior of Set and Map is archived here: Proposal: Allow gunfold for Data.Map, ...

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

Instances

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.

Instances

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

Instances

Functor IntMap 
Typeable1 IntMap 
Foldable IntMap 
Traversable IntMap 
Eq a => Eq (IntMap a) 
Data a => Data (IntMap a) 
Ord a => Ord (IntMap a) 
Read e => Read (IntMap e) 
Show a => Show (IntMap a) 
Monoid (IntMap a) 
NFData a => NFData (IntMap a) 

data Set a

Instances

Typeable1 Set 
Foldable Set 
Eq a => Eq (Set a) 
(Data a, Ord a) => Data (Set a) 
Ord a => Ord (Set a) 
(Read a, Ord a) => Read (Set a) 
Show a => Show (Set a) 
Ord a => Monoid (Set a) 
NFData a => NFData (Set a) 

data HashSet a

A set of values. A set cannot contain duplicate values.

Instances

Typeable1 HashSet 
Foldable HashSet 
(Hashable a, Eq a) => Eq (HashSet a) 
(Data a, Eq a, Hashable a) => Data (HashSet a) 
(Eq a, Hashable a, Read a) => Read (HashSet a) 
Show a => Show (HashSet a) 
(Hashable a, Eq a) => Monoid (HashSet a) 
NFData a => NFData (HashSet a) 

data Seq a

Instances

Monad Seq 
Functor Seq 
Typeable1 Seq 
MonadPlus Seq 
Foldable Seq 
Traversable Seq 
Eq a => Eq (Seq a) 
Data a => Data (Seq a) 
Ord a => Ord (Seq a) 
Read a => Read (Seq a) 
Show a => Show (Seq a) 
Monoid (Seq a) 
NFData a => NFData (Seq a) 

data Vector a

Boxed vectors, supporting efficient slicing.

Instances

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

Instances

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

Instances

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.

Methods

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 the hashWithSalt 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 the hashWithSalt 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.

hash :: 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.

Instances

Hashable Bool 
Hashable Char 
Hashable Double 
Hashable Float 
Hashable Int 
Hashable Int8 
Hashable Int16 
Hashable Int32 
Hashable Int64 
Hashable Integer 
Hashable Ordering 
Hashable Word 
Hashable Word8 
Hashable Word16 
Hashable Word32 
Hashable Word64 
Hashable () 
Hashable ThreadId 
Hashable ByteString 
Hashable Text 
Hashable ByteString 
Hashable Text 
Hashable TypeRep 
Hashable a => Hashable [a] 
(Integral a, Hashable a) => Hashable (Ratio a) 
Hashable a => Hashable (Maybe a) 
Hashable (StableName a) 
(Hashable a, Hashable b) => Hashable (Either a b) 
(Hashable a1, Hashable a2) => Hashable (a1, a2) 
(Hashable a1, Hashable a2, Hashable a3) => Hashable (a1, a2, a3) 
(Hashable a1, Hashable a2, Hashable a3, Hashable a4) => Hashable (a1, a2, a3, a4) 
(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5) => Hashable (a1, a2, a3, a4, a5) 
(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6) => Hashable (a1, a2, a3, a4, a5, a6) 
(Hashable a1, Hashable a2, Hashable a3, Hashable a4, Hashable a5, Hashable a6, Hashable a7) => Hashable (a1, a2, a3, a4, a5, a6, a7) 

Numbers

type Rational = Ratio Integer

Numeric functions

(^) :: (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

Monoids

class Monoid a where

Methods

mempty :: a

mappend :: a -> a -> a

mconcat :: [a] -> a

Instances

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) 

(<>) :: Monoid m => m -> m -> m

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

mapMaybe :: (a -> Maybe b) -> [a] -> [b]

catMaybes :: [Maybe a] -> [a]

fromMaybe :: a -> Maybe a -> a

isJust :: Maybe a -> Bool

listToMaybe :: [a] -> Maybe a

maybeToList :: Maybe a -> [a]

Either

partitionEithers :: [Either a b] -> ([a], [b])

lefts :: [Either a b] -> [a]

rights :: [Either a b] -> [b]

Ord

on :: (b -> b -> c) -> (a -> b) -> a -> a -> c

comparing :: Ord a => (b -> a) -> b -> b -> Ordering

equating :: Eq a => (b -> a) -> b -> b -> BoolSource

newtype Down a

Constructors

Down a 

Instances

Eq a => Eq (Down a) 
Ord a => Ord (Down a) 

Applicative

class Functor f => Applicative f where

Methods

pure :: a -> f a

(<*>) :: f (a -> b) -> f a -> f b

(*>) :: f a -> f b -> f b

(<*) :: f a -> f b -> f a

Instances

Applicative [] 
Applicative IO 
Applicative STM 
Applicative Maybe 
Applicative Identity 
Applicative Vector 
Applicative ReadPrec 
Applicative ReadP 
Applicative ZipList 
Applicative Id 
Applicative ((->) a) 
Applicative (Either e) 
Monoid a => Applicative ((,) a) 
Applicative (ST s) 
(Functor m, Monad m) => Applicative (MaybeT m) 
Applicative m => Applicative (ListT m) 
Applicative m => Applicative (IdentityT m) 
Arrow a => Applicative (ArrowMonad a) 
Applicative (ST s) 
Monad m => Applicative (WrappedMonad m) 
Monoid m => Applicative (Const m) 
Applicative (State s) 
(Monoid w, Applicative m) => Applicative (WriterT w m) 
(Monoid w, Applicative m) => Applicative (WriterT w m) 
(Functor m, Monad m) => Applicative (ErrorT e m) 
(Functor m, Monad m) => Applicative (ExceptT e m) 
(Functor m, Monad m) => Applicative (StateT s m) 
(Functor m, Monad m) => Applicative (StateT s m) 
Applicative m => Applicative (ReaderT r m) 
Arrow a => Applicative (WrappedArrow a b) 
(Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) 
(Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) 

(<$>) :: Functor f => (a -> b) -> f a -> f b

(<|>) :: Alternative f => forall a. f a -> f a -> f a

Monad

(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c

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:

Methods

liftIO :: IO a -> m a

Lift a computation from the IO monad.

Instances

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) 

liftIO :: MonadIO m => forall a. IO a -> m a

Lift a computation from the IO monad.

Exceptions

class (Typeable e, Show e) => Exception e where

Instances

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

Methods

typeOf :: a -> TypeRep

Instances

Typeable Bool 
Typeable Char 
Typeable Double 
Typeable Float 
Typeable Int 
Typeable Int8 
Typeable Int16 
Typeable Int32 
Typeable Int64 
Typeable Integer 
Typeable Ordering 
Typeable RealWorld 
Typeable Word 
Typeable Word8 
Typeable Word16 
Typeable Word32 
Typeable Word64 
Typeable () 
Typeable ArithException 
Typeable ErrorCall 
Typeable ArrayException 
Typeable AssertionFailed 
Typeable BlockedIndefinitelyOnMVar 
Typeable BlockedIndefinitelyOnSTM 
Typeable Deadlock 
Typeable AsyncException 
Typeable IOException 
Typeable SomeException 
Typeable ThreadId 
Typeable ByteString 
Typeable Text 
Typeable Root 
Typeable FilePath 
Typeable Handle 
Typeable ByteString 
Typeable Text 
Typeable UnicodeException 
Typeable TypeRep 
Typeable TyCon 
Typeable Handle__ 
Typeable CULong 
Typeable CChar 
Typeable IntSet 
Typeable CInt 
Typeable SpecConstrAnnotation 
Typeable CSize 
Typeable ExitCode 
Typeable CWchar 
Typeable CUShort 
Typeable CUSeconds 
Typeable CULLong 
Typeable CUIntPtr 
Typeable CUIntMax 
Typeable CUInt 
Typeable CUChar 
Typeable CTime 
Typeable CSigAtomic 
Typeable CShort 
Typeable CSUSeconds 
Typeable CSChar 
Typeable CPtrdiff 
Typeable CLong 
Typeable CLLong 
Typeable CIntPtr 
Typeable CIntMax 
Typeable CFloat 
Typeable CDouble 
Typeable CClock 
(Typeable1 s, Typeable a) => Typeable (s a) 

throwIO :: (MonadBase IO m, Exception e) => e -> m a

Generalized version of throwIO.

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.

catch

Arguments

:: (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.

catchJust

Arguments

:: (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.

bracket

Arguments

:: 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 in IO.

Note that when your acquire and release computations are of type IO it will be more efficient to write:

liftBaseOp (bracket acquire release)

bracket_

Arguments

:: 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)

bracketOnError

Arguments

:: 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 in IO.

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.

finally

Arguments

:: 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

Instances

Eq FilePath 
Data FilePath 
Ord FilePath 
Show FilePath 
Typeable FilePath 
IsString FilePath 
Arguable FilePath

FilePath is a special case, so that we don't force the user to double-quote their input

Monoid FilePath 
NFData FilePath 

(</>) :: FilePath -> FilePath -> FilePath

An alias for append.

(<.>) :: 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

type String = [Char]

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 the hashWithSalt 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 the hashWithSalt 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.

Print

print :: Show a => a -> IO ()

Command line args