haskell-gi-base-0.26.8: Foundation for libraries generated by haskell-gi
Safe HaskellNone
LanguageHaskell2010

Data.GI.Base.ShortPrelude

Description

The Haskell Prelude exports a number of symbols that can easily collide with functions appearing in bindings. The generated code requires just a small subset of the functions in the Prelude, together with some of the functionality in Data.GI.Base, we reexport this explicitly here.

Synopsis

Documentation

data Char #

The character type Char represents Unicode codespace and its elements are code points as in definitions D9 and D10 of the Unicode Standard.

Character literals in Haskell are single-quoted: 'Q', 'Я' or 'Ω'. To represent a single quote itself use '\'', and to represent a backslash use '\\'. The full grammar can be found in the section 2.6 of the Haskell 2010 Language Report.

To specify a character by its code point one can use decimal, hexadecimal or octal notation: '\65', '\x41' and '\o101' are all alternative forms of 'A'. The largest code point is '\x10ffff'.

There is a special escape syntax for ASCII control characters:

EscapeAlternativesMeaning
'\NUL''\0'null character
'\SOH''\1'start of heading
'\STX''\2'start of text
'\ETX''\3'end of text
'\EOT''\4'end of transmission
'\ENQ''\5'enquiry
'\ACK''\6'acknowledge
'\BEL''\7', '\a'bell (alert)
'\BS''\8', '\b'backspace
'\HT''\9', '\t'horizontal tab
'\LF''\10', '\n'line feed (new line)
'\VT''\11', '\v'vertical tab
'\FF''\12', '\f'form feed
'\CR''\13', '\r'carriage return
'\SO''\14'shift out
'\SI''\15'shift in
'\DLE''\16'data link escape
'\DC1''\17'device control 1
'\DC2''\18'device control 2
'\DC3''\19'device control 3
'\DC4''\20'device control 4
'\NAK''\21'negative acknowledge
'\SYN''\22'synchronous idle
'\ETB''\23'end of transmission block
'\CAN''\24'cancel
'\EM''\25'end of medium
'\SUB''\26'substitute
'\ESC''\27'escape
'\FS''\28'file separator
'\GS''\29'group separator
'\RS''\30'record separator
'\US''\31'unit separator
'\SP''\32', ' 'space
'\DEL''\127'delete

Data.Char provides utilities to work with Char.

Instances

Instances details
IsChar Char

Since: base-2.1

Instance details

Defined in Text.Printf

Methods

toChar :: Char -> Char #

fromChar :: Char -> Char #

PrintfArg Char

Since: base-2.1

Instance details

Defined in Text.Printf

Bounded Char

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Enum Char

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Methods

succ :: Char -> Char #

pred :: Char -> Char #

toEnum :: Int -> Char #

fromEnum :: Char -> Int #

enumFrom :: Char -> [Char] #

enumFromThen :: Char -> Char -> [Char] #

enumFromTo :: Char -> Char -> [Char] #

enumFromThenTo :: Char -> Char -> Char -> [Char] #

Storable Char

@since base-2.01

Instance details

Defined in GHC.Internal.Foreign.Storable

Methods

sizeOf :: Char -> Int #

alignment :: Char -> Int #

peekElemOff :: Ptr Char -> Int -> IO Char #

pokeElemOff :: Ptr Char -> Int -> Char -> IO () #

peekByteOff :: Ptr b -> Int -> IO Char #

pokeByteOff :: Ptr b -> Int -> Char -> IO () #

peek :: Ptr Char -> IO Char #

poke :: Ptr Char -> Char -> IO () #

Show Char

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> Char -> ShowS #

show :: Char -> String #

showList :: [Char] -> ShowS #

Eq Char 
Instance details

Defined in GHC.Classes

Methods

(==) :: Char -> Char -> Bool #

(/=) :: Char -> Char -> Bool #

Ord Char 
Instance details

Defined in GHC.Classes

Methods

compare :: Char -> Char -> Ordering #

(<) :: Char -> Char -> Bool #

(<=) :: Char -> Char -> Bool #

(>) :: Char -> Char -> Bool #

(>=) :: Char -> Char -> Bool #

max :: Char -> Char -> Char #

min :: Char -> Char -> Char #

TestCoercion SChar

@since base-4.18.0.0

Instance details

Defined in GHC.Internal.TypeLits

Methods

testCoercion :: forall (a :: Char) (b :: Char). SChar a -> SChar b -> Maybe (Coercion a b) #

TestEquality SChar

@since base-4.18.0.0

Instance details

Defined in GHC.Internal.TypeLits

Methods

testEquality :: forall (a :: Char) (b :: Char). SChar a -> SChar b -> Maybe (a :~: b) #

Foldable (UChar :: Type -> Type)

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.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 #

toList :: UChar a -> [a] #

null :: UChar a -> Bool #

length :: UChar a -> Int #

elem :: Eq a => a -> UChar a -> Bool #

maximum :: Ord a => UChar a -> a #

minimum :: Ord a => UChar a -> a #

sum :: Num a => UChar a -> a #

product :: Num a => UChar a -> a #

Traversable (UChar :: Type -> Type)

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UChar a -> f (UChar b) #

sequenceA :: Applicative f => UChar (f a) -> f (UChar a) #

mapM :: Monad m => (a -> m b) -> UChar a -> m (UChar b) #

sequence :: Monad m => UChar (m a) -> m (UChar a) #

IsGValue (Maybe String) Source # 
Instance details

Defined in Data.GI.Base.GValue

ord :: Char -> Int #

The fromEnum method restricted to the type Char.

chr :: Int -> Char #

The toEnum method restricted to the type Char.

module Data.Int

data Word8 #

8-bit unsigned integer type

Instances

Instances details
PrintfArg Word8

Since: base-2.1

Instance details

Defined in Text.Printf

Bits Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

FiniteBits Word8

@since base-4.6.0.0

Instance details

Defined in GHC.Internal.Word

Bounded Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Enum Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Storable Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Foreign.Storable

Methods

sizeOf :: Word8 -> Int #

alignment :: Word8 -> Int #

peekElemOff :: Ptr Word8 -> Int -> IO Word8 #

pokeElemOff :: Ptr Word8 -> Int -> Word8 -> IO () #

peekByteOff :: Ptr b -> Int -> IO Word8 #

pokeByteOff :: Ptr b -> Int -> Word8 -> IO () #

peek :: Ptr Word8 -> IO Word8 #

poke :: Ptr Word8 -> Word8 -> IO () #

Ix Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Num Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Integral Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Real Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Methods

toRational :: Word8 -> Rational #

Show Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Methods

showsPrec :: Int -> Word8 -> ShowS #

show :: Word8 -> String #

showList :: [Word8] -> ShowS #

Eq Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Methods

(==) :: Word8 -> Word8 -> Bool #

(/=) :: Word8 -> Word8 -> Bool #

Ord Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Methods

compare :: Word8 -> Word8 -> Ordering #

(<) :: Word8 -> Word8 -> Bool #

(<=) :: Word8 -> Word8 -> Bool #

(>) :: Word8 -> Word8 -> Bool #

(>=) :: Word8 -> Word8 -> Bool #

max :: Word8 -> Word8 -> Word8 #

min :: Word8 -> Word8 -> Word8 #

IsGVariant Word8 Source # 
Instance details

Defined in Data.GI.Base.GVariant

IsGVariantBasicType Word8 Source # 
Instance details

Defined in Data.GI.Base.GVariant

data Word64 #

64-bit unsigned integer type

Instances

Instances details
PrintfArg Word64

Since: base-2.1

Instance details

Defined in Text.Printf

Bits Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

FiniteBits Word64

@since base-4.6.0.0

Instance details

Defined in GHC.Internal.Word

Bounded Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Enum Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Storable Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Foreign.Storable

Ix Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Num Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Integral Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Real Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Show Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Eq Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Methods

(==) :: Word64 -> Word64 -> Bool #

(/=) :: Word64 -> Word64 -> Bool #

Ord Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

IsGValue Word64 Source # 
Instance details

Defined in Data.GI.Base.GValue

IsGVariant Word64 Source # 
Instance details

Defined in Data.GI.Base.GVariant

IsGVariantBasicType Word64 Source # 
Instance details

Defined in Data.GI.Base.GVariant

data Word32 #

32-bit unsigned integer type

Instances

Instances details
PrintfArg Word32

Since: base-2.1

Instance details

Defined in Text.Printf

Bits Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

FiniteBits Word32

@since base-4.6.0.0

Instance details

Defined in GHC.Internal.Word

Bounded Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Enum Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Storable Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Foreign.Storable

Ix Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Num Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Integral Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Real Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Show Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Eq Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Methods

(==) :: Word32 -> Word32 -> Bool #

(/=) :: Word32 -> Word32 -> Bool #

Ord Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

IsGValue Word32 Source # 
Instance details

Defined in Data.GI.Base.GValue

IsGVariant Word32 Source # 
Instance details

Defined in Data.GI.Base.GVariant

IsGVariantBasicType Word32 Source # 
Instance details

Defined in Data.GI.Base.GVariant

data Word16 #

16-bit unsigned integer type

Instances

Instances details
PrintfArg Word16

Since: base-2.1

Instance details

Defined in Text.Printf

Bits Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

FiniteBits Word16

@since base-4.6.0.0

Instance details

Defined in GHC.Internal.Word

Bounded Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Enum Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Storable Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Foreign.Storable

Ix Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Num Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Integral Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Real Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Show Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Eq Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Methods

(==) :: Word16 -> Word16 -> Bool #

(/=) :: Word16 -> Word16 -> Bool #

Ord Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

IsGVariant Word16 Source # 
Instance details

Defined in Data.GI.Base.GVariant

IsGVariantBasicType Word16 Source # 
Instance details

Defined in Data.GI.Base.GVariant

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

Instances details
NFData ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Methods

rnf :: ByteString -> () #

Monoid ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Data ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteString -> c ByteString #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteString #

toConstr :: ByteString -> Constr #

dataTypeOf :: ByteString -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteString) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteString) #

gmapT :: (forall b. Data b => b -> b) -> ByteString -> ByteString #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r #

gmapQ :: (forall d. Data d => d -> u) -> ByteString -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteString -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #

IsString ByteString

Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

Instance details

Defined in Data.ByteString.Internal.Type

IsList ByteString

Since: bytestring-0.10.12.0

Instance details

Defined in Data.ByteString.Internal.Type

Associated Types

type Item ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Read ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Show ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Eq ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Ord ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

IsGVariant ByteString Source # 
Instance details

Defined in Data.GI.Base.GVariant

Lift ByteString

Since: bytestring-0.11.2.0

Instance details

Defined in Data.ByteString.Internal.Type

Methods

lift :: Quote m => ByteString -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => ByteString -> Code m ByteString #

type Item ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

newtype CUIntPtr #

Constructors

CUIntPtr Word64 

Instances

Instances details
Bits CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

FiniteBits CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Storable CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Ix CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Num CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Read CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Integral CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Real CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Eq CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Ord CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

newtype CIntPtr #

Constructors

CIntPtr Int64 

Instances

Instances details
Bits CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

FiniteBits CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Storable CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Ix CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Num CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Read CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Integral CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Real CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Eq CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CIntPtr -> CIntPtr -> Bool #

(/=) :: CIntPtr -> CIntPtr -> Bool #

Ord CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

newtype CDouble #

Haskell type representing the C double type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CDouble Double 

Instances

Instances details
Enum CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Floating CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

RealFloat CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Storable CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Num CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Read CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Fractional CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Real CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

RealFrac CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

properFraction :: Integral b => CDouble -> (b, CDouble) #

truncate :: Integral b => CDouble -> b #

round :: Integral b => CDouble -> b #

ceiling :: Integral b => CDouble -> b #

floor :: Integral b => CDouble -> b #

Show CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Eq CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CDouble -> CDouble -> Bool #

(/=) :: CDouble -> CDouble -> Bool #

Ord CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

newtype CFloat #

Haskell type representing the C float type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CFloat Float 

Instances

Instances details
Enum CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Floating CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

RealFloat CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Storable CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Num CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Read CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Fractional CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Real CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

RealFrac CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

properFraction :: Integral b => CFloat -> (b, CFloat) #

truncate :: Integral b => CFloat -> b #

round :: Integral b => CFloat -> b #

ceiling :: Integral b => CFloat -> b #

floor :: Integral b => CFloat -> b #

Show CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Eq CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CFloat -> CFloat -> Bool #

(/=) :: CFloat -> CFloat -> Bool #

Ord CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

newtype CULong #

Haskell type representing the C unsigned long type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CULong Word64 

Instances

Instances details
Bits CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

FiniteBits CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Storable CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Ix CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Num CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Read CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Integral CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Real CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Eq CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CULong -> CULong -> Bool #

(/=) :: CULong -> CULong -> Bool #

Ord CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

IsGValue CULong Source # 
Instance details

Defined in Data.GI.Base.GValue

newtype CLong #

Haskell type representing the C long type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CLong Int64 

Instances

Instances details
Bits CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

FiniteBits CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Storable CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

sizeOf :: CLong -> Int #

alignment :: CLong -> Int #

peekElemOff :: Ptr CLong -> Int -> IO CLong #

pokeElemOff :: Ptr CLong -> Int -> CLong -> IO () #

peekByteOff :: Ptr b -> Int -> IO CLong #

pokeByteOff :: Ptr b -> Int -> CLong -> IO () #

peek :: Ptr CLong -> IO CLong #

poke :: Ptr CLong -> CLong -> IO () #

Ix CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Num CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Read CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Integral CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Real CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

toRational :: CLong -> Rational #

Show CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

showsPrec :: Int -> CLong -> ShowS #

show :: CLong -> String #

showList :: [CLong] -> ShowS #

Eq CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CLong -> CLong -> Bool #

(/=) :: CLong -> CLong -> Bool #

Ord CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

compare :: CLong -> CLong -> Ordering #

(<) :: CLong -> CLong -> Bool #

(<=) :: CLong -> CLong -> Bool #

(>) :: CLong -> CLong -> Bool #

(>=) :: CLong -> CLong -> Bool #

max :: CLong -> CLong -> CLong #

min :: CLong -> CLong -> CLong #

IsGValue CLong Source # 
Instance details

Defined in Data.GI.Base.GValue

newtype CUInt #

Haskell type representing the C unsigned int type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CUInt Word32 

Instances

Instances details
Bits CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

FiniteBits CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Storable CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

sizeOf :: CUInt -> Int #

alignment :: CUInt -> Int #

peekElemOff :: Ptr CUInt -> Int -> IO CUInt #

pokeElemOff :: Ptr CUInt -> Int -> CUInt -> IO () #

peekByteOff :: Ptr b -> Int -> IO CUInt #

pokeByteOff :: Ptr b -> Int -> CUInt -> IO () #

peek :: Ptr CUInt -> IO CUInt #

poke :: Ptr CUInt -> CUInt -> IO () #

Ix CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Num CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Read CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Integral CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Real CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

toRational :: CUInt -> Rational #

Show CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

showsPrec :: Int -> CUInt -> ShowS #

show :: CUInt -> String #

showList :: [CUInt] -> ShowS #

Eq CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CUInt -> CUInt -> Bool #

(/=) :: CUInt -> CUInt -> Bool #

Ord CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

compare :: CUInt -> CUInt -> Ordering #

(<) :: CUInt -> CUInt -> Bool #

(<=) :: CUInt -> CUInt -> Bool #

(>) :: CUInt -> CUInt -> Bool #

(>=) :: CUInt -> CUInt -> Bool #

max :: CUInt -> CUInt -> CUInt #

min :: CUInt -> CUInt -> CUInt #

IsGValue CUInt Source # 
Instance details

Defined in Data.GI.Base.GValue

newtype CInt #

Haskell type representing the C int type. (The concrete types of Foreign.C.Types are platform-specific.)

Constructors

CInt Int32 

Instances

Instances details
Bits CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

FiniteBits CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Bounded CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

succ :: CInt -> CInt #

pred :: CInt -> CInt #

toEnum :: Int -> CInt #

fromEnum :: CInt -> Int #

enumFrom :: CInt -> [CInt] #

enumFromThen :: CInt -> CInt -> [CInt] #

enumFromTo :: CInt -> CInt -> [CInt] #

enumFromThenTo :: CInt -> CInt -> CInt -> [CInt] #

Storable CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

sizeOf :: CInt -> Int #

alignment :: CInt -> Int #

peekElemOff :: Ptr CInt -> Int -> IO CInt #

pokeElemOff :: Ptr CInt -> Int -> CInt -> IO () #

peekByteOff :: Ptr b -> Int -> IO CInt #

pokeByteOff :: Ptr b -> Int -> CInt -> IO () #

peek :: Ptr CInt -> IO CInt #

poke :: Ptr CInt -> CInt -> IO () #

Ix CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

range :: (CInt, CInt) -> [CInt] #

index :: (CInt, CInt) -> CInt -> Int #

unsafeIndex :: (CInt, CInt) -> CInt -> Int #

inRange :: (CInt, CInt) -> CInt -> Bool #

rangeSize :: (CInt, CInt) -> Int #

unsafeRangeSize :: (CInt, CInt) -> Int #

Num CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(+) :: CInt -> CInt -> CInt #

(-) :: CInt -> CInt -> CInt #

(*) :: CInt -> CInt -> CInt #

negate :: CInt -> CInt #

abs :: CInt -> CInt #

signum :: CInt -> CInt #

fromInteger :: Integer -> CInt #

Read CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Integral CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

quot :: CInt -> CInt -> CInt #

rem :: CInt -> CInt -> CInt #

div :: CInt -> CInt -> CInt #

mod :: CInt -> CInt -> CInt #

quotRem :: CInt -> CInt -> (CInt, CInt) #

divMod :: CInt -> CInt -> (CInt, CInt) #

toInteger :: CInt -> Integer #

Real CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

toRational :: CInt -> Rational #

Show CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

showsPrec :: Int -> CInt -> ShowS #

show :: CInt -> String #

showList :: [CInt] -> ShowS #

Eq CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CInt -> CInt -> Bool #

(/=) :: CInt -> CInt -> Bool #

Ord CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

compare :: CInt -> CInt -> Ordering #

(<) :: CInt -> CInt -> Bool #

(<=) :: CInt -> CInt -> Bool #

(>) :: CInt -> CInt -> Bool #

(>=) :: CInt -> CInt -> Bool #

max :: CInt -> CInt -> CInt #

min :: CInt -> CInt -> CInt #

IsGValue CInt Source # 
Instance details

Defined in Data.GI.Base.GValue

type CString = Ptr CChar #

A C string is a reference to an array of C characters terminated by NUL.

data Ptr a #

A value of type Ptr a represents a pointer to an object, or an array of objects, which may be marshalled to or from Haskell values of type a.

The type a will often be an instance of class Storable which provides the marshalling operations. However this is not essential, and you can provide your own operations to access the pointer. For example you might write small foreign functions to get or set the fields of a C struct.

Instances

Instances details
Foldable (UAddr :: Type -> Type)

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.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 #

toList :: UAddr a -> [a] #

null :: UAddr a -> Bool #

length :: UAddr a -> Int #

elem :: Eq a => a -> UAddr a -> Bool #

maximum :: Ord a => UAddr a -> a #

minimum :: Ord a => UAddr a -> a #

sum :: Num a => UAddr a -> a #

product :: Num a => UAddr a -> a #

Traversable (UAddr :: Type -> Type)

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UAddr a -> f (UAddr b) #

sequenceA :: Applicative f => UAddr (f a) -> f (UAddr a) #

mapM :: Monad m => (a -> m b) -> UAddr a -> m (UAddr b) #

sequence :: Monad m => UAddr (m a) -> m (UAddr a) #

Storable (Ptr a)

@since base-2.01

Instance details

Defined in GHC.Internal.Foreign.Storable

Methods

sizeOf :: Ptr a -> Int #

alignment :: Ptr a -> Int #

peekElemOff :: Ptr (Ptr a) -> Int -> IO (Ptr a) #

pokeElemOff :: Ptr (Ptr a) -> Int -> Ptr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Ptr a) #

pokeByteOff :: Ptr b -> Int -> Ptr a -> IO () #

peek :: Ptr (Ptr a) -> IO (Ptr a) #

poke :: Ptr (Ptr a) -> Ptr a -> IO () #

Show (Ptr a)

@since base-2.01

Instance details

Defined in GHC.Internal.Ptr

Methods

showsPrec :: Int -> Ptr a -> ShowS #

show :: Ptr a -> String #

showList :: [Ptr a] -> ShowS #

Eq (Ptr a)

@since base-2.01

Instance details

Defined in GHC.Internal.Ptr

Methods

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

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

Ord (Ptr a)

@since base-2.01

Instance details

Defined in GHC.Internal.Ptr

Methods

compare :: Ptr a -> Ptr a -> Ordering #

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

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

(>) :: Ptr a -> Ptr a -> Bool #

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

max :: Ptr a -> Ptr a -> Ptr a #

min :: Ptr a -> Ptr a -> Ptr a #

IsGValue (Ptr a) Source # 
Instance details

Defined in Data.GI.Base.GValue

data FunPtr a #

A value of type FunPtr a is a pointer to a function callable from foreign code. The type a will normally be a foreign type, a function type with zero or more arguments where

A value of type FunPtr a may be a pointer to a foreign function, either returned by another foreign function or imported with a a static address import like

foreign import ccall "stdlib.h &free"
  p_free :: FunPtr (Ptr a -> IO ())

or a pointer to a Haskell function created using a wrapper stub declared to produce a FunPtr of the correct type. For example:

type Compare = Int -> Int -> Bool
foreign import ccall "wrapper"
  mkCompare :: Compare -> IO (FunPtr Compare)

Calls to wrapper stubs like mkCompare allocate storage, which should be released with freeHaskellFunPtr when no longer required.

To convert FunPtr values to corresponding Haskell functions, one can define a dynamic stub for the specific foreign type, e.g.

type IntFunction = CInt -> IO ()
foreign import ccall "dynamic"
  mkFun :: FunPtr IntFunction -> IntFunction

Instances

Instances details
Storable (FunPtr a)

@since base-2.01

Instance details

Defined in GHC.Internal.Foreign.Storable

Methods

sizeOf :: FunPtr a -> Int #

alignment :: FunPtr a -> Int #

peekElemOff :: Ptr (FunPtr a) -> Int -> IO (FunPtr a) #

pokeElemOff :: Ptr (FunPtr a) -> Int -> FunPtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (FunPtr a) #

pokeByteOff :: Ptr b -> Int -> FunPtr a -> IO () #

peek :: Ptr (FunPtr a) -> IO (FunPtr a) #

poke :: Ptr (FunPtr a) -> FunPtr a -> IO () #

Show (FunPtr a)

@since base-2.01

Instance details

Defined in GHC.Internal.Ptr

Methods

showsPrec :: Int -> FunPtr a -> ShowS #

show :: FunPtr a -> String #

showList :: [FunPtr a] -> ShowS #

Eq (FunPtr a) 
Instance details

Defined in GHC.Internal.Ptr

Methods

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

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

Ord (FunPtr a) 
Instance details

Defined in GHC.Internal.Ptr

Methods

compare :: FunPtr a -> FunPtr a -> Ordering #

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

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

(>) :: FunPtr a -> FunPtr a -> Bool #

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

max :: FunPtr a -> FunPtr a -> FunPtr a #

min :: FunPtr a -> FunPtr a -> FunPtr a #

nullPtr :: Ptr a #

The constant nullPtr contains a distinguished value of Ptr that is not associated with a valid memory location.

plusPtr :: Ptr a -> Int -> Ptr b #

Advances the given address by the given offset in bytes.

castFunPtrToPtr :: FunPtr a -> Ptr b #

Casts a FunPtr to a Ptr.

Note: this is valid only on architectures where data and function pointers range over the same set of addresses, and should only be used for bindings to external libraries whose interface already relies on this assumption.

castPtrToFunPtr :: Ptr a -> FunPtr b #

Casts a Ptr to a FunPtr.

Note: this is valid only on architectures where data and function pointers range over the same set of addresses, and should only be used for bindings to external libraries whose interface already relies on this assumption.

data ForeignPtr a #

The type ForeignPtr represents references to objects that are maintained in a foreign language, i.e., that are not part of the data structures usually managed by the Haskell storage manager. The essential difference between ForeignPtrs and vanilla memory references of type Ptr a is that the former may be associated with finalizers. A finalizer is a routine that is invoked when the Haskell storage manager detects that - within the Haskell heap and stack - there are no more references left that are pointing to the ForeignPtr. Typically, the finalizer will, then, invoke routines in the foreign language that free the resources bound by the foreign object.

The ForeignPtr is parameterised in the same way as Ptr. The type argument of ForeignPtr should normally be an instance of class Storable.

Instances

Instances details
Show (ForeignPtr a)

@since base-2.01

Instance details

Defined in GHC.Internal.ForeignPtr

Eq (ForeignPtr a)

@since base-2.01

Instance details

Defined in GHC.Internal.ForeignPtr

Methods

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

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

Ord (ForeignPtr a)

@since base-2.01

Instance details

Defined in GHC.Internal.ForeignPtr

sizeOf :: Storable a => a -> Int #

Computes the storage requirements (in bytes) of the argument. The value of the argument is not used.

peek :: Storable a => Ptr a -> IO a #

Read a value from the given memory location.

Note that the peek and poke functions might require properly aligned addresses to function correctly. This is architecture dependent; thus, portable code should ensure that when peeking or poking values of some type a, the alignment constraint for a, as given by the function alignment is fulfilled.

poke :: Storable a => Ptr a -> a -> IO () #

Write the given value to the given memory location. Alignment restrictions might apply; see peek.

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

Expand

Convert from a Maybe Int to a Maybe String using show:

>>> show <$> Nothing
Nothing
>>> show <$> Just 3
Just "3"

Convert from an Either Int Int to an Either Int String using show:

>>> show <$> Left 17
Left 17
>>> show <$> Right 17
Right "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)

onException :: IO a -> IO b -> IO a #

Like finally, but only performs the final action if there was an exception raised by the computation.

clear :: forall info (attr :: Symbol) obj m. (AttrClearC info obj attr, MonadIO m) => obj -> AttrLabelProxy attr -> m () Source #

Set a nullable attribute to NULL.

data AttrOp obj (tag :: AttrOpTag) where Source #

Constructors for the different operations allowed on an attribute.

Constructors

(:=) :: forall obj info (attr :: Symbol) (tag :: AttrOpTag) b. (HasAttributeList obj, info ~ ResolveAttribute attr obj, AttrInfo info, AttrBaseTypeConstraint info obj, AttrOpAllowed tag info obj, AttrSetTypeConstraint info b) => AttrLabelProxy attr -> b -> AttrOp obj tag infixr 0

Assign a value to an attribute

(:=>) :: forall obj info (attr :: Symbol) (tag :: AttrOpTag) b. (HasAttributeList obj, info ~ ResolveAttribute attr obj, AttrInfo info, AttrBaseTypeConstraint info obj, AttrOpAllowed tag info obj, AttrSetTypeConstraint info b) => AttrLabelProxy attr -> IO b -> AttrOp obj tag infixr 0

Assign the result of an IO action to an attribute

(:~) :: forall obj info (attr :: Symbol) (tag :: AttrOpTag) b a. (HasAttributeList obj, info ~ ResolveAttribute attr obj, AttrInfo info, AttrBaseTypeConstraint info obj, tag ~ 'AttrSet, AttrOpAllowed 'AttrSet info obj, AttrOpAllowed 'AttrGet info obj, AttrSetTypeConstraint info b, a ~ AttrGetType info) => AttrLabelProxy attr -> (a -> b) -> AttrOp obj tag infixr 0

Apply an update function to an attribute

(:~>) :: forall obj info (attr :: Symbol) (tag :: AttrOpTag) b a. (HasAttributeList obj, info ~ ResolveAttribute attr obj, AttrInfo info, AttrBaseTypeConstraint info obj, tag ~ 'AttrSet, AttrOpAllowed 'AttrSet info obj, AttrOpAllowed 'AttrGet info obj, AttrSetTypeConstraint info b, a ~ AttrGetType info) => AttrLabelProxy attr -> (a -> IO b) -> AttrOp obj tag infixr 0

Apply an IO update function to an attribute

(:&=) :: forall obj info (attr :: Symbol) (tag :: AttrOpTag) b. (HasAttributeList obj, info ~ ResolveAttribute attr obj, AttrInfo info, AttrBaseTypeConstraint info obj, AttrOpAllowed tag info obj, AttrTransferTypeConstraint info b, AttrSetTypeConstraint info (AttrTransferType info)) => AttrLabelProxy attr -> b -> AttrOp obj tag

Assign a value to an attribute, allocating any necessary memory for representing the Haskell value as a C value. Note that it is the responsibility of the caller to make sure that the memory is freed when no longer used, otherwise there will be a memory leak. In the majority of cases you probably want to use := instead, which has no potential memory leaks (at the cost of sometimes requiring some explicit Haskell -> C marshalling).

On :: forall obj info (tag :: AttrOpTag). (GObject obj, SignalInfo info) => SignalProxy obj info -> ((?self :: obj) => HaskellCallbackType info) -> AttrOp obj tag

Connect the given signal to a signal handler.

After :: forall obj info (tag :: AttrOpTag). (GObject obj, SignalInfo info) => SignalProxy obj info -> ((?self :: obj) => HaskellCallbackType info) -> AttrOp obj tag

Like On, but connect after the default signal.

class AttrInfo info where Source #

Info describing an attribute.

Minimal complete definition

Nothing

Associated Types

type AttrAllowedOps info :: [AttrOpTag] Source #

The operations that are allowed on the attribute.

type AttrBaseTypeConstraint info :: Type -> Constraint Source #

Constraint on the type for which we are allowed to create/set/get the attribute.

type AttrGetType info Source #

Type returned by attrGet.

type AttrSetTypeConstraint info :: Type -> Constraint Source #

Constraint on the value being set.

type AttrTransferTypeConstraint info :: Type -> Constraint Source #

Constraint on the value being set, with allocation allowed (see :&= below).

type AttrTransferType info Source #

Type resulting from the allocation.

type AttrTransferType info = AttrGetType info

type AttrLabel info :: Symbol Source #

Name of the attribute.

type AttrOrigin info Source #

Type which introduces the attribute.

Methods

attrGet :: AttrBaseTypeConstraint info o => o -> IO (AttrGetType info) Source #

Get the value of the given attribute.

default attrGet :: CheckNotElem 'AttrGet (AttrAllowedOps info) (GetNotProvidedError info) => o -> IO (AttrGetType info) Source #

attrSet :: (AttrBaseTypeConstraint info o, AttrSetTypeConstraint info b) => o -> b -> IO () Source #

Set the value of the given attribute, after the object having the attribute has already been created.

default attrSet :: CheckNotElem 'AttrSet (AttrAllowedOps info) (SetNotProvidedError info) => o -> b -> IO () Source #

attrClear :: AttrBaseTypeConstraint info o => o -> IO () Source #

Set the value of the given attribute to NULL (for nullable attributes).

default attrClear :: CheckNotElem 'AttrClear (AttrAllowedOps info) (ClearNotProvidedError info) => o -> IO () Source #

attrConstruct :: (AttrBaseTypeConstraint info o, AttrSetTypeConstraint info b) => b -> IO (GValueConstruct o) Source #

Build a GValue representing the attribute.

default attrConstruct :: CheckNotElem 'AttrConstruct (AttrAllowedOps info) (ConstructNotProvidedError info) => b -> IO (GValueConstruct o) Source #

attrTransfer :: (AttrBaseTypeConstraint info o, AttrTransferTypeConstraint info b) => Proxy o -> b -> IO (AttrTransferType info) Source #

Allocate memory as necessary to generate a settable type from the transfer type. This is useful for types which needs allocations for marshalling from Haskell to C, this makes the allocation explicit.

dbgAttrInfo :: Maybe ResolvedSymbolInfo Source #

Return some information about the overloaded attribute, useful for debugging. See resolveAttr for how to access this conveniently.

data AttrOpTag Source #

Possible operations on an attribute.

Constructors

AttrGet

It is possible to read the value of the attribute with get.

AttrSet

It is possible to write the value of the attribute with set.

AttrConstruct

It is possible to set the value of the attribute in new.

AttrClear

It is possible to clear the value of the (nullable) attribute with clear.

type family AttrOpAllowed (tag :: AttrOpTag) info useType where ... Source #

Whether a given AttrOpTag is allowed on an attribute, given the info type.

Equations

AttrOpAllowed tag info useType = AttrOpIsAllowed tag (AttrAllowedOps info) (AttrLabel info) (AttrOrigin info) useType 

type AttrGetC info obj (attr :: Symbol) result = (HasAttributeList obj, info ~ ResolveAttribute attr obj, AttrInfo info, AttrBaseTypeConstraint info obj, AttrOpAllowed 'AttrGet info obj, result ~ AttrGetType info) Source #

Constraints on a obj/attr pair so get is possible, producing a value of type result.

type AttrSetC info obj (attr :: Symbol) value = (HasAttributeList obj, info ~ ResolveAttribute attr obj, AttrInfo info, AttrBaseTypeConstraint info obj, AttrOpAllowed 'AttrSet info obj, AttrSetTypeConstraint info value) Source #

Constraint on a obj/attr pair so that set works on values of type value.

type AttrConstructC info obj (attr :: Symbol) value = (HasAttributeList obj, info ~ ResolveAttribute attr obj, AttrInfo info, AttrBaseTypeConstraint info obj, AttrOpAllowed 'AttrConstruct info obj, AttrSetTypeConstraint info value) Source #

Constraint on a obj/value pair so that new works on values of type value.

type AttrClearC info obj (attr :: Symbol) = (HasAttributeList obj, info ~ ResolveAttribute attr obj, AttrInfo info, AttrBaseTypeConstraint info obj, AttrOpAllowed 'AttrClear info obj) Source #

Constraint on a obj/attr pair so that clear is allowed.

data AttrLabelProxy (a :: Symbol) Source #

A proxy for attribute labels.

Constructors

AttrLabelProxy 

Instances

Instances details
a ~ x => IsLabel x (AttrLabelProxy a) Source # 
Instance details

Defined in Data.GI.Base.Attributes

resolveAttr :: forall info (attr :: Symbol) obj. (HasAttributeList obj, info ~ ResolveAttribute attr obj, AttrInfo info) => obj -> AttrLabelProxy attr -> Maybe ResolvedSymbolInfo Source #

Return the fully qualified attribute name that a given overloaded attribute resolves to (mostly useful for debugging).

resolveAttr #sensitive button

type family AttrLabel info :: Symbol Source #

Name of the attribute.

type family AttrAllowedOps info :: [AttrOpTag] Source #

The operations that are allowed on the attribute.

type family AttrBaseTypeConstraint info :: Type -> Constraint Source #

Constraint on the type for which we are allowed to create/set/get the attribute.

type family AttrGetType info Source #

Type returned by attrGet.

type family AttrSetTypeConstraint info :: Type -> Constraint Source #

Constraint on the value being set.

type family AttrTransferTypeConstraint info :: Type -> Constraint Source #

Constraint on the value being set, with allocation allowed (see :&= below).

type family AttrTransferType info Source #

Type resulting from the allocation.

type family AttrOrigin info Source #

Type which introduces the attribute.

data GClosure a Source #

The basic type. This corresponds to a wrapped GClosure on the C side, which is a boxed object.

Instances

Instances details
GBoxed (GClosure a) Source #

GClosures are registered as boxed in the GLib type system.

Instance details

Defined in Data.GI.Base.GClosure

TypedObject (GClosure a) Source #

Find the associated GType for the given closure.

Instance details

Defined in Data.GI.Base.GClosure

HasParentTypes (GClosure a) Source # 
Instance details

Defined in Data.GI.Base.GClosure

type ParentTypes (GClosure a) Source #

There are no types in the bindings that a closure can be safely cast to.

Instance details

Defined in Data.GI.Base.GClosure

type ParentTypes (GClosure a) = '[] :: [Type]

class SignalInfo info where Source #

Information about an overloaded signal.

Minimal complete definition

connectSignal

Associated Types

type HaskellCallbackType info Source #

The type for the signal handler.

Methods

connectSignal :: GObject o => o -> (o -> HaskellCallbackType info) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId Source #

Connect a Haskell function to a signal of the given GObject, specifying whether the handler will be called before or after the default handler. Note that the callback being passed here admits an extra initial parameter with respect to the usual Haskell callback type. This will be passed as an implicit ?self argument to the Haskell callback.

dbgSignalInfo :: Maybe ResolvedSymbolInfo Source #

Optional extra debug information, for resolveSignal below.

data SignalConnectMode Source #

Whether to connect a handler to a signal with connectSignal so that it runs before/after the default handler for the given signal.

Constructors

SignalConnectBefore

Run before the default handler.

SignalConnectAfter

Run after the default handler.

connectSignalFunPtr :: GObject o => o -> Text -> FunPtr a -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId Source #

Connect a signal to a handler, given as a FunPtr.

type SignalHandlerId = CULong Source #

Type of a GObject signal handler id.

data GObjectNotifySignalInfo Source #

Connection information for a "notify" signal indicating that a specific property changed (see PropertyNotify for the relevant constructor).

type family HaskellCallbackType info Source #

The type for the signal handler.

data Symbol #

(Kind) This is the kind of type-level symbols.

Instances

Instances details
TestCoercion SSymbol

@since base-4.18.0.0

Instance details

Defined in GHC.Internal.TypeLits

Methods

testCoercion :: forall (a :: Symbol) (b :: Symbol). SSymbol a -> SSymbol b -> Maybe (Coercion a b) #

TestEquality SSymbol

@since base-4.18.0.0

Instance details

Defined in GHC.Internal.TypeLits

Methods

testEquality :: forall (a :: Symbol) (b :: Symbol). SSymbol a -> SSymbol b -> Maybe (a :~: b) #

class Enum a where #

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:

   enumFrom     x   = enumFromTo     x maxBound
   enumFromThen x y = enumFromThenTo x y bound
     where
       bound | fromEnum y >= fromEnum x = maxBound
             | otherwise                = minBound

Methods

toEnum :: Int -> a #

Convert from an Int.

fromEnum :: a -> 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.

Instances

Instances details
Enum CBool 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CChar 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CClock 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

succ :: CInt -> CInt #

pred :: CInt -> CInt #

toEnum :: Int -> CInt #

fromEnum :: CInt -> Int #

enumFrom :: CInt -> [CInt] #

enumFromThen :: CInt -> CInt -> [CInt] #

enumFromTo :: CInt -> CInt -> [CInt] #

enumFromThenTo :: CInt -> CInt -> CInt -> [CInt] #

Enum CIntMax 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CLLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CPtrdiff 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CSChar 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CSUSeconds 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CShort 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CSigAtomic 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CSize 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CTime 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUChar 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUIntMax 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CULLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUSeconds 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CUShort 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum CWchar 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Enum IntPtr 
Instance details

Defined in GHC.Internal.Foreign.Ptr

Enum WordPtr 
Instance details

Defined in GHC.Internal.Foreign.Ptr

Enum Int16

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Enum Int32

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Enum Int64

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Enum Int8

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Methods

succ :: Int8 -> Int8 #

pred :: Int8 -> Int8 #

toEnum :: Int -> Int8 #

fromEnum :: Int8 -> Int #

enumFrom :: Int8 -> [Int8] #

enumFromThen :: Int8 -> Int8 -> [Int8] #

enumFromTo :: Int8 -> Int8 -> [Int8] #

enumFromThenTo :: Int8 -> Int8 -> Int8 -> [Int8] #

Enum Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Enum Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Enum Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Enum Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Enum Ordering

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Enum AttrOpTag Source # 
Instance details

Defined in Data.GI.Base.Attributes

Enum GParamFlag Source # 
Instance details

Defined in Data.GI.Base.GParamSpec

Enum I8 
Instance details

Defined in Data.Text.Foreign

Methods

succ :: I8 -> I8 #

pred :: I8 -> I8 #

toEnum :: Int -> I8 #

fromEnum :: I8 -> Int #

enumFrom :: I8 -> [I8] #

enumFromThen :: I8 -> I8 -> [I8] #

enumFromTo :: I8 -> I8 -> [I8] #

enumFromThenTo :: I8 -> I8 -> I8 -> [I8] #

Enum FPFormat 
Instance details

Defined in Data.Text.Lazy.Builder.RealFloat

Enum Integer

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Enum Natural

@since base-4.8.0.0

Instance details

Defined in GHC.Internal.Enum

Enum ()

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Methods

succ :: () -> () #

pred :: () -> () #

toEnum :: Int -> () #

fromEnum :: () -> Int #

enumFrom :: () -> [()] #

enumFromThen :: () -> () -> [()] #

enumFromTo :: () -> () -> [()] #

enumFromThenTo :: () -> () -> () -> [()] #

Enum Bool

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Methods

succ :: Bool -> Bool #

pred :: Bool -> Bool #

toEnum :: Int -> Bool #

fromEnum :: Bool -> Int #

enumFrom :: Bool -> [Bool] #

enumFromThen :: Bool -> Bool -> [Bool] #

enumFromTo :: Bool -> Bool -> [Bool] #

enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] #

Enum Char

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Methods

succ :: Char -> Char #

pred :: Char -> Char #

toEnum :: Int -> Char #

fromEnum :: Char -> Int #

enumFrom :: Char -> [Char] #

enumFromThen :: Char -> Char -> [Char] #

enumFromTo :: Char -> Char -> [Char] #

enumFromThenTo :: Char -> Char -> Char -> [Char] #

Enum Int

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Methods

succ :: Int -> Int #

pred :: Int -> Int #

toEnum :: Int -> Int #

fromEnum :: Int -> Int #

enumFrom :: Int -> [Int] #

enumFromThen :: Int -> Int -> [Int] #

enumFromTo :: Int -> Int -> [Int] #

enumFromThenTo :: Int -> Int -> Int -> [Int] #

Enum Levity

@since base-4.16.0.0

Instance details

Defined in GHC.Internal.Enum

Enum VecCount

@since base-4.10.0.0

Instance details

Defined in GHC.Internal.Enum

Enum VecElem

@since base-4.10.0.0

Instance details

Defined in GHC.Internal.Enum

Enum Word

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Methods

succ :: Word -> Word #

pred :: Word -> Word #

toEnum :: Int -> Word #

fromEnum :: Word -> Int #

enumFrom :: Word -> [Word] #

enumFromThen :: Word -> Word -> [Word] #

enumFromTo :: Word -> Word -> [Word] #

enumFromThenTo :: Word -> Word -> Word -> [Word] #

Enum a => Enum (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: First a -> First a #

pred :: First a -> First a #

toEnum :: Int -> First a #

fromEnum :: First a -> Int #

enumFrom :: First a -> [First a] #

enumFromThen :: First a -> First a -> [First a] #

enumFromTo :: First a -> First a -> [First a] #

enumFromThenTo :: First a -> First a -> First a -> [First a] #

Enum a => Enum (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Last a -> Last a #

pred :: Last a -> Last a #

toEnum :: Int -> Last a #

fromEnum :: Last a -> Int #

enumFrom :: Last a -> [Last a] #

enumFromThen :: Last a -> Last a -> [Last a] #

enumFromTo :: Last a -> Last a -> [Last a] #

enumFromThenTo :: Last a -> Last a -> Last a -> [Last a] #

Enum a => Enum (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Max a -> Max a #

pred :: Max a -> Max a #

toEnum :: Int -> Max a #

fromEnum :: Max a -> Int #

enumFrom :: Max a -> [Max a] #

enumFromThen :: Max a -> Max a -> [Max a] #

enumFromTo :: Max a -> Max a -> [Max a] #

enumFromThenTo :: Max a -> Max a -> Max a -> [Max a] #

Enum a => Enum (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

succ :: Min a -> Min a #

pred :: Min a -> Min a #

toEnum :: Int -> Min a #

fromEnum :: Min a -> Int #

enumFrom :: Min a -> [Min a] #

enumFromThen :: Min a -> Min a -> [Min a] #

enumFromTo :: Min a -> Min a -> [Min a] #

enumFromThenTo :: Min a -> Min a -> Min a -> [Min a] #

Enum a => Enum (WrappedMonoid a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Integral a => Enum (Ratio a)

@since base-2.0.1

Instance details

Defined in GHC.Internal.Real

Methods

succ :: Ratio a -> Ratio a #

pred :: Ratio a -> Ratio a #

toEnum :: Int -> Ratio a #

fromEnum :: Ratio a -> Int #

enumFrom :: Ratio a -> [Ratio a] #

enumFromThen :: Ratio a -> Ratio a -> [Ratio a] #

enumFromTo :: Ratio a -> Ratio a -> [Ratio a] #

enumFromThenTo :: Ratio a -> Ratio a -> Ratio a -> [Ratio a] #

Enum a => Enum (Solo a) 
Instance details

Defined in GHC.Internal.Enum

Methods

succ :: Solo a -> Solo a #

pred :: Solo a -> Solo a #

toEnum :: Int -> Solo a #

fromEnum :: Solo a -> Int #

enumFrom :: Solo a -> [Solo a] #

enumFromThen :: Solo a -> Solo a -> [Solo a] #

enumFromTo :: Solo a -> Solo a -> [Solo a] #

enumFromThenTo :: Solo a -> Solo a -> Solo a -> [Solo a] #

Enum (Fixed a)

Recall that, for numeric types, succ and pred typically add and subtract 1, respectively. This is not true in the case of Fixed, whose successor and predecessor functions intuitively return the "next" and "previous" values in the enumeration. The results of these functions thus depend on the resolution of the Fixed value. For example, when enumerating values of resolution 10^-3 of type Milli = Fixed E3,

>>> succ (0.000 :: Milli)
0.001

and likewise

>>> pred (0.000 :: Milli)
-0.001

In other words, succ and pred increment and decrement a fixed-precision value by the least amount such that the value's resolution is unchanged. For example, 10^-12 is the smallest (positive) amount that can be added to a value of type Pico = Fixed E12 without changing its resolution, and so

>>> succ (0.000000000000 :: Pico)
0.000000000001

and similarly

>>> pred (0.000000000000 :: Pico)
-0.000000000001

This is worth bearing in mind when defining Fixed arithmetic sequences. In particular, you may be forgiven for thinking the sequence

  [1..10] :: [Pico]

evaluates to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] :: [Pico].

However, this is not true. On the contrary, similarly to the above implementations of succ and pred, enumFromTo :: Pico -> Pico -> [Pico] has a "step size" of 10^-12. Hence, the list [1..10] :: [Pico] has the form

  [1.000000000000, 1.00000000001, 1.00000000002, ..., 10.000000000000]

and contains 9 * 10^12 + 1 values.

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

succ :: Fixed a -> Fixed a #

pred :: Fixed a -> Fixed a #

toEnum :: Int -> Fixed a #

fromEnum :: Fixed a -> Int #

enumFrom :: Fixed a -> [Fixed a] #

enumFromThen :: Fixed a -> Fixed a -> [Fixed a] #

enumFromTo :: Fixed a -> Fixed a -> [Fixed a] #

enumFromThenTo :: Fixed a -> Fixed a -> Fixed a -> [Fixed a] #

Enum (Proxy s)

@since base-4.7.0.0

Instance details

Defined in GHC.Internal.Data.Proxy

Methods

succ :: Proxy s -> Proxy s #

pred :: Proxy s -> Proxy s #

toEnum :: Int -> Proxy s #

fromEnum :: Proxy s -> Int #

enumFrom :: Proxy s -> [Proxy s] #

enumFromThen :: Proxy s -> Proxy s -> [Proxy s] #

enumFromTo :: Proxy s -> Proxy s -> [Proxy s] #

enumFromThenTo :: Proxy s -> Proxy s -> Proxy s -> [Proxy s] #

Enum (f (g a)) => Enum (Compose f g a)

Since: base-4.19.0.0

Instance details

Defined in Data.Functor.Compose

Methods

succ :: Compose f g a -> Compose f g a #

pred :: Compose f g a -> Compose f g a #

toEnum :: Int -> Compose f g a #

fromEnum :: Compose f g a -> Int #

enumFrom :: Compose f g a -> [Compose f g a] #

enumFromThen :: Compose f g a -> Compose f g a -> [Compose f g a] #

enumFromTo :: Compose f g a -> Compose f g a -> [Compose f g a] #

enumFromThenTo :: Compose f g a -> Compose f g a -> Compose f g a -> [Compose f g a] #

class Show a where #

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 show is 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 showsPrec will produce infix applications of the constructor.
  • the representation will be enclosed in parentheses if the precedence of the top-level constructor in x is less than d (associativity is ignored). Thus, if d is 0 then the result is never surrounded in parentheses; if d is 11 it is always surrounded in parentheses, unless it is an atomic expression.
  • If the constructor is defined using record syntax, then show will 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 = 5

Note that right-associativity of :^: is ignored. For example,

  • show (Leaf 1 :^: Leaf 2 :^: Leaf 3) produces the string "Leaf 1 :^: (Leaf 2 :^: Leaf 3)".

Minimal complete definition

showsPrec | show

Methods

showsPrec #

Arguments

:: Int

the operator precedence of the enclosing context (a number from 0 to 11). Function application has precedence 10.

-> a

the value to be converted to a String

-> ShowS 

Convert a value to a readable String.

showsPrec should satisfy the law

showsPrec d x r ++ s  ==  showsPrec d x (r ++ s)

Derived instances of Read and Show satisfy the following:

That is, readsPrec parses the string produced by showsPrec, and delivers the value that showsPrec started with.

show :: a -> String #

A specialised variant of showsPrec, using precedence context zero, and returning an ordinary String.

showList :: [a] -> ShowS #

The method showList is provided to allow the programmer to give a specialised way of showing lists of values. For example, this is used by the predefined Show instance of the Char type, where values of type String should be shown in double quotes, rather than between square brackets.

Instances

Instances details
Show ByteArray

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Show Timeout

Since: base-4.0

Instance details

Defined in System.Timeout

Show FormatMode 
Instance details

Defined in Data.ByteString.Builder.RealFloat

Methods

showsPrec :: Int -> FormatMode -> ShowS #

show :: FormatMode -> String #

showList :: [FormatMode] -> ShowS #

Show ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Show ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Show ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Show IntSet 
Instance details

Defined in Data.IntSet.Internal

Show BitQueue 
Instance details

Defined in Utils.Containers.Internal.BitQueue

Show BitQueueB 
Instance details

Defined in Utils.Containers.Internal.BitQueue

Show Void

@since base-4.8.0.0

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> Void -> ShowS #

show :: Void -> String #

showList :: [Void] -> ShowS #

Show NestedAtomically

@since base-4.0

Instance details

Defined in GHC.Internal.Control.Exception.Base

Show NoMatchingContinuationPrompt

@since base-4.18

Instance details

Defined in GHC.Internal.Control.Exception.Base

Show NoMethodError

@since base-4.0

Instance details

Defined in GHC.Internal.Control.Exception.Base

Show NonTermination

@since base-4.0

Instance details

Defined in GHC.Internal.Control.Exception.Base

Show PatternMatchFail

@since base-4.0

Instance details

Defined in GHC.Internal.Control.Exception.Base

Show RecConError

@since base-4.0

Instance details

Defined in GHC.Internal.Control.Exception.Base

Show RecSelError

@since base-4.0

Instance details

Defined in GHC.Internal.Control.Exception.Base

Show RecUpdError

@since base-4.0

Instance details

Defined in GHC.Internal.Control.Exception.Base

Show TypeError

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Control.Exception.Base

Show Dynamic

@since base-2.01

Instance details

Defined in GHC.Internal.Data.Dynamic

Show SomeTypeRep

@since base-4.10.0.0

Instance details

Defined in GHC.Internal.Data.Typeable.Internal

Show ErrorCall

@since base-4.0.0.0

Instance details

Defined in GHC.Internal.Exception

Show ArithException

@since base-4.0.0.0

Instance details

Defined in GHC.Internal.Exception.Type

Show SomeException

Since: ghc-internal-3.0

Instance details

Defined in GHC.Internal.Exception.Type

Show CBool 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

showsPrec :: Int -> CBool -> ShowS #

show :: CBool -> String #

showList :: [CBool] -> ShowS #

Show CChar 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

showsPrec :: Int -> CChar -> ShowS #

show :: CChar -> String #

showList :: [CChar] -> ShowS #

Show CClock 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

showsPrec :: Int -> CInt -> ShowS #

show :: CInt -> String #

showList :: [CInt] -> ShowS #

Show CIntMax 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CLLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

showsPrec :: Int -> CLong -> ShowS #

show :: CLong -> String #

showList :: [CLong] -> ShowS #

Show CPtrdiff 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CSChar 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CSUSeconds 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CShort 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CSigAtomic 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CSize 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

showsPrec :: Int -> CSize -> ShowS #

show :: CSize -> String #

showList :: [CSize] -> ShowS #

Show CTime 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

showsPrec :: Int -> CTime -> ShowS #

show :: CTime -> String #

showList :: [CTime] -> ShowS #

Show CUChar 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

showsPrec :: Int -> CUInt -> ShowS #

show :: CUInt -> String #

showList :: [CUInt] -> ShowS #

Show CUIntMax 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CULLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CUSeconds 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CUShort 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show CWchar 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Show IntPtr 
Instance details

Defined in GHC.Internal.Foreign.Ptr

Show WordPtr 
Instance details

Defined in GHC.Internal.Foreign.Ptr

Show MaskingState

@since base-4.3.0.0

Instance details

Defined in GHC.Internal.IO

Show BufferMode

@since base-4.2.0.0

Instance details

Defined in GHC.Internal.IO.Handle.Types

Show Handle

@since base-4.1.0.0

Instance details

Defined in GHC.Internal.IO.Handle.Types

Show HandleType

@since base-4.1.0.0

Instance details

Defined in GHC.Internal.IO.Handle.Types

Show Newline

@since base-4.3.0.0

Instance details

Defined in GHC.Internal.IO.Handle.Types

Show NewlineMode

@since base-4.3.0.0

Instance details

Defined in GHC.Internal.IO.Handle.Types

Show Int16

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Methods

showsPrec :: Int -> Int16 -> ShowS #

show :: Int16 -> String #

showList :: [Int16] -> ShowS #

Show Int32

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Methods

showsPrec :: Int -> Int32 -> ShowS #

show :: Int32 -> String #

showList :: [Int32] -> ShowS #

Show Int64

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Methods

showsPrec :: Int -> Int64 -> ShowS #

show :: Int64 -> String #

showList :: [Int64] -> ShowS #

Show Int8

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Methods

showsPrec :: Int -> Int8 -> ShowS #

show :: Int8 -> String #

showList :: [Int8] -> ShowS #

Show FractionalExponentBase 
Instance details

Defined in GHC.Internal.Real

Show CallStack

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Show

Show SrcLoc

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Show

Show SomeChar 
Instance details

Defined in GHC.Internal.TypeLits

Show SomeSymbol

@since base-4.7.0.0

Instance details

Defined in GHC.Internal.TypeLits

Show Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Show Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Show Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Show Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Methods

showsPrec :: Int -> Word8 -> ShowS #

show :: Word8 -> String #

showList :: [Word8] -> ShowS #

Show KindRep 
Instance details

Defined in GHC.Internal.Show

Show Module

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Show

Show Ordering

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Show TrName

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Show

Show TyCon

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> TyCon -> ShowS #

show :: TyCon -> String #

showList :: [TyCon] -> ShowS #

Show TypeLitSort

@since base-4.11.0.0

Instance details

Defined in GHC.Internal.Show

Show AttrOpTag Source # 
Instance details

Defined in Data.GI.Base.Attributes

Show GType Source # 
Instance details

Defined in Data.GI.Base.BasicTypes

Methods

showsPrec :: Int -> GType -> ShowS #

show :: GType -> String #

showList :: [GType] -> ShowS #

Show UnexpectedNullPointerReturn Source # 
Instance details

Defined in Data.GI.Base.BasicTypes

Show GError Source # 
Instance details

Defined in Data.GI.Base.GError

Show GParamFlag Source # 
Instance details

Defined in Data.GI.Base.GParamSpec

Show GVariantHandle Source # 
Instance details

Defined in Data.GI.Base.GVariant

Show GVariantObjectPath Source # 
Instance details

Defined in Data.GI.Base.GVariant

Show GVariantSignature Source # 
Instance details

Defined in Data.GI.Base.GVariant

Show ResolvedSymbolInfo Source # 
Instance details

Defined in Data.GI.Base.Overloading

Show Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

Show Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Style -> ShowS #

show :: Style -> String #

showList :: [Style] -> ShowS #

Show TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

showsPrec :: Int -> Doc -> ShowS #

show :: Doc -> String #

showList :: [Doc] -> ShowS #

Show Decoding 
Instance details

Defined in Data.Text.Encoding

Show UnicodeException 
Instance details

Defined in Data.Text.Encoding.Error

Show I8 
Instance details

Defined in Data.Text.Foreign

Methods

showsPrec :: Int -> I8 -> ShowS #

show :: I8 -> String #

showList :: [I8] -> ShowS #

Show Builder 
Instance details

Defined in Data.Text.Internal.Builder

Show PartialUtf8CodePoint 
Instance details

Defined in Data.Text.Internal.Encoding

Methods

showsPrec :: Int -> PartialUtf8CodePoint -> ShowS #

show :: PartialUtf8CodePoint -> String #

showList :: [PartialUtf8CodePoint] -> ShowS #

Show Utf8State 
Instance details

Defined in Data.Text.Internal.Encoding

Show DecoderState 
Instance details

Defined in Data.Text.Internal.Encoding.Utf8

Show Size 
Instance details

Defined in Data.Text.Internal.Fusion.Size

Methods

showsPrec :: Int -> Size -> ShowS #

show :: Size -> String #

showList :: [Size] -> ShowS #

Show FPFormat 
Instance details

Defined in Data.Text.Lazy.Builder.RealFloat

Show Iter 
Instance details

Defined in Data.Text.Unsafe

Methods

showsPrec :: Int -> Iter -> ShowS #

show :: Iter -> String #

showList :: [Iter] -> ShowS #

Show Integer

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Show Natural

@since base-4.8.0.0

Instance details

Defined in GHC.Internal.Show

Show ()

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> () -> ShowS #

show :: () -> String #

showList :: [()] -> ShowS #

Show Bool

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> Bool -> ShowS #

show :: Bool -> String #

showList :: [Bool] -> ShowS #

Show Char

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> Char -> ShowS #

show :: Char -> String #

showList :: [Char] -> ShowS #

Show Int

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> Int -> ShowS #

show :: Int -> String #

showList :: [Int] -> ShowS #

Show Levity

@since base-4.15.0.0

Instance details

Defined in GHC.Internal.Show

Show RuntimeRep

@since base-4.11.0.0

Instance details

Defined in GHC.Internal.Show

Show VecCount

@since base-4.11.0.0

Instance details

Defined in GHC.Internal.Show

Show VecElem

@since base-4.11.0.0

Instance details

Defined in GHC.Internal.Show

Show Word

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> Word -> ShowS #

show :: Word -> String #

showList :: [Word] -> ShowS #

Show a => Show (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

showsPrec :: Int -> Complex a -> ShowS #

show :: Complex a -> String #

showList :: [Complex a] -> ShowS #

Show a => Show (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> First a -> ShowS #

show :: First a -> String #

showList :: [First a] -> ShowS #

Show a => Show (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Last a -> ShowS #

show :: Last a -> String #

showList :: [Last a] -> ShowS #

Show a => Show (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Max a -> ShowS #

show :: Max a -> String #

showList :: [Max a] -> ShowS #

Show a => Show (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Min a -> ShowS #

show :: Min a -> String #

showList :: [Min a] -> ShowS #

Show m => Show (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Show vertex => Show (SCC vertex)

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

showsPrec :: Int -> SCC vertex -> ShowS #

show :: SCC vertex -> String #

showList :: [SCC vertex] -> ShowS #

Show a => Show (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

showsPrec :: Int -> IntMap a -> ShowS #

show :: IntMap a -> String #

showList :: [IntMap a] -> ShowS #

Show a => Show (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> Seq a -> ShowS #

show :: Seq a -> String #

showList :: [Seq a] -> ShowS #

Show a => Show (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> ViewL a -> ShowS #

show :: ViewL a -> String #

showList :: [ViewL a] -> ShowS #

Show a => Show (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

showsPrec :: Int -> ViewR a -> ShowS #

show :: ViewR a -> String #

showList :: [ViewR a] -> ShowS #

Show a => Show (Intersection a) 
Instance details

Defined in Data.Set.Internal

Show a => Show (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

showsPrec :: Int -> Set a -> ShowS #

show :: Set a -> String #

showList :: [Set a] -> ShowS #

Show a => Show (Tree a) 
Instance details

Defined in Data.Tree

Methods

showsPrec :: Int -> Tree a -> ShowS #

show :: Tree a -> String #

showList :: [Tree a] -> ShowS #

Show a => Show (NonEmpty a)

@since base-4.11.0.0

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> NonEmpty a -> ShowS #

show :: NonEmpty a -> String #

showList :: [NonEmpty a] -> ShowS #

Show a => Show (ExceptionWithContext a) 
Instance details

Defined in GHC.Internal.Exception.Type

Show e => Show (NoBacktrace e) 
Instance details

Defined in GHC.Internal.Exception.Type

Show (ForeignPtr a)

@since base-2.01

Instance details

Defined in GHC.Internal.ForeignPtr

Show (FunPtr a)

@since base-2.01

Instance details

Defined in GHC.Internal.Ptr

Methods

showsPrec :: Int -> FunPtr a -> ShowS #

show :: FunPtr a -> String #

showList :: [FunPtr a] -> ShowS #

Show (Ptr a)

@since base-2.01

Instance details

Defined in GHC.Internal.Ptr

Methods

showsPrec :: Int -> Ptr a -> ShowS #

show :: Ptr a -> String #

showList :: [Ptr a] -> ShowS #

Show a => Show (Ratio a)

@since base-2.0.1

Instance details

Defined in GHC.Internal.Real

Methods

showsPrec :: Int -> Ratio a -> ShowS #

show :: Ratio a -> String #

showList :: [Ratio a] -> ShowS #

Show (SChar c)

@since base-4.18.0.0

Instance details

Defined in GHC.Internal.TypeLits

Methods

showsPrec :: Int -> SChar c -> ShowS #

show :: SChar c -> String #

showList :: [SChar c] -> ShowS #

Show (SSymbol s)

@since base-4.18.0.0

Instance details

Defined in GHC.Internal.TypeLits

Methods

showsPrec :: Int -> SSymbol s -> ShowS #

show :: SSymbol s -> String #

showList :: [SSymbol s] -> ShowS #

Show a => Show (HValue a) Source # 
Instance details

Defined in Data.GI.Base.GValue

Methods

showsPrec :: Int -> HValue a -> ShowS #

show :: HValue a -> String #

showList :: [HValue a] -> ShowS #

Show a => Show (GVariantSinglet a) Source # 
Instance details

Defined in Data.GI.Base.GVariant

Show a => Show (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Show (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Doc a -> ShowS #

show :: Doc a -> String #

showList :: [Doc a] -> ShowS #

Show a => Show (Span a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

showsPrec :: Int -> Span a -> ShowS #

show :: Span a -> String #

showList :: [Span a] -> ShowS #

Show a => Show (Maybe a)

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> Maybe a -> ShowS #

show :: Maybe a -> String #

showList :: [Maybe a] -> ShowS #

Show a => Show (Solo a)

@since base-4.15

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> Solo a -> ShowS #

show :: Solo a -> String #

showList :: [Solo a] -> ShowS #

Show a => Show [a]

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> [a] -> ShowS #

show :: [a] -> String #

showList :: [[a]] -> ShowS #

HasResolution a => Show (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

showsPrec :: Int -> Fixed a -> ShowS #

show :: Fixed a -> String #

showList :: [Fixed a] -> ShowS #

(Show a, Show b) => Show (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

showsPrec :: Int -> Arg a b -> ShowS #

show :: Arg a b -> String #

showList :: [Arg a b] -> ShowS #

(Show k, Show a) => Show (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

showsPrec :: Int -> Map k a -> ShowS #

show :: Map k a -> String #

showList :: [Map k a] -> ShowS #

Show (Proxy s)

@since base-4.7.0.0

Instance details

Defined in GHC.Internal.Data.Proxy

Methods

showsPrec :: Int -> Proxy s -> ShowS #

show :: Proxy s -> String #

showList :: [Proxy s] -> ShowS #

Show (TypeRep a) 
Instance details

Defined in GHC.Internal.Data.Typeable.Internal

Methods

showsPrec :: Int -> TypeRep a -> ShowS #

show :: TypeRep a -> String #

showList :: [TypeRep a] -> ShowS #

(Show key, Show value) => Show (GVariantDictEntry key value) Source # 
Instance details

Defined in Data.GI.Base.GVariant

Methods

showsPrec :: Int -> GVariantDictEntry key value -> ShowS #

show :: GVariantDictEntry key value -> String #

showList :: [GVariantDictEntry key value] -> ShowS #

(Show a, Show b) => Show (a, b)

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b) -> ShowS #

show :: (a, b) -> String #

showList :: [(a, b)] -> ShowS #

(Show a, Show b, Show c) => Show (a, b, c)

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c) -> ShowS #

show :: (a, b, c) -> String #

showList :: [(a, b, c)] -> ShowS #

(Show (f a), Show (g a)) => Show (Product f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Product

Methods

showsPrec :: Int -> Product f g a -> ShowS #

show :: Product f g a -> String #

showList :: [Product f g a] -> ShowS #

(Show (f a), Show (g a)) => Show (Sum f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Sum

Methods

showsPrec :: Int -> Sum f g a -> ShowS #

show :: Sum f g a -> String #

showList :: [Sum f g a] -> ShowS #

(Show a, Show b, Show c, Show d) => Show (a, b, c, d)

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c, d) -> ShowS #

show :: (a, b, c, d) -> String #

showList :: [(a, b, c, d)] -> ShowS #

Show (f (g a)) => Show (Compose f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Methods

showsPrec :: Int -> Compose f g a -> ShowS #

show :: Compose f g a -> String #

showList :: [Compose f g a] -> ShowS #

(Show a, Show b, Show c, Show d, Show e) => Show (a, b, c, d, e)

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c, d, e) -> ShowS #

show :: (a, b, c, d, e) -> String #

showList :: [(a, b, c, d, e)] -> ShowS #

(Show a, Show b, Show c, Show d, Show e, Show f) => Show (a, b, c, d, e, f)

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f) -> ShowS #

show :: (a, b, c, d, e, f) -> String #

showList :: [(a, b, c, d, e, f)] -> ShowS #

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

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g) -> ShowS #

show :: (a, b, c, d, e, f, g) -> String #

showList :: [(a, b, c, d, e, f, g)] -> ShowS #

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

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h) -> ShowS #

show :: (a, b, c, d, e, f, g, h) -> String #

showList :: [(a, b, c, d, e, f, g, h)] -> ShowS #

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

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i) -> String #

showList :: [(a, b, c, d, e, f, g, h, i)] -> ShowS #

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

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j)] -> ShowS #

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

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> ShowS #

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

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k, l) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> ShowS #

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

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> ShowS #

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

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> ShowS #

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

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> ShowS #

show :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> String #

showList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> ShowS #

class Eq a where #

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, instances are encouraged to follow these properties:

Reflexivity
x == x = True
Symmetry
x == y = y == x
Transitivity
if x == y && y == z = True, then x == z = True
Extensionality
if x == y = True and f is a function whose return type is an instance of Eq, then f x == f y = True
Negation
x /= y = not (x == y)

Minimal complete definition

(==) | (/=)

Methods

(==) :: a -> a -> Bool infix 4 #

(/=) :: a -> a -> Bool infix 4 #

Instances

Instances details
Eq ByteArray

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Eq Timeout 
Instance details

Defined in System.Timeout

Methods

(==) :: Timeout -> Timeout -> Bool #

(/=) :: Timeout -> Timeout -> Bool #

Eq ByteString 
Instance details

Defined in Data.ByteString.Internal.Type

Eq ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Eq ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Eq IntSet 
Instance details

Defined in Data.IntSet.Internal

Methods

(==) :: IntSet -> IntSet -> Bool #

(/=) :: IntSet -> IntSet -> Bool #

Eq BigNat 
Instance details

Defined in GHC.Num.BigNat

Methods

(==) :: BigNat -> BigNat -> Bool #

(/=) :: BigNat -> BigNat -> Bool #

Eq Void

@since base-4.8.0.0

Instance details

Defined in GHC.Internal.Base

Methods

(==) :: Void -> Void -> Bool #

(/=) :: Void -> Void -> Bool #

Eq SomeTypeRep 
Instance details

Defined in GHC.Internal.Data.Typeable.Internal

Eq ErrorCall

@since base-4.7.0.0

Instance details

Defined in GHC.Internal.Exception

Eq ArithException

@since base-3.0

Instance details

Defined in GHC.Internal.Exception.Type

Eq CBool 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CBool -> CBool -> Bool #

(/=) :: CBool -> CBool -> Bool #

Eq CChar 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CChar -> CChar -> Bool #

(/=) :: CChar -> CChar -> Bool #

Eq CClock 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CClock -> CClock -> Bool #

(/=) :: CClock -> CClock -> Bool #

Eq CDouble 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CDouble -> CDouble -> Bool #

(/=) :: CDouble -> CDouble -> Bool #

Eq CFloat 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CFloat -> CFloat -> Bool #

(/=) :: CFloat -> CFloat -> Bool #

Eq CInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CInt -> CInt -> Bool #

(/=) :: CInt -> CInt -> Bool #

Eq CIntMax 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CIntMax -> CIntMax -> Bool #

(/=) :: CIntMax -> CIntMax -> Bool #

Eq CIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CIntPtr -> CIntPtr -> Bool #

(/=) :: CIntPtr -> CIntPtr -> Bool #

Eq CLLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CLLong -> CLLong -> Bool #

(/=) :: CLLong -> CLLong -> Bool #

Eq CLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CLong -> CLong -> Bool #

(/=) :: CLong -> CLong -> Bool #

Eq CPtrdiff 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Eq CSChar 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CSChar -> CSChar -> Bool #

(/=) :: CSChar -> CSChar -> Bool #

Eq CSUSeconds 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Eq CShort 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CShort -> CShort -> Bool #

(/=) :: CShort -> CShort -> Bool #

Eq CSigAtomic 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Eq CSize 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CSize -> CSize -> Bool #

(/=) :: CSize -> CSize -> Bool #

Eq CTime 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CTime -> CTime -> Bool #

(/=) :: CTime -> CTime -> Bool #

Eq CUChar 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CUChar -> CUChar -> Bool #

(/=) :: CUChar -> CUChar -> Bool #

Eq CUInt 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CUInt -> CUInt -> Bool #

(/=) :: CUInt -> CUInt -> Bool #

Eq CUIntMax 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Eq CUIntPtr 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Eq CULLong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CULLong -> CULLong -> Bool #

(/=) :: CULLong -> CULLong -> Bool #

Eq CULong 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CULong -> CULong -> Bool #

(/=) :: CULong -> CULong -> Bool #

Eq CUSeconds 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Eq CUShort 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CUShort -> CUShort -> Bool #

(/=) :: CUShort -> CUShort -> Bool #

Eq CWchar 
Instance details

Defined in GHC.Internal.Foreign.C.Types

Methods

(==) :: CWchar -> CWchar -> Bool #

(/=) :: CWchar -> CWchar -> Bool #

Eq IntPtr 
Instance details

Defined in GHC.Internal.Foreign.Ptr

Methods

(==) :: IntPtr -> IntPtr -> Bool #

(/=) :: IntPtr -> IntPtr -> Bool #

Eq WordPtr 
Instance details

Defined in GHC.Internal.Foreign.Ptr

Methods

(==) :: WordPtr -> WordPtr -> Bool #

(/=) :: WordPtr -> WordPtr -> Bool #

Eq MaskingState

@since base-4.3.0.0

Instance details

Defined in GHC.Internal.IO

Eq BufferMode

@since base-4.2.0.0

Instance details

Defined in GHC.Internal.IO.Handle.Types

Eq Handle

@since base-4.1.0.0

Instance details

Defined in GHC.Internal.IO.Handle.Types

Methods

(==) :: Handle -> Handle -> Bool #

(/=) :: Handle -> Handle -> Bool #

Eq Newline

@since base-4.2.0.0

Instance details

Defined in GHC.Internal.IO.Handle.Types

Methods

(==) :: Newline -> Newline -> Bool #

(/=) :: Newline -> Newline -> Bool #

Eq NewlineMode

@since base-4.2.0.0

Instance details

Defined in GHC.Internal.IO.Handle.Types

Eq Int16

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Methods

(==) :: Int16 -> Int16 -> Bool #

(/=) :: Int16 -> Int16 -> Bool #

Eq Int32

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Methods

(==) :: Int32 -> Int32 -> Bool #

(/=) :: Int32 -> Int32 -> Bool #

Eq Int64

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Methods

(==) :: Int64 -> Int64 -> Bool #

(/=) :: Int64 -> Int64 -> Bool #

Eq Int8

@since base-2.01

Instance details

Defined in GHC.Internal.Int

Methods

(==) :: Int8 -> Int8 -> Bool #

(/=) :: Int8 -> Int8 -> Bool #

Eq SrcLoc

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Stack.Types

Methods

(==) :: SrcLoc -> SrcLoc -> Bool #

(/=) :: SrcLoc -> SrcLoc -> Bool #

Eq SomeChar 
Instance details

Defined in GHC.Internal.TypeLits

Eq SomeSymbol

@since base-4.7.0.0

Instance details

Defined in GHC.Internal.TypeLits

Eq Word16

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Methods

(==) :: Word16 -> Word16 -> Bool #

(/=) :: Word16 -> Word16 -> Bool #

Eq Word32

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Methods

(==) :: Word32 -> Word32 -> Bool #

(/=) :: Word32 -> Word32 -> Bool #

Eq Word64

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Methods

(==) :: Word64 -> Word64 -> Bool #

(/=) :: Word64 -> Word64 -> Bool #

Eq Word8

@since base-2.01

Instance details

Defined in GHC.Internal.Word

Methods

(==) :: Word8 -> Word8 -> Bool #

(/=) :: Word8 -> Word8 -> Bool #

Eq Module 
Instance details

Defined in GHC.Classes

Methods

(==) :: Module -> Module -> Bool #

(/=) :: Module -> Module -> Bool #

Eq Ordering 
Instance details

Defined in GHC.Classes

Eq TrName 
Instance details

Defined in GHC.Classes

Methods

(==) :: TrName -> TrName -> Bool #

(/=) :: TrName -> TrName -> Bool #

Eq TyCon 
Instance details

Defined in GHC.Classes

Methods

(==) :: TyCon -> TyCon -> Bool #

(/=) :: TyCon -> TyCon -> Bool #

Eq AttrOpTag Source # 
Instance details

Defined in Data.GI.Base.Attributes

Eq GType Source # 
Instance details

Defined in Data.GI.Base.BasicTypes

Methods

(==) :: GType -> GType -> Bool #

(/=) :: GType -> GType -> Bool #

Eq GParamFlag Source # 
Instance details

Defined in Data.GI.Base.GParamSpec

Eq GVariantHandle Source # 
Instance details

Defined in Data.GI.Base.GVariant

Eq GVariantObjectPath Source # 
Instance details

Defined in Data.GI.Base.GVariant

Eq GVariantSignature Source # 
Instance details

Defined in Data.GI.Base.GVariant

Eq Mode 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

(==) :: Mode -> Mode -> Bool #

(/=) :: Mode -> Mode -> Bool #

Eq Style 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

(==) :: Style -> Style -> Bool #

(/=) :: Style -> Style -> Bool #

Eq TextDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

(==) :: Doc -> Doc -> Bool #

(/=) :: Doc -> Doc -> Bool #

Eq UnicodeException 
Instance details

Defined in Data.Text.Encoding.Error

Eq I8 
Instance details

Defined in Data.Text.Foreign

Methods

(==) :: I8 -> I8 -> Bool #

(/=) :: I8 -> I8 -> Bool #

Eq Builder 
Instance details

Defined in Data.Text.Internal.Builder

Methods

(==) :: Builder -> Builder -> Bool #

(/=) :: Builder -> Builder -> Bool #

Eq PartialUtf8CodePoint 
Instance details

Defined in Data.Text.Internal.Encoding

Methods

(==) :: PartialUtf8CodePoint -> PartialUtf8CodePoint -> Bool #

(/=) :: PartialUtf8CodePoint -> PartialUtf8CodePoint -> Bool #

Eq Utf8State 
Instance details

Defined in Data.Text.Internal.Encoding

Eq DecoderState 
Instance details

Defined in Data.Text.Internal.Encoding.Utf8

Eq Size 
Instance details

Defined in Data.Text.Internal.Fusion.Size

Methods

(==) :: Size -> Size -> Bool #

(/=) :: Size -> Size -> Bool #

Eq Integer 
Instance details

Defined in GHC.Num.Integer

Methods

(==) :: Integer -> Integer -> Bool #

(/=) :: Integer -> Integer -> Bool #

Eq Natural 
Instance details

Defined in GHC.Num.Natural

Methods

(==) :: Natural -> Natural -> Bool #

(/=) :: Natural -> Natural -> Bool #

Eq () 
Instance details

Defined in GHC.Classes

Methods

(==) :: () -> () -> Bool #

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

Eq Bool 
Instance details

Defined in GHC.Classes

Methods

(==) :: Bool -> Bool -> Bool #

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

Eq Char 
Instance details

Defined in GHC.Classes

Methods

(==) :: Char -> Char -> Bool #

(/=) :: Char -> Char -> Bool #

Eq Double

Note that due to the presence of NaN, Double's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Double)
False

Also note that Double's Eq instance does not satisfy substitutivity:

>>> 0 == (-0 :: Double)
True
>>> recip 0 == recip (-0 :: Double)
False
Instance details

Defined in GHC.Classes

Methods

(==) :: Double -> Double -> Bool #

(/=) :: Double -> Double -> Bool #

Eq Float

Note that due to the presence of NaN, Float's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Float)
False

Also note that Float's Eq instance does not satisfy extensionality:

>>> 0 == (-0 :: Float)
True
>>> recip 0 == recip (-0 :: Float)
False
Instance details

Defined in GHC.Classes

Methods

(==) :: Float -> Float -> Bool #

(/=) :: Float -> Float -> Bool #

Eq Int 
Instance details

Defined in GHC.Classes

Methods

(==) :: Int -> Int -> Bool #

(/=) :: Int -> Int -> Bool #

Eq Word 
Instance details

Defined in GHC.Classes

Methods

(==) :: Word -> Word -> Bool #

(/=) :: Word -> Word -> Bool #

Eq (Chan a)

Since: base-4.4.0.0

Instance details

Defined in Control.Concurrent.Chan

Methods

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

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

Eq (MutableByteArray s)

Since: base-4.17.0.0

Instance details

Defined in Data.Array.Byte

Eq a => Eq (Complex a)

Since: base-2.1

Instance details

Defined in Data.Complex

Methods

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

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

Eq a => Eq (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq a => Eq (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq a => Eq (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq a => Eq (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

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

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

Eq m => Eq (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Eq vertex => Eq (SCC vertex)

Since: containers-0.5.9

Instance details

Defined in Data.Graph

Methods

(==) :: SCC vertex -> SCC vertex -> Bool #

(/=) :: SCC vertex -> SCC vertex -> Bool #

Eq a => Eq (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

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

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

Eq a => Eq (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

Eq a => Eq (ViewL a) 
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

Eq a => Eq (ViewR a) 
Instance details

Defined in Data.Sequence.Internal

Methods

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

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

Eq a => Eq (Intersection a) 
Instance details

Defined in Data.Set.Internal

Eq a => Eq (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

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

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

Eq a => Eq (Tree a) 
Instance details

Defined in Data.Tree

Methods

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

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

Eq a => Eq (NonEmpty a)

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Methods

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

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

Eq (ForeignPtr a)

@since base-2.01

Instance details

Defined in GHC.Internal.ForeignPtr

Methods

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

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

Eq (IORef a)

Pointer equality.

@since base-4.0.0.0

Instance details

Defined in GHC.Internal.IORef

Methods

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

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

Eq (FunPtr a) 
Instance details

Defined in GHC.Internal.Ptr

Methods

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

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

Eq (Ptr a)

@since base-2.01

Instance details

Defined in GHC.Internal.Ptr

Methods

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

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

Eq a => Eq (Ratio a)

@since base-2.01

Instance details

Defined in GHC.Internal.Real

Methods

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

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

Eq (StablePtr a)

@since base-2.01

Instance details

Defined in GHC.Internal.Stable

Methods

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

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

Eq (SChar c)

@since base-4.19.0.0

Instance details

Defined in GHC.Internal.TypeLits

Methods

(==) :: SChar c -> SChar c -> Bool #

(/=) :: SChar c -> SChar c -> Bool #

Eq (SSymbol s)

@since base-4.19.0.0

Instance details

Defined in GHC.Internal.TypeLits

Methods

(==) :: SSymbol s -> SSymbol s -> Bool #

(/=) :: SSymbol s -> SSymbol s -> Bool #

Eq (ManagedPtr a) Source #

Two ManagedPtrs are equal if they wrap the same underlying C Ptr.

Instance details

Defined in Data.GI.Base.BasicTypes

Methods

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

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

Eq a => Eq (HValue a) Source # 
Instance details

Defined in Data.GI.Base.GValue

Methods

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

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

Eq a => Eq (GVariantSinglet a) Source # 
Instance details

Defined in Data.GI.Base.GVariant

Eq a => Eq (AnnotDetails a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Eq (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq a => Eq (Span a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

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

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

Eq a => Eq (Stream a) 
Instance details

Defined in Data.Text.Internal.Fusion.Types

Methods

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

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

Eq a => Eq (Maybe a)

@since base-2.01

Instance details

Defined in GHC.Internal.Maybe

Methods

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

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

Eq a => Eq (Solo a) 
Instance details

Defined in GHC.Classes

Methods

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

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

Eq a => Eq [a] 
Instance details

Defined in GHC.Classes

Methods

(==) :: [a] -> [a] -> Bool #

(/=) :: [a] -> [a] -> Bool #

Eq (Fixed a)

Since: base-2.1

Instance details

Defined in Data.Fixed

Methods

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

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

Eq a => Eq (Arg a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(==) :: Arg a b -> Arg a b -> Bool #

(/=) :: Arg a b -> Arg a b -> Bool #

(Eq k, Eq a) => Eq (Map k a) 
Instance details

Defined in Data.Map.Internal

Methods

(==) :: Map k a -> Map k a -> Bool #

(/=) :: Map k a -> Map k a -> Bool #

Eq (Proxy s)

@since base-4.7.0.0

Instance details

Defined in GHC.Internal.Data.Proxy

Methods

(==) :: Proxy s -> Proxy s -> Bool #

(/=) :: Proxy s -> Proxy s -> Bool #

Eq (TypeRep a)

@since base-2.01

Instance details

Defined in GHC.Internal.Data.Typeable.Internal

Methods

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

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

(Eq key, Eq value) => Eq (GVariantDictEntry key value) Source # 
Instance details

Defined in Data.GI.Base.GVariant

Methods

(==) :: GVariantDictEntry key value -> GVariantDictEntry key value -> Bool #

(/=) :: GVariantDictEntry key value -> GVariantDictEntry key value -> Bool #

(Eq a, Eq b) => Eq (a, b) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b) -> (a, b) -> Bool #

(/=) :: (a, b) -> (a, b) -> Bool #

(Eq a, Eq b, Eq c) => Eq (a, b, c) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c) -> (a, b, c) -> Bool #

(/=) :: (a, b, c) -> (a, b, c) -> Bool #

(Eq (f a), Eq (g a)) => Eq (Product f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Product

Methods

(==) :: Product f g a -> Product f g a -> Bool #

(/=) :: Product f g a -> Product f g a -> Bool #

(Eq (f a), Eq (g a)) => Eq (Sum f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Sum

Methods

(==) :: Sum f g a -> Sum f g a -> Bool #

(/=) :: Sum f g a -> Sum f g a -> Bool #

(Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d) -> (a, b, c, d) -> Bool #

(/=) :: (a, b, c, d) -> (a, b, c, d) -> Bool #

Eq (f (g a)) => Eq (Compose f g a)

Since: base-4.18.0.0

Instance details

Defined in Data.Functor.Compose

Methods

(==) :: Compose f g a -> Compose f g a -> Bool #

(/=) :: Compose f g a -> Compose f g a -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

(/=) :: (a, b, c, d, e) -> (a, b, c, d, e) -> Bool #

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (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 #

(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq (a, b, c, d, e, f, g) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (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 #

(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) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (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 #

(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) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (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 #

(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) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (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 #

(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) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (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 #

(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) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (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 #

(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) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (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 #

(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) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (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 #

(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) 
Instance details

Defined in GHC.Classes

Methods

(==) :: (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 #

data IO a #

A value of type IO a is a computation which, when performed, does some I/O before returning a value of type a.

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 details
MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

Alternative IO

Takes the first non-throwing IO action's result. empty throws an exception.

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Methods

empty :: IO a #

(<|>) :: IO a -> IO a -> IO a #

some :: IO a -> IO [a] #

many :: IO a -> IO [a] #

Applicative IO

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> IO a #

(<*>) :: IO (a -> b) -> IO a -> IO b #

liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c #

(*>) :: IO a -> IO b -> IO b #

(<*) :: IO a -> IO b -> IO a #

Functor IO

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

fmap :: (a -> b) -> IO a -> IO b #

(<$) :: a -> IO b -> IO a #

Monad IO

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

(>>=) :: IO a -> (a -> IO b) -> IO b #

(>>) :: IO a -> IO b -> IO b #

return :: a -> IO a #

MonadPlus IO

Takes the first non-throwing IO action's result. mzero throws an exception.

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Methods

mzero :: IO a #

mplus :: IO a -> IO a -> IO a #

MonadFail IO

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Control.Monad.Fail

Methods

fail :: String -> IO a #

MonadFix IO

@since base-2.01

Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> IO a) -> IO a #

a ~ () => HPrintfType (IO a)

Since: base-4.7.0.0

Instance details

Defined in Text.Printf

Methods

hspr :: Handle -> String -> [UPrintf] -> IO a

a ~ () => PrintfType (IO a)

Since: base-4.7.0.0

Instance details

Defined in Text.Printf

Methods

spr :: String -> [UPrintf] -> IO a

Monoid a => Monoid (IO a)

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Methods

mempty :: IO a #

mappend :: IO a -> IO a -> IO a #

mconcat :: [IO a] -> IO a #

Semigroup a => Semigroup (IO a)

@since base-4.10.0.0

Instance details

Defined in GHC.Internal.Base

Methods

(<>) :: IO a -> IO a -> IO a #

sconcat :: NonEmpty (IO a) -> IO a #

stimes :: Integral b => b -> IO a -> IO 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
return a >>= 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 List, 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 >>= bs' can be understood as the do expression

do a <- as
   bs a

An alternative name for this function is 'bind', but some people may refer to it as 'flatMap', which results from it being equivialent to

\x f -> join (fmap f x) :: Monad m => m a -> (a -> m b) -> m b

which can be seen as mapping a value with Monad m => m a -> m (m b) and then 'flattening' m (m b) to m b using join.

(>>) :: 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 >> bs' can be understood as the do expression

do as
   bs

or in terms of (>>=) as

as >>= const bs

return :: a -> m a #

Inject a value into the monadic type. This function should not be different from its default implementation as pure. The justification for the existence of this function is merely historic.

Instances

Instances details
Monad Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

(>>=) :: Complex a -> (a -> Complex b) -> Complex b #

(>>) :: Complex a -> Complex b -> Complex b #

return :: a -> Complex a #

Monad First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: First a -> (a -> First b) -> First b #

(>>) :: First a -> First b -> First b #

return :: a -> First a #

Monad Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Last a -> (a -> Last b) -> Last b #

(>>) :: Last a -> Last b -> Last b #

return :: a -> Last a #

Monad Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Max a -> (a -> Max b) -> Max b #

(>>) :: Max a -> Max b -> Max b #

return :: a -> Max a #

Monad Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Min a -> (a -> Min b) -> Min b #

(>>) :: Min a -> Min b -> Min b #

return :: a -> Min a #

Monad Put 
Instance details

Defined in Data.ByteString.Builder.Internal

Methods

(>>=) :: Put a -> (a -> Put b) -> Put b #

(>>) :: Put a -> Put b -> Put b #

return :: a -> Put a #

Monad Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

(>>=) :: Seq a -> (a -> Seq b) -> Seq b #

(>>) :: Seq a -> Seq b -> Seq b #

return :: a -> Seq a #

Monad Tree 
Instance details

Defined in Data.Tree

Methods

(>>=) :: Tree a -> (a -> Tree b) -> Tree b #

(>>) :: Tree a -> Tree b -> Tree b #

return :: a -> Tree a #

Monad NonEmpty

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Methods

(>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b #

(>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

return :: a -> NonEmpty a #

Monad IO

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

(>>=) :: IO a -> (a -> IO b) -> IO b #

(>>) :: IO a -> IO b -> IO b #

return :: a -> IO a #

Monad Maybe

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b #

(>>) :: Maybe a -> Maybe b -> Maybe b #

return :: a -> Maybe a #

Monad Solo

@since base-4.15

Instance details

Defined in GHC.Internal.Base

Methods

(>>=) :: Solo a -> (a -> Solo b) -> Solo b #

(>>) :: Solo a -> Solo b -> Solo b #

return :: a -> Solo a #

Monad []

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

(>>=) :: [a] -> (a -> [b]) -> [b] #

(>>) :: [a] -> [b] -> [b] #

return :: a -> [a] #

Monad m => Monad (WrappedMonad m)

Since: base-4.7.0.0

Instance details

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 #

Monad (SetM s) 
Instance details

Defined in Data.Graph

Methods

(>>=) :: SetM s a -> (a -> SetM s b) -> SetM s b #

(>>) :: SetM s a -> SetM s b -> SetM s b #

return :: a -> SetM s a #

Monad (Proxy :: Type -> Type)

@since base-4.7.0.0

Instance details

Defined in GHC.Internal.Data.Proxy

Methods

(>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b #

(>>) :: Proxy a -> Proxy b -> Proxy b #

return :: a -> Proxy a #

Monad (IParser t) 
Instance details

Defined in Data.Text.Internal.Read

Methods

(>>=) :: IParser t a -> (a -> IParser t b) -> IParser t b #

(>>) :: IParser t a -> IParser t b -> IParser t b #

return :: a -> IParser t a #

Monoid a => Monad ((,) a)

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Methods

(>>=) :: (a, a0) -> (a0 -> (a, b)) -> (a, b) #

(>>) :: (a, a0) -> (a, b) -> (a, b) #

return :: a0 -> (a, a0) #

(Applicative f, Monad f) => Monad (WhenMissing f x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)).

Since: containers-0.5.9

Instance details

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 #

(Monoid a, Monoid b) => Monad ((,,) a b)

@since base-4.14.0.0

Instance details

Defined in GHC.Internal.Base

Methods

(>>=) :: (a, b, a0) -> (a0 -> (a, b, b0)) -> (a, b, b0) #

(>>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) #

return :: a0 -> (a, b, a0) #

(Monad f, Monad g) => Monad (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

(>>=) :: Product f g a -> (a -> Product f g b) -> Product f g b #

(>>) :: Product f g a -> Product f g b -> Product f g b #

return :: a -> Product f g a #

(Monad f, Applicative f) => Monad (WhenMatched f x y)

Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

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 ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

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 #

(Monoid a, Monoid b, Monoid c) => Monad ((,,,) a b c)

@since base-4.14.0.0

Instance details

Defined in GHC.Internal.Base

Methods

(>>=) :: (a, b, c, a0) -> (a0 -> (a, b, c, b0)) -> (a, b, c, b0) #

(>>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) #

return :: a0 -> (a, b, c, a0) #

Monad ((->) r)

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

(>>=) :: (r -> a) -> (a -> r -> b) -> r -> b #

(>>) :: (r -> a) -> (r -> b) -> r -> b #

return :: a -> r -> a #

(Monad f, Applicative f) => Monad (WhenMatched f k x y)

Equivalent to ReaderT k (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

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 #

data Maybe a #

The Maybe type encapsulates an optional value. A value of type Maybe a either contains a value of type a (represented as Just a), or it is empty (represented as Nothing). 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.

Constructors

Nothing 
Just a 

Instances

Instances details
MonadZip Maybe

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Zip

Methods

mzip :: Maybe a -> Maybe b -> Maybe (a, b) #

mzipWith :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

munzip :: Maybe (a, b) -> (Maybe a, Maybe b) #

Eq1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Maybe a -> Maybe b -> Bool #

Ord1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Maybe a -> Maybe b -> Ordering #

Read1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Maybe a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Maybe a] #

liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Maybe a) #

liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Maybe a] #

Show1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Maybe a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Maybe a] -> ShowS #

Alternative Maybe

Picks the leftmost Just value, or, alternatively, Nothing.

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

empty :: Maybe a #

(<|>) :: Maybe a -> Maybe a -> Maybe a #

some :: Maybe a -> Maybe [a] #

many :: Maybe a -> Maybe [a] #

Applicative Maybe

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> Maybe a #

(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b #

liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #

(*>) :: Maybe a -> Maybe b -> Maybe b #

(<*) :: Maybe a -> Maybe b -> Maybe a #

Functor Maybe

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b #

(<$) :: a -> Maybe b -> Maybe a #

Monad Maybe

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b #

(>>) :: Maybe a -> Maybe b -> Maybe b #

return :: a -> Maybe a #

MonadPlus Maybe

Picks the leftmost Just value, or, alternatively, Nothing.

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

mzero :: Maybe a #

mplus :: Maybe a -> Maybe a -> Maybe a #

MonadFail Maybe

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Control.Monad.Fail

Methods

fail :: String -> Maybe a #

MonadFix Maybe

@since base-2.01

Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> Maybe a) -> Maybe a #

Foldable Maybe

@since base-2.01

Instance details

Defined in GHC.Internal.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 #

toList :: Maybe a -> [a] #

null :: Maybe a -> Bool #

length :: Maybe a -> Int #

elem :: Eq a => a -> Maybe a -> Bool #

maximum :: Ord a => Maybe a -> a #

minimum :: Ord a => Maybe a -> a #

sum :: Num a => Maybe a -> a #

product :: Num a => Maybe a -> a #

Traversable Maybe

@since base-2.01

Instance details

Defined in GHC.Internal.Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) #

sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) #

mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #

sequence :: Monad m => Maybe (m a) -> m (Maybe a) #

Semigroup a => Monoid (Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S."

Since 4.11.0: constraint on inner a value generalised from Monoid to Semigroup.

@since base-2.01

Instance details

Defined in GHC.Internal.Base

Methods

mempty :: Maybe a #

mappend :: Maybe a -> Maybe a -> Maybe a #

mconcat :: [Maybe a] -> Maybe a #

Semigroup a => Semigroup (Maybe a)

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Methods

(<>) :: Maybe a -> Maybe a -> Maybe a #

sconcat :: NonEmpty (Maybe a) -> Maybe a #

stimes :: Integral b => b -> Maybe a -> Maybe a #

Show a => Show (Maybe a)

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> Maybe a -> ShowS #

show :: Maybe a -> String #

showList :: [Maybe a] -> ShowS #

Eq a => Eq (Maybe a)

@since base-2.01

Instance details

Defined in GHC.Internal.Maybe

Methods

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

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

Ord a => Ord (Maybe a)

@since base-2.01

Instance details

Defined in GHC.Internal.Maybe

Methods

compare :: Maybe a -> Maybe a -> Ordering #

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

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

(>) :: Maybe a -> Maybe a -> Bool #

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

max :: Maybe a -> Maybe a -> Maybe a #

min :: Maybe a -> Maybe a -> Maybe a #

IsGValue (Maybe GParamSpec) Source # 
Instance details

Defined in Data.GI.Base.GValue

IsGValue (Maybe Text) Source # 
Instance details

Defined in Data.GI.Base.GValue

IsGValue (Maybe String) Source # 
Instance details

Defined in Data.GI.Base.GValue

IsGVariant a => IsGVariant (Maybe a) Source # 
Instance details

Defined in Data.GI.Base.GVariant

(.) :: (b -> c) -> (a -> b) -> a -> c infixr 9 #

Right to left function composition.

(f . g) x = f (g x)
f . id = f = id . f

Examples

Expand
>>> map ((*2) . length) [[], [0, 1, 2], [0]]
[0,6,2]
>>> foldr (.) id [(+1), (*3), (^3)] 2
25
>>> let (...) = (.).(.) in ((*2)...(+)) 5 10
30

($) :: (a -> b) -> a -> b infixr 0 #

($) is the function application operator.

Applying ($) to a function f and an argument x gives the same result as applying f to x directly. The definition is akin to this:

($) :: (a -> b) -> a -> b
($) f x = f x

This is id specialized from a -> a to (a -> b) -> (a -> b) which by the associativity of (->) is the same as (a -> b) -> a -> b.

On the face of it, this may appear pointless! But it's actually one of the most useful and important operators in Haskell.

The order of operations is very different between ($) and normal function application. Normal function application has precedence 10 - higher than any operator - and associates to the left. So these two definitions are equivalent:

expr = min 5 1 + 5
expr = ((min 5) 1) + 5

($) has precedence 0 (the lowest) and associates to the right, so these are equivalent:

expr = min 5 $ 1 + 5
expr = (min 5) (1 + 5)

Examples

Expand

A common use cases of ($) is to avoid parentheses in complex expressions.

For example, instead of using nested parentheses in the following Haskell function:

-- | Sum numbers in a string: strSum "100  5 -7" == 98
strSum :: String -> Int
strSum s = sum (mapMaybe readMaybe (words s))

we can deploy the function application operator:

-- | Sum numbers in a string: strSum "100  5 -7" == 98
strSum :: String -> Int
strSum s = sum $ mapMaybe readMaybe $ words s

($) is also used as a section (a partially applied operator), in order to indicate that we wish to apply some yet-unspecified function to a given value. For example, to apply the argument 5 to a list of functions:

applyFive :: [Int]
applyFive = map ($ 5) [(+1), (2^)]
>>> [6, 32]

Technical Remark (Representation Polymorphism)

Expand

($) is fully representation-polymorphic. This allows it to also be used with arguments of unlifted and even unboxed kinds, such as unboxed integers:

fastMod :: Int -> Int -> Int
fastMod (I# x) (I# m) = I# $ remInt# x m

(++) :: [a] -> [a] -> [a] infixr 5 #

(++) appends 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.

Performance considerations

Expand

This function takes linear time in the number of elements of the first list. Thus it is better to associate repeated applications of (++) to the right (which is the default behaviour): xs ++ (ys ++ zs) or simply xs ++ ys ++ zs, but not (xs ++ ys) ++ zs. For the same reason concat = foldr (++) [] has linear performance, while foldl (++) [] is prone to quadratic slowdown

Examples

Expand
>>> [1, 2, 3] ++ [4, 5, 6]
[1,2,3,4,5,6]
>>> [] ++ [1, 2, 3]
[1,2,3]
>>> [3, 2, 1] ++ []
[3,2,1]

(=<<) :: Monad m => (a -> m b) -> m a -> m b infixr 1 #

Same as >>=, but with the arguments interchanged.

as >>= f == f =<< as

(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c infixr 1 #

Left-to-right composition of Kleisli arrows.

'(bs >=> cs) a' can be understood as the do expression

do b <- bs a
   cs b

or in terms of (>>=) as

bs a >>= cs

data Bool #

Instances

Instances details
Bits Bool

Interpret Bool as 1-bit bit-field

@since base-4.7.0.0

Instance details

Defined in GHC.Internal.Bits

FiniteBits Bool

@since base-4.7.0.0

Instance details

Defined in GHC.Internal.Bits

Bounded Bool

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Enum Bool

@since base-2.01

Instance details

Defined in GHC.Internal.Enum

Methods

succ :: Bool -> Bool #

pred :: Bool -> Bool #

toEnum :: Int -> Bool #

fromEnum :: Bool -> Int #

enumFrom :: Bool -> [Bool] #

enumFromThen :: Bool -> Bool -> [Bool] #

enumFromTo :: Bool -> Bool -> [Bool] #

enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] #

Storable Bool

@since base-2.01

Instance details

Defined in GHC.Internal.Foreign.Storable

Methods

sizeOf :: Bool -> Int #

alignment :: Bool -> Int #

peekElemOff :: Ptr Bool -> Int -> IO Bool #

pokeElemOff :: Ptr Bool -> Int -> Bool -> IO () #

peekByteOff :: Ptr b -> Int -> IO Bool #

pokeByteOff :: Ptr b -> Int -> Bool -> IO () #

peek :: Ptr Bool -> IO Bool #

poke :: Ptr Bool -> Bool -> IO () #

Show Bool

@since base-2.01

Instance details

Defined in GHC.Internal.Show

Methods

showsPrec :: Int -> Bool -> ShowS #

show :: Bool -> String #

showList :: [Bool] -> ShowS #

Eq Bool 
Instance details

Defined in GHC.Classes

Methods

(==) :: Bool -> Bool -> Bool #

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

Ord Bool 
Instance details

Defined in GHC.Classes

Methods

compare :: Bool -> Bool -> Ordering #

(<) :: Bool -> Bool -> Bool #

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

(>) :: Bool -> Bool -> Bool #

(>=) :: Bool -> Bool -> Bool #

max :: Bool -> Bool -> Bool #

min :: Bool -> Bool -> Bool #

IsGValue Bool Source # 
Instance details

Defined in Data.GI.Base.GValue

IsGVariant Bool Source # 
Instance details

Defined in Data.GI.Base.GVariant

IsGVariantBasicType Bool Source # 
Instance details

Defined in Data.GI.Base.GVariant

data Float #

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

Instances details
PrintfArg Float

Since: base-2.1

Instance details

Defined in Text.Printf

Floating Float

@since base-2.01

Instance details

Defined in GHC.Internal.Float

RealFloat Float

@since base-2.01

Instance details

Defined in GHC.Internal.Float

Storable Float

@since base-2.01

Instance details

Defined in GHC.Internal.Foreign.Storable

Methods

sizeOf :: Float -> Int #

alignment :: Float -> Int #

peekElemOff :: Ptr Float -> Int -> IO Float #

pokeElemOff :: Ptr Float -> Int -> Float -> IO () #

peekByteOff :: Ptr b -> Int -> IO Float #

pokeByteOff :: Ptr b -> Int -> Float -> IO () #

peek :: Ptr Float -> IO Float #

poke :: Ptr Float -> Float -> IO () #

Eq Float

Note that due to the presence of NaN, Float's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Float)
False

Also note that Float's Eq instance does not satisfy extensionality:

>>> 0 == (-0 :: Float)
True
>>> recip 0 == recip (-0 :: Float)
False
Instance details

Defined in GHC.Classes

Methods

(==) :: Float -> Float -> Bool #

(/=) :: Float -> Float -> Bool #

Ord Float

See instance Ord Double for discussion of deviations from IEEE 754 standard.

Instance details

Defined in GHC.Classes

Methods

compare :: Float -> Float -> Ordering #

(<) :: Float -> Float -> Bool #

(<=) :: Float -> Float -> Bool #

(>) :: Float -> Float -> Bool #

(>=) :: Float -> Float -> Bool #

max :: Float -> Float -> Float #

min :: Float -> Float -> Float #

IsGValue Float Source # 
Instance details

Defined in Data.GI.Base.GValue

Foldable (UFloat :: Type -> Type)

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.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 #

toList :: UFloat a -> [a] #

null :: UFloat a -> Bool #

length :: UFloat a -> Int #

elem :: Eq a => a -> UFloat a -> Bool #

maximum :: Ord a => UFloat a -> a #

minimum :: Ord a => UFloat a -> a #

sum :: Num a => UFloat a -> a #

product :: Num a => UFloat a -> a #

Traversable (UFloat :: Type -> Type)

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UFloat a -> f (UFloat b) #

sequenceA :: Applicative f => UFloat (f a) -> f (UFloat a) #

mapM :: Monad m => (a -> m b) -> UFloat a -> m (UFloat b) #

sequence :: Monad m => UFloat (m a) -> m (UFloat a) #

data Double #

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

Instances details
PrintfArg Double

Since: base-2.1

Instance details

Defined in Text.Printf

Floating Double

@since base-2.01

Instance details

Defined in GHC.Internal.Float

RealFloat Double

@since base-2.01

Instance details

Defined in GHC.Internal.Float

Storable Double

@since base-2.01

Instance details

Defined in GHC.Internal.Foreign.Storable

Eq Double

Note that due to the presence of NaN, Double's Eq instance does not satisfy reflexivity.

>>> 0/0 == (0/0 :: Double)
False

Also note that Double's Eq instance does not satisfy substitutivity:

>>> 0 == (-0 :: Double)
True
>>> recip 0 == recip (-0 :: Double)
False
Instance details

Defined in GHC.Classes

Methods

(==) :: Double -> Double -> Bool #

(/=) :: Double -> Double -> Bool #

Ord Double

IEEE 754 Double-precision type includes not only numbers, but also positive and negative infinities and a special element called NaN (which can be quiet or signal).

IEEE 754-2008, section 5.11 requires that if at least one of arguments of <=, <, >, >= is NaN then the result of the comparison is False, and instance Ord Double complies with this requirement. This violates the reflexivity: both NaN <= NaN and NaN >= NaN are False.

IEEE 754-2008, section 5.10 defines totalOrder predicate. Unfortunately, compare on Doubles violates the IEEE standard and does not define a total order. More specifically, both compare NaN x and compare x NaN always return GT.

Thus, users must be extremely cautious when using instance Ord Double. For instance, one should avoid ordered containers with keys represented by Double, because data loss and corruption may happen. An IEEE-compliant compare is available in fp-ieee package as TotallyOrdered newtype.

Moving further, the behaviour of min and max with regards to NaN is also non-compliant. IEEE 754-2008, section 5.3.1 defines that quiet NaN should be treated as a missing data by minNum and maxNum functions, for example, minNum(NaN, 1) = minNum(1, NaN) = 1. Some languages such as Java deviate from the standard implementing minNum(NaN, 1) = minNum(1, NaN) = NaN. However, min / max in base are even worse: min NaN 1 is 1, but min 1 NaN is NaN.

IEEE 754-2008 compliant min / max can be found in ieee754 package under minNum / maxNum names. Implementations compliant with minimumNumber / maximumNumber from a newer IEEE 754-2019, section 9.6 are available from fp-ieee package.

Instance details

Defined in GHC.Classes

IsGValue Double Source # 
Instance details

Defined in Data.GI.Base.GValue

IsGVariant Double Source # 
Instance details

Defined in Data.GI.Base.GVariant

IsGVariantBasicType Double Source # 
Instance details

Defined in Data.GI.Base.GVariant

Foldable (UDouble :: Type -> Type)

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.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 #

toList :: UDouble a -> [a] #

null :: UDouble a -> Bool #

length :: UDouble a -> Int #

elem :: Eq a => a -> UDouble a -> Bool #

maximum :: Ord a => UDouble a -> a #

minimum :: Ord a => UDouble a -> a #

sum :: Num a => UDouble a -> a #

product :: Num a => UDouble a -> a #

Traversable (UDouble :: Type -> Type)

@since base-4.9.0.0

Instance details

Defined in GHC.Internal.Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> UDouble a -> f (UDouble b) #

sequenceA :: Applicative f => UDouble (f a) -> f (UDouble a) #

mapM :: Monad m => (a -> m b) -> UDouble a -> m (UDouble b) #

sequence :: Monad m => UDouble (m a) -> m (UDouble a) #

undefined :: HasCallStack => a #

A special case of error. It is expected that compilers will recognize this and insert error messages which are more appropriate to the context in which undefined appears.

error :: HasCallStack => [Char] -> a #

error stops execution and displays an error message.

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, ...]

this means that map id == id

Examples

Expand
>>> map (+1) [1, 2, 3]
[2,3,4]
>>> map id [1, 2, 3]
[1,2,3]
>>> map (\n -> 3 * n + 1) [1, 2, 3]
[4,7,10]

length :: Foldable t => t a -> Int #

Returns the size/length of a finite structure as an Int. The default implementation just counts elements starting with the leftmost. Instances for structures that can compute the element count faster than via element-by-element counting, should provide a specialised implementation.

Examples

Expand

Basic usage:

>>> length []
0
>>> length ['a', 'b', 'c']
3
>>> length [1..]
* Hangs forever *

@since base-4.8.0.0

mapM :: (Traversable t, 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_.

Examples

Expand

mapM is literally a traverse with a type signature restricted to Monad. Its implementation may be more efficient due to additional power of Monad.

mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m () #

Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM.

mapM_ is just like traverse_, but specialised to monadic actions.

when :: Applicative f => Bool -> f () -> f () #

Conditional execution of Applicative expressions. For example,

Examples

Expand
when debug (putStrLn "Debugging")

will output the string Debugging if the Boolean value debug is True, and otherwise do nothing.

>>> putStr "pi:" >> when False (print 3.14159)
pi:

fromIntegral :: (Integral a, Num b) => a -> b #

General coercion from Integral types.

WARNING: This function performs silent truncation if the result type is not at least as big as the argument's type.

realToFrac :: (Real a, Fractional b) => a -> b #

General coercion to Fractional types.

WARNING: This function goes through the Rational type, which does not have values for NaN for example. This means it does not round-trip.

For Double it also behaves differently with or without -O0:

Prelude> realToFrac nan -- With -O0
-Infinity
Prelude> realToFrac nan
NaN

class a ~# b => (a :: k) ~ (b :: k) infix 4 #

Lifted, homogeneous equality. By lifted, we mean that it can be bogus (deferred type error). By homogeneous, the two types a and b must have the same kinds.