Safe Haskell | None |
---|---|
Language | Haskell2010 |
BasePrelude
Description
Reexports of most of the definitions from the "base" package, which it is a common practice to import unqualified.
For details check out the source.
Synopsis
- (++) :: [a] -> [a] -> [a]
- seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b
- filter :: (a -> Bool) -> [a] -> [a]
- zip :: [a] -> [b] -> [(a, b)]
- newStablePtr :: a -> IO (StablePtr a)
- print :: Show a => a -> IO ()
- fst :: (a, b) -> a
- snd :: (a, b) -> b
- otherwise :: Bool
- assert :: Bool -> a -> a
- lazy :: a -> a
- assertError :: (?callStack :: CallStack) => Bool -> a -> a
- trace :: String -> a -> a
- inline :: a -> a
- map :: (a -> b) -> [a] -> [b]
- groupWith :: Ord b => (a -> b) -> [a] -> [[a]]
- ($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- coerce :: forall (k :: RuntimeRep) (a :: TYPE k) (b :: TYPE k). Coercible a b => a -> b
- fromIntegral :: (Integral a, Num b) => a -> b
- realToFrac :: (Real a, Fractional b) => a -> b
- guard :: Alternative f => Bool -> f ()
- class IsList l where
- toDyn :: Typeable a => a -> Dynamic
- join :: Monad m => m (m a) -> m a
- class Bounded a where
- class Enum a where
- succ :: a -> a
- pred :: a -> a
- toEnum :: Int -> a
- fromEnum :: a -> Int
- enumFrom :: a -> [a]
- enumFromThen :: a -> a -> [a]
- enumFromTo :: a -> a -> [a]
- enumFromThenTo :: a -> a -> a -> [a]
- class Eq a where
- class Fractional a => Floating a where
- pi :: a
- exp :: a -> a
- log :: a -> a
- sqrt :: a -> a
- (**) :: a -> a -> a
- logBase :: a -> a -> a
- sin :: a -> a
- cos :: a -> a
- tan :: a -> a
- asin :: a -> a
- acos :: a -> a
- atan :: a -> a
- sinh :: a -> a
- cosh :: a -> a
- tanh :: a -> a
- asinh :: a -> a
- acosh :: a -> a
- atanh :: a -> a
- log1p :: a -> a
- expm1 :: a -> a
- log1pexp :: a -> a
- log1mexp :: a -> a
- class Num a => Fractional a where
- (/) :: a -> a -> a
- recip :: a -> a
- fromRational :: Rational -> a
- class (Real a, Enum a) => Integral a where
- class Applicative m => Monad (m :: Type -> Type) where
- class Typeable a => Data a where
- gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> a -> c a
- gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a
- toConstr :: a -> Constr
- dataTypeOf :: a -> DataType
- dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c a)
- dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)
- gmapT :: (forall b. Data b => b -> b) -> a -> a
- gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
- gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
- gmapQ :: (forall d. Data d => d -> u) -> a -> [u]
- gmapQi :: Int -> (forall d. Data d => d -> u) -> a -> u
- gmapM :: Monad m => (forall d. Data d => d -> m d) -> a -> m a
- gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a
- gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a
- class Functor (f :: Type -> Type) where
- class Num a where
- class Eq a => Ord a where
- class Read a where
- class (Num a, Ord a) => Real a where
- toRational :: a -> Rational
- class (RealFrac a, Floating a) => RealFloat a where
- floatRadix :: a -> Integer
- floatDigits :: a -> Int
- floatRange :: a -> (Int, Int)
- decodeFloat :: a -> (Integer, Int)
- encodeFloat :: Integer -> Int -> a
- exponent :: a -> Int
- significand :: a -> a
- scaleFloat :: Int -> a -> a
- isNaN :: a -> Bool
- isInfinite :: a -> Bool
- isDenormalized :: a -> Bool
- isNegativeZero :: a -> Bool
- isIEEE :: a -> Bool
- atan2 :: a -> a -> a
- class (Real a, Fractional a) => RealFrac a where
- class Show a where
- class Ord a => Ix a where
- class Typeable (a :: k)
- class Monad m => MonadFix (m :: Type -> Type) where
- mfix :: (a -> m a) -> m a
- class Monad m => MonadFail (m :: Type -> Type) where
- class IsString a where
- fromString :: String -> a
- class Functor f => Applicative (f :: Type -> Type) where
- class Foldable (t :: Type -> Type) where
- fold :: Monoid m => t m -> m
- foldMap :: Monoid m => (a -> m) -> t a -> m
- foldMap' :: Monoid m => (a -> m) -> t a -> m
- foldr :: (a -> b -> b) -> b -> t a -> b
- foldr' :: (a -> b -> b) -> b -> t a -> b
- foldl :: (b -> a -> b) -> b -> t a -> b
- foldl' :: (b -> a -> b) -> b -> t a -> b
- foldr1 :: (a -> a -> a) -> t a -> a
- foldl1 :: (a -> a -> a) -> t a -> a
- null :: t a -> Bool
- length :: t a -> Int
- elem :: Eq a => a -> t a -> Bool
- maximum :: Ord a => t a -> a
- minimum :: Ord a => t a -> a
- sum :: Num a => t a -> a
- product :: Num a => t a -> a
- class (Functor t, Foldable t) => Traversable (t :: Type -> Type) where
- traverse :: Applicative f => (a -> f b) -> t a -> f (t b)
- sequenceA :: Applicative f => t (f a) -> f (t a)
- mapM :: Monad m => (a -> m b) -> t a -> m (t b)
- sequence :: Monad m => t (m a) -> m (t a)
- class Generic a
- class Generic1 (f :: k -> Type)
- class IsLabel (x :: Symbol) a where
- fromLabel :: a
- class Semigroup a where
- class Semigroup a => Monoid a where
- class HasField (x :: k) r a | x r -> a where
- getField :: r -> a
- data Bool
- data Char
- data Double
- data Float
- data Int
- data Int8
- data Int16
- data Int32
- data Int64
- data Integer
- data Natural
- data Maybe a
- data Ordering
- data Ratio a
- type Rational = Ratio Integer
- data RealWorld
- data StablePtr a
- data IO a
- data Word
- data Word8
- data Word16
- data Word32
- data Word64
- data Ptr a
- data FunPtr a
- data Either a b
- class a ~R# b => Coercible (a :: k) (b :: k)
- data TyCon
- phase :: RealFloat a => Complex a -> a
- magnitude :: RealFloat a => Complex a -> a
- polar :: RealFloat a => Complex a -> (a, a)
- cis :: Floating a => a -> Complex a
- mkPolar :: Floating a => a -> a -> Complex a
- conjugate :: Num a => Complex a -> Complex a
- imagPart :: Complex a -> a
- realPart :: Complex a -> a
- data Complex a = !a :+ !a
- showFixed :: forall k (a :: k). HasResolution a => Bool -> Fixed a -> String
- mod' :: Real a => a -> a -> a
- divMod' :: (Real a, Integral b) => a -> a -> (b, a)
- div' :: (Real a, Integral b) => a -> a -> b
- newtype Fixed (a :: k) = MkFixed Integer
- class HasResolution (a :: k) where
- resolution :: p a -> Integer
- data E0
- type Uni = Fixed E0
- data E1
- type Deci = Fixed E1
- data E2
- type Centi = Fixed E2
- data E3
- type Milli = Fixed E3
- data E6
- type Micro = Fixed E6
- data E9
- type Nano = Fixed E9
- data E12
- type Pico = Fixed E12
- comparisonEquivalence :: Comparison a -> Equivalence a
- defaultEquivalence :: Eq a => Equivalence a
- defaultComparison :: Ord a => Comparison a
- (>$$<) :: Contravariant f => f b -> (a -> b) -> f a
- (>$<) :: Contravariant f => (a -> b) -> f b -> f a
- ($<) :: Contravariant f => f b -> b -> f a
- phantom :: (Functor f, Contravariant f) => f a -> f b
- class Contravariant (f :: Type -> Type) where
- newtype Predicate a = Predicate {
- getPredicate :: a -> Bool
- newtype Comparison a = Comparison {
- getComparison :: a -> a -> Ordering
- newtype Equivalence a = Equivalence {
- getEquivalence :: a -> a -> Bool
- newtype Op a b = Op {
- getOp :: b -> a
- newtype Compose (f :: k -> Type) (g :: k1 -> k) (a :: k1) = Compose {
- getCompose :: f (g a)
- vacuous :: Functor f => f Void -> f a
- absurd :: Void -> a
- data Void
- option :: b -> (a -> b) -> Option a -> b
- mtimesDefault :: (Integral b, Monoid a) => b -> a -> a
- diff :: Semigroup m => m -> Endo m
- cycle1 :: Semigroup m => m -> m
- newtype Min a = Min {
- getMin :: a
- newtype Max a = Max {
- getMax :: a
- data Arg a b = Arg a b
- type ArgMin a b = Min (Arg a b)
- type ArgMax a b = Max (Arg a b)
- newtype First a = First {
- getFirst :: a
- newtype Last a = Last {
- getLast :: a
- newtype WrappedMonoid m = WrapMonoid {
- unwrapMonoid :: m
- getOption :: Option a -> Maybe a
- sortWith :: Ord b => (a -> b) -> [a] -> [a]
- type family Item l
- tyconModule :: String -> String
- tyconUQname :: String -> String
- isNorepType :: DataType -> Bool
- mkNoRepType :: String -> DataType
- mkCharConstr :: DataType -> Char -> Constr
- mkRealConstr :: (Real a, Show a) => DataType -> a -> Constr
- mkIntegralConstr :: (Integral a, Show a) => DataType -> a -> Constr
- mkCharType :: String -> DataType
- mkFloatType :: String -> DataType
- mkIntType :: String -> DataType
- maxConstrIndex :: DataType -> ConIndex
- constrIndex :: Constr -> ConIndex
- indexConstr :: DataType -> ConIndex -> Constr
- isAlgType :: DataType -> Bool
- readConstr :: DataType -> String -> Maybe Constr
- showConstr :: Constr -> String
- constrFixity :: Constr -> Fixity
- constrFields :: Constr -> [String]
- dataTypeConstrs :: DataType -> [Constr]
- mkConstr :: DataType -> String -> [String] -> Fixity -> Constr
- mkDataType :: String -> [Constr] -> DataType
- repConstr :: DataType -> ConstrRep -> Constr
- constrRep :: Constr -> ConstrRep
- constrType :: Constr -> DataType
- dataTypeRep :: DataType -> DataRep
- dataTypeName :: DataType -> String
- fromConstrM :: (Monad m, Data a) => (forall d. Data d => m d) -> Constr -> m a
- fromConstrB :: Data a => (forall d. Data d => d) -> Constr -> a
- fromConstr :: Data a => Constr -> a
- data DataType
- data Constr
- data DataRep
- data ConstrRep
- type ConIndex = Int
- data Fixity
- timeout :: Int -> IO a -> IO (Maybe a)
- data Timeout
- threadWaitWriteSTM :: Fd -> IO (STM (), IO ())
- threadWaitReadSTM :: Fd -> IO (STM (), IO ())
- threadWaitWrite :: Fd -> IO ()
- threadWaitRead :: Fd -> IO ()
- runInUnboundThread :: IO a -> IO a
- runInBoundThread :: IO a -> IO a
- isCurrentThreadBound :: IO Bool
- forkOSWithUnmask :: ((forall a. IO a -> IO a) -> IO ()) -> IO ThreadId
- forkOS :: IO () -> IO ThreadId
- forkFinally :: IO a -> (Either SomeException a -> IO ()) -> IO ThreadId
- rtsSupportsBoundThreads :: Bool
- writeList2Chan :: Chan a -> [a] -> IO ()
- getChanContents :: Chan a -> IO [a]
- dupChan :: Chan a -> IO (Chan a)
- readChan :: Chan a -> IO a
- writeChan :: Chan a -> a -> IO ()
- newChan :: IO (Chan a)
- data Chan a
- signalQSem :: QSem -> IO ()
- waitQSem :: QSem -> IO ()
- newQSem :: Int -> IO QSem
- data QSem
- signalQSemN :: QSemN -> Int -> IO ()
- waitQSemN :: QSemN -> Int -> IO ()
- newQSemN :: Int -> IO QSemN
- data QSemN
- class Bifunctor (p :: Type -> Type -> Type) where
- showsBinary1 :: (Show1 f, Show1 g, Show a) => String -> Int -> f a -> g a -> ShowS
- showsUnary1 :: (Show1 f, Show a) => String -> Int -> f a -> ShowS
- showsUnary :: Show a => String -> Int -> a -> ShowS
- readsBinary1 :: (Read1 f, Read1 g, Read a) => String -> (f a -> g a -> t) -> String -> ReadS t
- readsUnary1 :: (Read1 f, Read a) => String -> (f a -> t) -> String -> ReadS t
- readsUnary :: Read a => String -> (a -> t) -> String -> ReadS t
- showsBinaryWith :: (Int -> a -> ShowS) -> (Int -> b -> ShowS) -> String -> Int -> a -> b -> ShowS
- showsUnaryWith :: (Int -> a -> ShowS) -> String -> Int -> a -> ShowS
- readBinaryWith :: ReadPrec a -> ReadPrec b -> String -> (a -> b -> t) -> ReadPrec t
- readsBinaryWith :: (Int -> ReadS a) -> (Int -> ReadS b) -> String -> (a -> b -> t) -> String -> ReadS t
- readUnaryWith :: ReadPrec a -> String -> (a -> t) -> ReadPrec t
- readsUnaryWith :: (Int -> ReadS a) -> String -> (a -> t) -> String -> ReadS t
- readData :: ReadPrec a -> ReadPrec a
- readsData :: (String -> ReadS a) -> Int -> ReadS a
- showsPrec2 :: (Show2 f, Show a, Show b) => Int -> f a b -> ShowS
- liftReadListPrec2Default :: Read2 f => ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [f a b]
- liftReadList2Default :: Read2 f => (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [f a b]
- readPrec2 :: (Read2 f, Read a, Read b) => ReadPrec (f a b)
- readsPrec2 :: (Read2 f, Read a, Read b) => Int -> ReadS (f a b)
- compare2 :: (Ord2 f, Ord a, Ord b) => f a b -> f a b -> Ordering
- eq2 :: (Eq2 f, Eq a, Eq b) => f a b -> f a b -> Bool
- showsPrec1 :: (Show1 f, Show a) => Int -> f a -> ShowS
- liftReadListPrecDefault :: Read1 f => ReadPrec a -> ReadPrec [a] -> ReadPrec [f a]
- liftReadListDefault :: Read1 f => (Int -> ReadS a) -> ReadS [a] -> ReadS [f a]
- readPrec1 :: (Read1 f, Read a) => ReadPrec (f a)
- readsPrec1 :: (Read1 f, Read a) => Int -> ReadS (f a)
- compare1 :: (Ord1 f, Ord a) => f a -> f a -> Ordering
- eq1 :: (Eq1 f, Eq a) => f a -> f a -> Bool
- class Eq1 (f :: Type -> Type) where
- class Eq1 f => Ord1 (f :: Type -> Type) where
- liftCompare :: (a -> b -> Ordering) -> f a -> f b -> Ordering
- class Read1 (f :: Type -> Type) where
- liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (f a)
- liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [f a]
- liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (f a)
- liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [f a]
- class Show1 (f :: Type -> Type) where
- class Eq2 (f :: Type -> Type -> Type) where
- class Eq2 f => Ord2 (f :: Type -> Type -> Type) where
- liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> f a c -> f b d -> Ordering
- class Read2 (f :: Type -> Type -> Type) where
- liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (f a b)
- liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [f a b]
- liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (f a b)
- liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [f a b]
- class Show2 (f :: Type -> Type -> Type) where
- class Monad m => MonadIO (m :: Type -> Type) where
- approxRational :: RealFrac a => a -> a -> Rational
- modifySTRef' :: STRef s a -> (a -> a) -> ST s ()
- modifySTRef :: STRef s a -> (a -> a) -> ST s ()
- hashUnique :: Unique -> Int
- newUnique :: IO Unique
- data Unique
- eqStableName :: StableName a -> StableName b -> Bool
- hashStableName :: StableName a -> Int
- makeStableName :: a -> IO (StableName a)
- data StableName a
- getEnvironment :: IO [(String, String)]
- withProgName :: String -> IO a -> IO a
- withArgs :: [String] -> IO a -> IO a
- unsetEnv :: String -> IO ()
- setEnv :: String -> String -> IO ()
- lookupEnv :: String -> IO (Maybe String)
- getEnv :: String -> IO String
- getProgName :: IO String
- getArgs :: IO [String]
- getExecutablePath :: IO FilePath
- die :: String -> IO a
- exitSuccess :: IO a
- exitFailure :: IO a
- exitWith :: ExitCode -> IO a
- performGC :: IO ()
- performMajorGC :: IO ()
- performMinorGC :: IO ()
- hPrintf :: HPrintfType r => Handle -> String -> r
- printf :: PrintfType r => String -> r
- mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a
- (<$!>) :: Monad m => (a -> b) -> m a -> m b
- unless :: Applicative f => Bool -> f () -> f ()
- replicateM_ :: Applicative m => Int -> m a -> m ()
- replicateM :: Applicative m => Int -> m a -> m [a]
- foldM_ :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m ()
- foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m ()
- zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c]
- mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])
- forever :: Applicative f => f a -> f b
- (<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c
- (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c
- filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a]
- makeVersion :: [Int] -> Version
- parseVersion :: ReadP Version
- showVersion :: Version -> String
- data Version = Version {
- versionBranch :: [Int]
- versionTags :: [String]
- traceMarkerIO :: String -> IO ()
- traceMarker :: String -> a -> a
- traceEventIO :: String -> IO ()
- traceEvent :: String -> a -> a
- traceStack :: String -> a -> a
- traceShowM :: (Show a, Applicative f) => a -> f ()
- traceM :: Applicative f => String -> f ()
- traceShowId :: Show a => a -> a
- traceShow :: Show a => a -> b -> b
- traceId :: String -> String
- putTraceMsg :: String -> IO ()
- traceIO :: String -> IO ()
- isSubsequenceOf :: Eq a => [a] -> [a] -> Bool
- foldMapDefault :: (Traversable t, Monoid m) => (a -> m) -> t a -> m
- fmapDefault :: Traversable t => (a -> b) -> t a -> t b
- mapAccumR :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
- mapAccumL :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
- forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b)
- for :: (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b)
- optional :: Alternative f => f a -> f (Maybe a)
- newtype WrappedMonad (m :: Type -> Type) a = WrapMonad {
- unwrapMonad :: m a
- newtype WrappedArrow (a :: Type -> Type -> Type) b c = WrapArrow {
- unwrapArrow :: a b c
- newtype ZipList a = ZipList {
- getZipList :: [a]
- leftApp :: ArrowApply a => a b c -> a (Either b d) (Either c d)
- (^<<) :: Arrow a => (c -> d) -> a b c -> a b d
- (<<^) :: Arrow a => a c d -> (b -> c) -> a b d
- (>>^) :: Arrow a => a b c -> (c -> d) -> a b d
- (^>>) :: Arrow a => (b -> c) -> a c d -> a b d
- returnA :: Arrow a => a b b
- class Category a => Arrow (a :: Type -> Type -> Type) where
- newtype Kleisli (m :: Type -> Type) a b = Kleisli {
- runKleisli :: a -> m b
- class Arrow a => ArrowZero (a :: Type -> Type -> Type) where
- zeroArrow :: a b c
- class ArrowZero a => ArrowPlus (a :: Type -> Type -> Type) where
- (<+>) :: a b c -> a b c -> a b c
- class Arrow a => ArrowChoice (a :: Type -> Type -> Type) where
- class Arrow a => ArrowApply (a :: Type -> Type -> Type) where
- app :: a (a b c, b) c
- newtype ArrowMonad (a :: Type -> Type -> Type) b = ArrowMonad (a () b)
- class Arrow a => ArrowLoop (a :: Type -> Type -> Type) where
- loop :: a (b, d) (c, d) -> a b c
- newtype Identity a = Identity {
- runIdentity :: a
- openBinaryTempFileWithDefaultPermissions :: FilePath -> String -> IO (FilePath, Handle)
- openTempFileWithDefaultPermissions :: FilePath -> String -> IO (FilePath, Handle)
- openBinaryTempFile :: FilePath -> String -> IO (FilePath, Handle)
- openTempFile :: FilePath -> String -> IO (FilePath, Handle)
- fixIO :: (a -> IO a) -> IO a
- withBinaryFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
- withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
- hPrint :: Show a => Handle -> a -> IO ()
- hReady :: Handle -> IO Bool
- localeEncoding :: TextEncoding
- readIO :: Read a => String -> IO a
- readLn :: Read a => IO a
- appendFile :: FilePath -> String -> IO ()
- writeFile :: FilePath -> String -> IO ()
- readFile :: FilePath -> IO String
- interact :: (String -> String) -> IO ()
- getContents :: IO String
- getLine :: IO String
- getChar :: IO Char
- putStrLn :: String -> IO ()
- putStr :: String -> IO ()
- putChar :: Char -> IO ()
- hShow :: Handle -> IO String
- hSetNewlineMode :: Handle -> NewlineMode -> IO ()
- hSetBinaryMode :: Handle -> Bool -> IO ()
- hIsTerminalDevice :: Handle -> IO Bool
- hGetEcho :: Handle -> IO Bool
- hSetEcho :: Handle -> Bool -> IO ()
- hIsSeekable :: Handle -> IO Bool
- hGetBuffering :: Handle -> IO BufferMode
- hIsWritable :: Handle -> IO Bool
- hIsReadable :: Handle -> IO Bool
- hIsClosed :: Handle -> IO Bool
- hIsOpen :: Handle -> IO Bool
- hTell :: Handle -> IO Integer
- hSeek :: Handle -> SeekMode -> Integer -> IO ()
- hSetPosn :: HandlePosn -> IO ()
- hGetPosn :: Handle -> IO HandlePosn
- hGetEncoding :: Handle -> IO (Maybe TextEncoding)
- hSetEncoding :: Handle -> TextEncoding -> IO ()
- hSetBuffering :: Handle -> BufferMode -> IO ()
- hLookAhead :: Handle -> IO Char
- isEOF :: IO Bool
- hIsEOF :: Handle -> IO Bool
- hSetFileSize :: Handle -> Integer -> IO ()
- hFileSize :: Handle -> IO Integer
- hClose :: Handle -> IO ()
- data HandlePosn
- openBinaryFile :: FilePath -> IOMode -> IO Handle
- openFile :: FilePath -> IOMode -> IO Handle
- stderr :: Handle
- stdin :: Handle
- hGetBufNonBlocking :: Handle -> Ptr a -> Int -> IO Int
- hGetBufSome :: Handle -> Ptr a -> Int -> IO Int
- hGetBuf :: Handle -> Ptr a -> Int -> IO Int
- hPutBufNonBlocking :: Handle -> Ptr a -> Int -> IO Int
- hPutBuf :: Handle -> Ptr a -> Int -> IO ()
- hPutStrLn :: Handle -> String -> IO ()
- hPutStr :: Handle -> String -> IO ()
- hPutChar :: Handle -> Char -> IO ()
- hGetContents :: Handle -> IO String
- hGetLine :: Handle -> IO String
- hGetChar :: Handle -> IO Char
- hWaitForInput :: Handle -> Int -> IO Bool
- registerDelay :: Int -> IO (TVar Bool)
- threadDelay :: Int -> IO ()
- closeFdWith :: (Fd -> IO ()) -> Fd -> IO ()
- ioManagerCapabilitiesChanged :: IO ()
- ensureIOManagerIsRunning :: IO ()
- runHandlers :: ForeignPtr Word8 -> Signal -> IO ()
- setHandler :: Signal -> Maybe (HandlerFun, Dynamic) -> IO (Maybe (HandlerFun, Dynamic))
- type Signal = CInt
- type HandlerFun = ForeignPtr Word8 -> IO ()
- mkWeakMVar :: MVar a -> IO () -> IO (Weak (MVar a))
- addMVarFinalizer :: MVar a -> IO () -> IO ()
- modifyMVarMasked :: MVar a -> (a -> IO (a, b)) -> IO b
- modifyMVarMasked_ :: MVar a -> (a -> IO a) -> IO ()
- modifyMVar :: MVar a -> (a -> IO (a, b)) -> IO b
- modifyMVar_ :: MVar a -> (a -> IO a) -> IO ()
- withMVarMasked :: MVar a -> (a -> IO b) -> IO b
- withMVar :: MVar a -> (a -> IO b) -> IO b
- swapMVar :: MVar a -> a -> IO a
- mkTextEncoding :: String -> IO TextEncoding
- char8 :: TextEncoding
- utf32be :: TextEncoding
- utf32le :: TextEncoding
- utf32 :: TextEncoding
- utf16be :: TextEncoding
- utf16le :: TextEncoding
- utf16 :: TextEncoding
- utf8_bom :: TextEncoding
- utf8 :: TextEncoding
- latin1 :: TextEncoding
- unsafeFixIO :: (a -> IO a) -> IO a
- allowInterrupt :: IO ()
- catches :: IO a -> [Handler a] -> IO a
- data Handler a = Exception e => Handler (e -> IO a)
- fixST :: (a -> ST s a) -> ST s a
- catchIOError :: IO a -> (IOError -> IO a) -> IO a
- annotateIOError :: IOError -> String -> Maybe Handle -> Maybe FilePath -> IOError
- modifyIOError :: (IOError -> IOError) -> IO a -> IO a
- ioeSetFileName :: IOError -> FilePath -> IOError
- ioeSetHandle :: IOError -> Handle -> IOError
- ioeSetLocation :: IOError -> String -> IOError
- ioeSetErrorString :: IOError -> String -> IOError
- ioeSetErrorType :: IOError -> IOErrorType -> IOError
- ioeGetFileName :: IOError -> Maybe FilePath
- ioeGetHandle :: IOError -> Maybe Handle
- ioeGetLocation :: IOError -> String
- ioeGetErrorString :: IOError -> String
- ioeGetErrorType :: IOError -> IOErrorType
- isResourceVanishedErrorType :: IOErrorType -> Bool
- isUserErrorType :: IOErrorType -> Bool
- isPermissionErrorType :: IOErrorType -> Bool
- isIllegalOperationErrorType :: IOErrorType -> Bool
- isEOFErrorType :: IOErrorType -> Bool
- isFullErrorType :: IOErrorType -> Bool
- isAlreadyInUseErrorType :: IOErrorType -> Bool
- isDoesNotExistErrorType :: IOErrorType -> Bool
- isAlreadyExistsErrorType :: IOErrorType -> Bool
- resourceVanishedErrorType :: IOErrorType
- userErrorType :: IOErrorType
- permissionErrorType :: IOErrorType
- illegalOperationErrorType :: IOErrorType
- eofErrorType :: IOErrorType
- fullErrorType :: IOErrorType
- alreadyInUseErrorType :: IOErrorType
- doesNotExistErrorType :: IOErrorType
- alreadyExistsErrorType :: IOErrorType
- isResourceVanishedError :: IOError -> Bool
- isUserError :: IOError -> Bool
- isPermissionError :: IOError -> Bool
- isIllegalOperation :: IOError -> Bool
- isEOFError :: IOError -> Bool
- isFullError :: IOError -> Bool
- isAlreadyInUseError :: IOError -> Bool
- isDoesNotExistError :: IOError -> Bool
- isAlreadyExistsError :: IOError -> Bool
- mkIOError :: IOErrorType -> String -> Maybe Handle -> Maybe FilePath -> IOError
- tryIOError :: IO a -> IO (Either IOError a)
- bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
- bracket_ :: IO a -> IO b -> IO c -> IO c
- finally :: IO a -> IO b -> IO a
- bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
- onException :: IO a -> IO b -> IO a
- tryJust :: Exception e => (e -> Maybe b) -> IO a -> IO (Either b a)
- try :: Exception e => IO a -> IO (Either e a)
- mapException :: (Exception e1, Exception e2) => (e1 -> e2) -> a -> a
- handleJust :: Exception e => (e -> Maybe b) -> (b -> IO a) -> IO a -> IO a
- handle :: Exception e => (e -> IO a) -> IO a -> IO a
- catchJust :: Exception e => (e -> Maybe b) -> IO a -> (b -> IO a) -> IO a
- newtype PatternMatchFail = PatternMatchFail String
- newtype RecSelError = RecSelError String
- newtype RecConError = RecConError String
- newtype RecUpdError = RecUpdError String
- newtype NoMethodError = NoMethodError String
- newtype TypeError = TypeError String
- data NonTermination = NonTermination
- data NestedAtomically = NestedAtomically
- getUncaughtExceptionHandler :: IO (SomeException -> IO ())
- setUncaughtExceptionHandler :: (SomeException -> IO ()) -> IO ()
- reportError :: SomeException -> IO ()
- reportStackOverflow :: IO ()
- writeTVar :: TVar a -> a -> STM ()
- readTVar :: TVar a -> STM a
- readTVarIO :: TVar a -> IO a
- newTVarIO :: a -> IO (TVar a)
- newTVar :: a -> STM (TVar a)
- catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a
- throwSTM :: Exception e => e -> STM a
- retry :: STM a
- atomically :: STM a -> IO a
- unsafeIOToSTM :: IO a -> STM a
- newStablePtrPrimMVar :: MVar () -> IO (StablePtr PrimMVar)
- mkWeakThreadId :: ThreadId -> IO (Weak ThreadId)
- threadCapability :: ThreadId -> IO (Int, Bool)
- threadStatus :: ThreadId -> IO ThreadStatus
- runSparks :: IO ()
- par :: a -> b -> b
- pseq :: a -> b -> b
- labelThread :: ThreadId -> String -> IO ()
- yield :: IO ()
- myThreadId :: IO ThreadId
- throwTo :: Exception e => ThreadId -> e -> IO ()
- killThread :: ThreadId -> IO ()
- childHandler :: SomeException -> IO ()
- numSparks :: IO Int
- getNumProcessors :: IO Int
- setNumCapabilities :: Int -> IO ()
- getNumCapabilities :: IO Int
- numCapabilities :: Int
- forkOnWithUnmask :: Int -> ((forall a. IO a -> IO a) -> IO ()) -> IO ThreadId
- forkOn :: Int -> IO () -> IO ThreadId
- forkIOWithUnmask :: ((forall a. IO a -> IO a) -> IO ()) -> IO ThreadId
- forkIO :: IO () -> IO ThreadId
- disableAllocationLimit :: IO ()
- enableAllocationLimit :: IO ()
- getAllocationCounter :: IO Int64
- setAllocationCounter :: Int64 -> IO ()
- reportHeapOverflow :: IO ()
- data ThreadId = ThreadId ThreadId#
- data BlockReason
- data ThreadStatus
- data PrimMVar
- newtype STM a = STM (State# RealWorld -> (# State# RealWorld, a #))
- data TVar a = TVar (TVar# RealWorld a)
- dynTypeRep :: Dynamic -> SomeTypeRep
- dynApp :: Dynamic -> Dynamic -> Dynamic
- dynApply :: Dynamic -> Dynamic -> Maybe Dynamic
- fromDynamic :: Typeable a => Dynamic -> Maybe a
- fromDyn :: Typeable a => Dynamic -> a -> a
- data Dynamic where
- untangle :: Addr# -> String -> String
- ioError :: IOError -> IO a
- ioException :: IOException -> IO a
- heapOverflow :: SomeException
- stackOverflow :: SomeException
- asyncExceptionFromException :: Exception e => SomeException -> Maybe e
- asyncExceptionToException :: Exception e => e -> SomeException
- cannotCompactMutable :: SomeException
- cannotCompactPinned :: SomeException
- cannotCompactFunction :: SomeException
- allocationLimitExceeded :: SomeException
- blockedIndefinitelyOnSTM :: SomeException
- blockedIndefinitelyOnMVar :: SomeException
- data BlockedIndefinitelyOnMVar = BlockedIndefinitelyOnMVar
- data BlockedIndefinitelyOnSTM = BlockedIndefinitelyOnSTM
- data Deadlock = Deadlock
- data AllocationLimitExceeded = AllocationLimitExceeded
- newtype CompactionFailed = CompactionFailed String
- newtype AssertionFailed = AssertionFailed String
- data SomeAsyncException = Exception e => SomeAsyncException e
- data AsyncException
- data ArrayException
- data FixIOException = FixIOException
- data ExitCode
- data IOErrorType
- hFlush :: Handle -> IO ()
- stdout :: Handle
- noNewlineTranslation :: NewlineMode
- nativeNewlineMode :: NewlineMode
- universalNewlineMode :: NewlineMode
- nativeNewline :: Newline
- data Handle
- data BufferMode
- data Newline
- data NewlineMode = NewlineMode {}
- data SeekMode
- atomicWriteIORef :: IORef a -> a -> IO ()
- atomicModifyIORef :: IORef a -> (a -> (a, b)) -> IO b
- modifyIORef' :: IORef a -> (a -> a) -> IO ()
- modifyIORef :: IORef a -> (a -> a) -> IO ()
- mkWeakIORef :: IORef a -> IO () -> IO (Weak (IORef a))
- data TextEncoding
- mallocForeignPtrArray0 :: Storable a => Int -> IO (ForeignPtr a)
- mallocForeignPtrArray :: Storable a => Int -> IO (ForeignPtr a)
- newForeignPtrEnv :: FinalizerEnvPtr env a -> Ptr env -> Ptr a -> IO (ForeignPtr a)
- withForeignPtr :: ForeignPtr a -> (Ptr a -> IO b) -> IO b
- newForeignPtr :: FinalizerPtr a -> Ptr a -> IO (ForeignPtr a)
- finalizeForeignPtr :: ForeignPtr a -> IO ()
- plusForeignPtr :: ForeignPtr a -> Int -> ForeignPtr b
- castForeignPtr :: ForeignPtr a -> ForeignPtr b
- touchForeignPtr :: ForeignPtr a -> IO ()
- newForeignPtr_ :: Ptr a -> IO (ForeignPtr a)
- addForeignPtrFinalizerEnv :: FinalizerEnvPtr env a -> Ptr env -> ForeignPtr a -> IO ()
- addForeignPtrFinalizer :: FinalizerPtr a -> ForeignPtr a -> IO ()
- mallocForeignPtrBytes :: Int -> IO (ForeignPtr a)
- mallocForeignPtr :: Storable a => IO (ForeignPtr a)
- data ForeignPtr a
- type FinalizerPtr a = FunPtr (Ptr a -> IO ())
- type FinalizerEnvPtr env a = FunPtr (Ptr env -> Ptr a -> IO ())
- atomicModifyIORef' :: IORef a -> (a -> (a, b)) -> IO b
- writeIORef :: IORef a -> a -> IO ()
- readIORef :: IORef a -> IO a
- newIORef :: a -> IO (IORef a)
- data IORef a
- evaluate :: a -> IO a
- uninterruptibleMask :: ((forall a. IO a -> IO a) -> IO b) -> IO b
- uninterruptibleMask_ :: IO a -> IO a
- mask :: ((forall a. IO a -> IO a) -> IO b) -> IO b
- mask_ :: IO a -> IO a
- getMaskingState :: IO MaskingState
- interruptible :: IO a -> IO a
- throwIO :: Exception e => e -> IO a
- catch :: Exception e => IO a -> (e -> IO a) -> IO a
- stToIO :: ST RealWorld a -> IO a
- type FilePath = String
- data MaskingState
- userError :: String -> IOError
- unsupportedOperation :: IOError
- data IOException = IOError {}
- type IOError = IOException
- throw :: forall (r :: RuntimeRep) (a :: TYPE r) e. Exception e => e -> a
- data ErrorCall where
- class (Typeable e, Show e) => Exception e where
- toException :: e -> SomeException
- fromException :: SomeException -> Maybe e
- displayException :: e -> String
- data ArithException
- typeOf7 :: Typeable t => t a b c d e f g -> TypeRep
- typeOf6 :: Typeable t => t a b c d e f -> TypeRep
- typeOf5 :: Typeable t => t a b c d e -> TypeRep
- typeOf4 :: Typeable t => t a b c d -> TypeRep
- typeOf3 :: Typeable t => t a b c -> TypeRep
- typeOf2 :: Typeable t => t a b -> TypeRep
- typeOf1 :: Typeable t => t a -> TypeRep
- rnfTypeRep :: TypeRep -> ()
- typeRepFingerprint :: TypeRep -> Fingerprint
- typeRepTyCon :: TypeRep -> TyCon
- typeRepArgs :: TypeRep -> [TypeRep]
- splitTyConApp :: TypeRep -> (TyCon, [TypeRep])
- mkFunTy :: TypeRep -> TypeRep -> TypeRep
- funResultTy :: TypeRep -> TypeRep -> Maybe TypeRep
- gcast2 :: forall k1 k2 k3 c (t :: k2 -> k3 -> k1) (t' :: k2 -> k3 -> k1) (a :: k2) (b :: k3). (Typeable t, Typeable t') => c (t a b) -> Maybe (c (t' a b))
- gcast1 :: forall k1 k2 c (t :: k2 -> k1) (t' :: k2 -> k1) (a :: k2). (Typeable t, Typeable t') => c (t a) -> Maybe (c (t' a))
- gcast :: forall k (a :: k) (b :: k) c. (Typeable a, Typeable b) => c a -> Maybe (c b)
- eqT :: forall k (a :: k) (b :: k). (Typeable a, Typeable b) => Maybe (a :~: b)
- cast :: (Typeable a, Typeable b) => a -> Maybe b
- showsTypeRep :: TypeRep -> ShowS
- typeRep :: forall k proxy (a :: k). Typeable a => proxy a -> TypeRep
- typeOf :: Typeable a => a -> TypeRep
- type TypeRep = SomeTypeRep
- rnfTyCon :: TyCon -> ()
- tyConFingerprint :: TyCon -> Fingerprint
- tyConName :: TyCon -> String
- tyConModule :: TyCon -> String
- tyConPackage :: TyCon -> String
- newtype Const a (b :: k) = Const {
- getConst :: a
- find :: Foldable t => (a -> Bool) -> t a -> Maybe a
- notElem :: (Foldable t, Eq a) => a -> t a -> Bool
- minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a
- maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a
- all :: Foldable t => (a -> Bool) -> t a -> Bool
- any :: Foldable t => (a -> Bool) -> t a -> Bool
- or :: Foldable t => t Bool -> Bool
- and :: Foldable t => t Bool -> Bool
- concatMap :: Foldable t => (a -> [b]) -> t a -> [b]
- concat :: Foldable t => t [a] -> [a]
- msum :: (Foldable t, MonadPlus m) => t (m a) -> m a
- asum :: (Foldable t, Alternative f) => t (f a) -> f a
- sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()
- sequenceA_ :: (Foldable t, Applicative f) => t (f a) -> f ()
- forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m ()
- mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
- for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
- traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
- foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
- foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b
- newtype Ap (f :: k -> Type) (a :: k) = Ap {
- getAp :: f a
- stimesMonoid :: (Integral b, Monoid a) => b -> a -> a
- stimesIdempotent :: Integral b => b -> a -> a
- newtype Dual a = Dual {
- getDual :: a
- newtype Endo a = Endo {
- appEndo :: a -> a
- newtype All = All {}
- newtype Any = Any {}
- newtype Sum a = Sum {
- getSum :: a
- newtype Product a = Product {
- getProduct :: a
- newtype Alt (f :: k -> Type) (a :: k) = Alt {
- getAlt :: f a
- unsafeCoerce :: a -> b
- unwords :: [String] -> String
- words :: String -> [String]
- unlines :: [String] -> String
- lines :: String -> [String]
- unfoldr :: (b -> Maybe (a, b)) -> b -> [a]
- sortOn :: Ord b => (a -> b) -> [a] -> [a]
- sortBy :: (a -> a -> Ordering) -> [a] -> [a]
- sort :: Ord a => [a] -> [a]
- permutations :: [a] -> [[a]]
- subsequences :: [a] -> [[a]]
- tails :: [a] -> [[a]]
- inits :: [a] -> [[a]]
- groupBy :: (a -> a -> Bool) -> [a] -> [[a]]
- group :: Eq a => [a] -> [[a]]
- deleteFirstsBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
- unzip7 :: [(a, b, c, d, e, f, g)] -> ([a], [b], [c], [d], [e], [f], [g])
- unzip6 :: [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f])
- unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e])
- unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d])
- zipWith7 :: (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h]
- zipWith6 :: (a -> b -> c -> d -> e -> f -> g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g]
- zipWith5 :: (a -> b -> c -> d -> e -> f) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f]
- zipWith4 :: (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e]
- zip7 :: [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)]
- zip6 :: [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)]
- zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)]
- zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)]
- genericReplicate :: Integral i => i -> a -> [a]
- genericIndex :: Integral i => [a] -> i -> a
- genericSplitAt :: Integral i => i -> [a] -> ([a], [a])
- genericDrop :: Integral i => i -> [a] -> [a]
- genericTake :: Integral i => i -> [a] -> [a]
- genericLength :: Num i => [a] -> i
- insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a]
- insert :: Ord a => a -> [a] -> [a]
- partition :: (a -> Bool) -> [a] -> ([a], [a])
- transpose :: [[a]] -> [[a]]
- intercalate :: [a] -> [[a]] -> [a]
- intersperse :: a -> [a] -> [a]
- intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
- intersect :: Eq a => [a] -> [a] -> [a]
- unionBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
- union :: Eq a => [a] -> [a] -> [a]
- (\\) :: Eq a => [a] -> [a] -> [a]
- deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a]
- delete :: Eq a => a -> [a] -> [a]
- nubBy :: (a -> a -> Bool) -> [a] -> [a]
- nub :: Eq a => [a] -> [a]
- isInfixOf :: Eq a => [a] -> [a] -> Bool
- isSuffixOf :: Eq a => [a] -> [a] -> Bool
- isPrefixOf :: Eq a => [a] -> [a] -> Bool
- findIndices :: (a -> Bool) -> [a] -> [Int]
- findIndex :: (a -> Bool) -> [a] -> Maybe Int
- elemIndices :: Eq a => a -> [a] -> [Int]
- elemIndex :: Eq a => a -> [a] -> Maybe Int
- stripPrefix :: Eq a => [a] -> [a] -> Maybe [a]
- dropWhileEnd :: (a -> Bool) -> [a] -> [a]
- isSeparator :: Char -> Bool
- isNumber :: Char -> Bool
- isMark :: Char -> Bool
- isLetter :: Char -> Bool
- digitToInt :: Char -> Int
- read :: Read a => String -> a
- readMaybe :: Read a => String -> Maybe a
- readEither :: Read a => String -> Either String a
- reads :: Read a => ReadS a
- fromRight :: b -> Either a b -> b
- fromLeft :: a -> Either a b -> a
- isRight :: Either a b -> Bool
- isLeft :: Either a b -> Bool
- partitionEithers :: [Either a b] -> ([a], [b])
- rights :: [Either a b] -> [b]
- lefts :: [Either a b] -> [a]
- either :: (a -> c) -> (b -> c) -> Either a b -> c
- comparing :: Ord a => (b -> a) -> b -> b -> Ordering
- newtype Down a = Down {
- getDown :: a
- asProxyTypeOf :: a -> proxy a -> a
- data Proxy (t :: k) = Proxy
- data KProxy t = KProxy
- (>>>) :: forall k cat (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c
- (<<<) :: forall k cat (b :: k) (c :: k) (a :: k). Category cat => cat b c -> cat a b -> cat a c
- class Category (cat :: k -> k -> Type) where
- data (a :: k) :~: (b :: k) where
- data (a :: k1) :~~: (b :: k2) where
- intPtrToPtr :: IntPtr -> Ptr a
- ptrToIntPtr :: Ptr a -> IntPtr
- wordPtrToPtr :: WordPtr -> Ptr a
- ptrToWordPtr :: Ptr a -> WordPtr
- freeHaskellFunPtr :: FunPtr a -> IO ()
- newtype WordPtr = WordPtr Word
- newtype IntPtr = IntPtr Int
- data IOMode
- class Storable a where
- castPtrToStablePtr :: Ptr () -> StablePtr a
- castStablePtrToPtr :: StablePtr a -> Ptr ()
- deRefStablePtr :: StablePtr a -> IO a
- freeStablePtr :: StablePtr a -> IO ()
- castPtrToFunPtr :: Ptr a -> FunPtr b
- castFunPtrToPtr :: FunPtr a -> Ptr b
- castFunPtr :: FunPtr a -> FunPtr b
- nullFunPtr :: FunPtr a
- minusPtr :: Ptr a -> Ptr b -> Int
- alignPtr :: Ptr a -> Int -> Ptr a
- plusPtr :: Ptr a -> Int -> Ptr b
- castPtr :: Ptr a -> Ptr b
- nullPtr :: Ptr a
- showOct :: (Integral a, Show a) => a -> ShowS
- showHex :: (Integral a, Show a) => a -> ShowS
- showIntAtBase :: (Integral a, Show a) => a -> (Int -> Char) -> a -> ShowS
- showHFloat :: RealFloat a => a -> ShowS
- showGFloatAlt :: RealFloat a => Maybe Int -> a -> ShowS
- showFFloatAlt :: RealFloat a => Maybe Int -> a -> ShowS
- showGFloat :: RealFloat a => Maybe Int -> a -> ShowS
- showFFloat :: RealFloat a => Maybe Int -> a -> ShowS
- showEFloat :: RealFloat a => Maybe Int -> a -> ShowS
- showInt :: Integral a => a -> ShowS
- readSigned :: Real a => ReadS a -> ReadS a
- readFloat :: RealFrac a => ReadS a
- readHex :: (Eq a, Num a) => ReadS a
- readDec :: (Eq a, Num a) => ReadS a
- readOct :: (Eq a, Num a) => ReadS a
- readInt :: Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a
- lexDigits :: ReadS String
- readLitChar :: ReadS Char
- lexLitChar :: ReadS String
- lex :: ReadS String
- readParen :: Bool -> ReadS a -> ReadS a
- readS_to_Prec :: (Int -> ReadS a) -> ReadPrec a
- readPrec_to_S :: ReadPrec a -> Int -> ReadS a
- readP_to_Prec :: (Int -> ReadP a) -> ReadPrec a
- readPrec_to_P :: ReadPrec a -> Int -> ReadP a
- data ReadPrec a
- readS_to_P :: ReadS a -> ReadP a
- readP_to_S :: ReadP a -> ReadS a
- type ReadS a = String -> [(a, String)]
- data ReadP a
- fromRat :: RealFloat a => Rational -> a
- floatToDigits :: RealFloat a => Integer -> a -> ([Int], Int)
- showFloat :: RealFloat a => a -> ShowS
- bitReverse64 :: Word64 -> Word64
- bitReverse32 :: Word32 -> Word32
- bitReverse16 :: Word16 -> Word16
- bitReverse8 :: Word8 -> Word8
- byteSwap64 :: Word64 -> Word64
- byteSwap32 :: Word32 -> Word32
- byteSwap16 :: Word16 -> Word16
- toTitle :: Char -> Char
- toUpper :: Char -> Char
- toLower :: Char -> Char
- isLower :: Char -> Bool
- isUpper :: Char -> Bool
- isPrint :: Char -> Bool
- isControl :: Char -> Bool
- isAlphaNum :: Char -> Bool
- isAlpha :: Char -> Bool
- isSymbol :: Char -> Bool
- isPunctuation :: Char -> Bool
- isHexDigit :: Char -> Bool
- isOctDigit :: Char -> Bool
- isDigit :: Char -> Bool
- isSpace :: Char -> Bool
- isAsciiUpper :: Char -> Bool
- isAsciiLower :: Char -> Bool
- isLatin1 :: Char -> Bool
- isAscii :: Char -> Bool
- generalCategory :: Char -> GeneralCategory
- data GeneralCategory
- = UppercaseLetter
- | LowercaseLetter
- | TitlecaseLetter
- | ModifierLetter
- | OtherLetter
- | NonSpacingMark
- | SpacingCombiningMark
- | EnclosingMark
- | DecimalNumber
- | LetterNumber
- | OtherNumber
- | ConnectorPunctuation
- | DashPunctuation
- | OpenPunctuation
- | ClosePunctuation
- | InitialQuote
- | FinalQuote
- | OtherPunctuation
- | MathSymbol
- | CurrencySymbol
- | ModifierSymbol
- | OtherSymbol
- | Space
- | LineSeparator
- | ParagraphSeparator
- | Control
- | Format
- | Surrogate
- | PrivateUse
- | NotAssigned
- toIntegralSized :: (Integral a, Integral b, Bits a, Bits b) => a -> Maybe b
- popCountDefault :: (Bits a, Num a) => a -> Int
- testBitDefault :: (Bits a, Num a) => a -> Int -> Bool
- bitDefault :: (Bits a, Num a) => Int -> a
- class Eq a => Bits a where
- (.&.) :: a -> a -> a
- (.|.) :: a -> a -> a
- xor :: a -> a -> a
- complement :: a -> a
- shift :: a -> Int -> a
- rotate :: a -> Int -> a
- zeroBits :: a
- bit :: Int -> a
- setBit :: a -> Int -> a
- clearBit :: a -> Int -> a
- complementBit :: a -> Int -> a
- testBit :: a -> Int -> Bool
- bitSizeMaybe :: a -> Maybe Int
- bitSize :: a -> Int
- isSigned :: a -> Bool
- shiftL :: a -> Int -> a
- unsafeShiftL :: a -> Int -> a
- shiftR :: a -> Int -> a
- unsafeShiftR :: a -> Int -> a
- rotateL :: a -> Int -> a
- rotateR :: a -> Int -> a
- popCount :: a -> Int
- class Bits b => FiniteBits b where
- finiteBitSize :: b -> Int
- countLeadingZeros :: b -> Int
- countTrailingZeros :: b -> Int
- lcm :: Integral a => a -> a -> a
- gcd :: Integral a => a -> a -> a
- (^^) :: (Fractional a, Integral b) => a -> b -> a
- (^) :: (Num a, Integral b) => a -> b -> a
- odd :: Integral a => a -> Bool
- even :: Integral a => a -> Bool
- showSigned :: Real a => (a -> ShowS) -> Int -> a -> ShowS
- denominator :: Ratio a -> a
- numerator :: Ratio a -> a
- (%) :: Integral a => a -> a -> Ratio a
- chr :: Int -> Char
- writeSTRef :: STRef s a -> a -> ST s ()
- readSTRef :: STRef s a -> ST s a
- newSTRef :: a -> ST s (STRef s a)
- data STRef s a
- runST :: (forall s. ST s a) -> a
- data ST s a
- intToDigit :: Int -> Char
- showLitChar :: Char -> ShowS
- showParen :: Bool -> ShowS -> ShowS
- showString :: String -> ShowS
- showChar :: Char -> ShowS
- shows :: Show a => a -> ShowS
- type ShowS = String -> String
- unzip3 :: [(a, b, c)] -> ([a], [b], [c])
- unzip :: [(a, b)] -> ([a], [b])
- zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
- zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
- (!!) :: [a] -> Int -> a
- lookup :: Eq a => a -> [(a, b)] -> Maybe b
- reverse :: [a] -> [a]
- break :: (a -> Bool) -> [a] -> ([a], [a])
- span :: (a -> Bool) -> [a] -> ([a], [a])
- splitAt :: Int -> [a] -> ([a], [a])
- drop :: Int -> [a] -> [a]
- take :: Int -> [a] -> [a]
- dropWhile :: (a -> Bool) -> [a] -> [a]
- takeWhile :: (a -> Bool) -> [a] -> [a]
- cycle :: [a] -> [a]
- replicate :: Int -> a -> [a]
- repeat :: a -> [a]
- iterate' :: (a -> a) -> a -> [a]
- iterate :: (a -> a) -> a -> [a]
- scanr1 :: (a -> a -> a) -> [a] -> [a]
- scanr :: (a -> b -> b) -> b -> [a] -> [b]
- scanl' :: (b -> a -> b) -> b -> [a] -> [b]
- scanl1 :: (a -> a -> a) -> [a] -> [a]
- scanl :: (b -> a -> b) -> b -> [a] -> [b]
- foldl1' :: (a -> a -> a) -> [a] -> a
- init :: [a] -> [a]
- last :: [a] -> a
- tail :: [a] -> [a]
- uncons :: [a] -> Maybe (a, [a])
- head :: [a] -> a
- mapMaybe :: (a -> Maybe b) -> [a] -> [b]
- catMaybes :: [Maybe a] -> [a]
- listToMaybe :: [a] -> Maybe a
- maybeToList :: Maybe a -> [a]
- fromMaybe :: a -> Maybe a -> a
- fromJust :: HasCallStack => Maybe a -> a
- isNothing :: Maybe a -> Bool
- isJust :: Maybe a -> Bool
- maybe :: b -> (a -> b) -> Maybe a -> b
- bool :: a -> a -> Bool -> a
- (&) :: a -> (a -> b) -> b
- on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
- fix :: (a -> a) -> a
- void :: Functor f => f a -> f ()
- ($>) :: Functor f => f a -> b -> f b
- (<&>) :: Functor f => f a -> (a -> b) -> f b
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- swap :: (a, b) -> (b, a)
- uncurry :: (a -> b -> c) -> (a, b) -> c
- curry :: ((a, b) -> c) -> a -> b -> c
- unsafeInterleaveIO :: IO a -> IO a
- unsafeDupablePerformIO :: IO a -> a
- unsafePerformIO :: IO a -> a
- isEmptyMVar :: MVar a -> IO Bool
- tryReadMVar :: MVar a -> IO (Maybe a)
- tryPutMVar :: MVar a -> a -> IO Bool
- tryTakeMVar :: MVar a -> IO (Maybe a)
- putMVar :: MVar a -> a -> IO ()
- readMVar :: MVar a -> IO a
- takeMVar :: MVar a -> IO a
- newMVar :: a -> IO (MVar a)
- newEmptyMVar :: IO (MVar a)
- data MVar a
- subtract :: Num a => a -> a -> a
- asTypeOf :: a -> a -> a
- until :: (a -> Bool) -> (a -> a) -> a -> a
- ($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- flip :: (a -> b -> c) -> b -> a -> c
- const :: a -> b -> a
- ord :: Char -> Int
- ap :: Monad m => m (a -> b) -> m a -> m b
- liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r
- liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r
- liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r
- liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r
- liftM :: Monad m => (a1 -> r) -> m a1 -> m r
- when :: Applicative f => Bool -> f () -> f ()
- (=<<) :: Monad m => (a -> m b) -> m a -> m b
- liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- liftA :: Applicative f => (a -> b) -> f a -> f b
- (<**>) :: Applicative f => f a -> f (a -> b) -> f b
- class Applicative f => Alternative (f :: Type -> Type) where
- class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where
- data NonEmpty a = a :| [a]
- type String = [Char]
- undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
- errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). [Char] -> a
- error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
- stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a
- data SomeException = Exception e => SomeException e
- (&&) :: Bool -> Bool -> Bool
- (||) :: Bool -> Bool -> Bool
- not :: Bool -> Bool
Documentation
(++) :: [a] -> [a] -> [a] infixr 5 #
Append two lists, i.e.,
[x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn] [x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]
If the first list is not finite, the result is the first list.
seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b infixr 0 #
The value of seq a b
is bottom if a
is bottom, and
otherwise equal to b
. In other words, it evaluates the first
argument a
to weak head normal form (WHNF). seq
is usually
introduced to improve performance by avoiding unneeded laziness.
A note on evaluation order: the expression seq a b
does
not guarantee that a
will be evaluated before b
.
The only guarantee given by seq
is that the both a
and b
will be evaluated before seq
returns a value.
In particular, this means that b
may be evaluated before
a
. If you need to guarantee a specific order of evaluation,
you must use the function pseq
from the "parallel" package.
filter :: (a -> Bool) -> [a] -> [a] #
\(\mathcal{O}(n)\). filter
, applied to a predicate and a list, returns
the list of those elements that satisfy the predicate; i.e.,
filter p xs = [ x | x <- xs, p x]
>>>
filter odd [1, 2, 3]
[1,3]
zip :: [a] -> [b] -> [(a, b)] #
\(\mathcal{O}(\min(m,n))\). zip
takes two lists and returns a list of
corresponding pairs.
zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]
If one input list is short, excess elements of the longer list are discarded:
zip [1] ['a', 'b'] = [(1, 'a')] zip [1, 2] ['a'] = [(1, 'a')]
zip
is right-lazy:
zip [] _|_ = [] zip _|_ [] = _|_
zip
is capable of list fusion, but it is restricted to its
first list argument and its resulting list.
newStablePtr :: a -> IO (StablePtr a) #
Create a stable pointer referring to the given Haskell value.
print :: Show a => a -> IO () #
The print
function outputs a value of any printable type to the
standard output device.
Printable types are those that are instances of class Show
; print
converts values to strings for output using the show
operation and
adds a newline.
For example, a program to print the first 20 integers and their powers of 2 could be written as:
main = print ([(n, 2^n) | n <- [0..19]])
If the first argument evaluates to True
, then the result is the
second argument. Otherwise an AssertionFailed
exception
is raised, containing a String
with the source file and line number of the
call to assert
.
Assertions can normally be turned on or off with a compiler flag
(for GHC, assertions are normally on unless optimisation is turned on
with -O
or the -fignore-asserts
option is given). When assertions are turned off, the first
argument to assert
is ignored, and the second argument is
returned as the result.
The lazy
function restrains strictness analysis a little. The
call lazy e
means the same as e
, but lazy
has a magical
property so far as strictness analysis is concerned: it is lazy in
its first argument, even though its semantics is strict. After
strictness analysis has run, calls to lazy
are inlined to be the
identity function.
This behaviour is occasionally useful when controlling evaluation
order. Notably, lazy
is used in the library definition of
par
:
par :: a -> b -> b par x y = case (par# x) of _ -> lazy y
If lazy
were not lazy, par
would look strict in
y
which would defeat the whole purpose of par
.
Like seq
, the argument of lazy
can have an unboxed type.
assertError :: (?callStack :: CallStack) => Bool -> a -> a #
The trace
function outputs the trace message given as its first argument,
before returning the second argument as its result.
For example, this returns the value of f x
but first outputs the message.
>>>
let x = 123; f = show
>>>
trace ("calling f with x = " ++ show x) (f x)
"calling f with x = 123 123"
The trace
function should only be used for debugging, or for monitoring
execution. The function is not referentially transparent: its type indicates
that it is a pure function but it has the side effect of outputting the
trace message.
The call inline f
arranges that f
is inlined, regardless of
its size. More precisely, the call inline f
rewrites to the
right-hand side of f
's definition. This allows the programmer to
control inlining from a particular call site rather than the
definition site of the function (c.f. INLINE
pragmas).
This inlining occurs regardless of the argument to the call or the
size of f
's definition; it is unconditional. The main caveat is
that f
's definition must be visible to the compiler; it is
therefore recommended to mark the function with an INLINABLE
pragma at its definition so that GHC guarantees to record its
unfolding regardless of size.
If no inlining takes place, the inline
function expands to the
identity function in Phase zero, so its use imposes no overhead.
map :: (a -> b) -> [a] -> [b] #
\(\mathcal{O}(n)\). map
f xs
is the list obtained by applying f
to
each element of xs
, i.e.,
map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] map f [x1, x2, ...] == [f x1, f x2, ...]
>>>
map (+1) [1, 2, 3]
groupWith :: Ord b => (a -> b) -> [a] -> [[a]] #
The groupWith
function uses the user supplied function which
projects an element out of every list element in order to first sort the
input list and then to form groups by equality on these projected elements
($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b infixr 0 #
Application operator. This operator is redundant, since ordinary
application (f x)
means the same as (f
. However, $
x)$
has
low, right-associative binding precedence, so it sometimes allows
parentheses to be omitted; for example:
f $ g $ h x = f (g (h x))
It is also useful in higher-order situations, such as
,
or map
($
0) xs
.zipWith
($
) fs xs
Note that (
is levity-polymorphic in its result type, so that
$
)foo
where $
Truefoo :: Bool -> Int#
is well-typed.
coerce :: forall (k :: RuntimeRep) (a :: TYPE k) (b :: TYPE k). Coercible a b => a -> b #
The function coerce
allows you to safely convert between values of
types that have the same representation with no run-time overhead. In the
simplest case you can use it instead of a newtype constructor, to go from
the newtype's concrete type to the abstract type. But it also works in
more complicated settings, e.g. converting a list of newtypes to a list of
concrete types.
This function is runtime-representation polymorphic, but the
RuntimeRep
type argument is marked as Inferred
, meaning
that it is not available for visible type application. This means
the typechecker will accept coerce @Int @Age 42
.
fromIntegral :: (Integral a, Num b) => a -> b #
general coercion from integral types
realToFrac :: (Real a, Fractional b) => a -> b #
general coercion to fractional types
guard :: Alternative f => Bool -> f () #
Conditional failure of Alternative
computations. Defined by
guard True =pure
() guard False =empty
Examples
Common uses of guard
include conditionally signaling an error in
an error monad and conditionally rejecting the current choice in an
Alternative
-based parser.
As an example of signaling an error in the error monad Maybe
,
consider a safe division function safeDiv x y
that returns
Nothing
when the denominator y
is zero and
otherwise. For example:Just
(x `div`
y)
>>> safeDiv 4 0 Nothing >>> safeDiv 4 2 Just 2
A definition of safeDiv
using guards, but not guard
:
safeDiv :: Int -> Int -> Maybe Int safeDiv x y | y /= 0 = Just (x `div` y) | otherwise = Nothing
A definition of safeDiv
using guard
and Monad
do
-notation:
safeDiv :: Int -> Int -> Maybe Int safeDiv x y = do guard (y /= 0) return (x `div` y)
The IsList
class and its methods are intended to be used in
conjunction with the OverloadedLists extension.
Since: base-4.7.0.0
Methods
The fromList
function constructs the structure l
from the given
list of Item l
fromListN :: Int -> [Item l] -> l #
The fromListN
function takes the input list's length as a hint. Its
behaviour should be equivalent to fromList
. The hint can be used to
construct the structure l
more efficiently compared to fromList
. If
the given hint does not equal to the input list's length the behaviour of
fromListN
is not specified.
The toList
function extracts a list of Item l
from the structure l
.
It should satisfy fromList . toList = id.
Instances
toDyn :: Typeable a => a -> Dynamic #
Converts an arbitrary value into an object of type Dynamic
.
The type of the object must be an instance of Typeable
, which
ensures that only monomorphically-typed objects may be converted to
Dynamic
. To convert a polymorphic object into Dynamic
, give it
a monomorphic type signature. For example:
toDyn (id :: Int -> Int)
join :: Monad m => m (m a) -> m a #
The join
function is the conventional monad join operator. It
is used to remove one level of monadic structure, projecting its
bound argument into the outer level.
'
' can be understood as the join
bssdo
expression
do bs <- bss bs
Examples
A common use of join
is to run an IO
computation returned from
an STM
transaction, since STM
transactions
can't perform IO
directly. Recall that
atomically
:: STM a -> IO a
is used to run STM
transactions atomically. So, by
specializing the types of atomically
and join
to
atomically
:: STM (IO b) -> IO (IO b)join
:: IO (IO b) -> IO b
we can compose them as
join
.atomically
:: STM (IO b) -> IO b
The Bounded
class is used to name the upper and lower limits of a
type. Ord
is not a superclass of Bounded
since types that are not
totally ordered may also have upper and lower bounds.
The Bounded
class may be derived for any enumeration type;
minBound
is the first constructor listed in the data
declaration
and maxBound
is the last.
Bounded
may also be derived for single-constructor datatypes whose
constituent types are in Bounded
.
Instances
Bounded Bool | Since: base-2.1 |
Bounded Char | Since: base-2.1 |
Bounded Int | Since: base-2.1 |
Bounded Int8 | Since: base-2.1 |
Bounded Int16 | Since: base-2.1 |
Bounded Int32 | Since: base-2.1 |
Bounded Int64 | Since: base-2.1 |
Bounded Ordering | Since: base-2.1 |
Bounded Word | Since: base-2.1 |
Bounded Word8 | Since: base-2.1 |
Bounded Word16 | Since: base-2.1 |
Bounded Word32 | Since: base-2.1 |
Bounded Word64 | Since: base-2.1 |
Bounded VecCount | Since: base-4.10.0.0 |
Bounded VecElem | Since: base-4.10.0.0 |
Bounded () | Since: base-2.1 |
Bounded CDev | |
Bounded CIno | |
Bounded CMode | |
Bounded COff | |
Bounded CPid | |
Bounded CSsize | |
Bounded CGid | |
Bounded CNlink | |
Bounded CUid | |
Bounded CTcflag | |
Bounded CRLim | |
Bounded CBlkSize | |
Bounded CBlkCnt | |
Bounded CClockId | |
Bounded CFsBlkCnt | |
Bounded CFsFilCnt | |
Bounded CId | |
Bounded CKey | |
Bounded CSocklen | |
Bounded CNfds | |
Bounded Fd | |
Bounded All | Since: base-2.1 |
Bounded Any | Since: base-2.1 |
Bounded Associativity | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
Bounded SourceUnpackedness | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
Bounded SourceStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
Bounded DecidedStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
Bounded CChar | |
Bounded CSChar | |
Bounded CUChar | |
Bounded CShort | |
Bounded CUShort | |
Bounded CInt | |
Bounded CUInt | |
Bounded CLong | |
Bounded CULong | |
Bounded CLLong | |
Bounded CULLong | |
Bounded CBool | |
Bounded CPtrdiff | |
Bounded CSize | |
Bounded CWchar | |
Bounded CSigAtomic | |
Defined in Foreign.C.Types | |
Bounded CIntPtr | |
Bounded CUIntPtr | |
Bounded CIntMax | |
Bounded CUIntMax | |
Bounded WordPtr | |
Bounded IntPtr | |
Bounded GeneralCategory | Since: base-2.1 |
Defined in GHC.Unicode | |
Bounded a => Bounded (Min a) | Since: base-4.9.0.0 |
Bounded a => Bounded (Max a) | Since: base-4.9.0.0 |
Bounded a => Bounded (First a) | Since: base-4.9.0.0 |
Bounded a => Bounded (Last a) | Since: base-4.9.0.0 |
Bounded m => Bounded (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup | |
Bounded a => Bounded (Identity a) | Since: base-4.9.0.0 |
Bounded a => Bounded (Dual a) | Since: base-2.1 |
Bounded a => Bounded (Sum a) | Since: base-2.1 |
Bounded a => Bounded (Product a) | Since: base-2.1 |
Bounded a => Bounded (Down a) | Since: base-4.14.0.0 |
(Bounded a, Bounded b) => Bounded (a, b) | Since: base-2.1 |
Bounded (Proxy t) | Since: base-4.7.0.0 |
(Bounded a, Bounded b, Bounded c) => Bounded (a, b, c) | Since: base-2.1 |
Bounded a => Bounded (Const a b) | Since: base-4.9.0.0 |
(Applicative f, Bounded a) => Bounded (Ap f a) | Since: base-4.12.0.0 |
a ~ b => Bounded (a :~: b) | Since: base-4.7.0.0 |
(Bounded a, Bounded b, Bounded c, Bounded d) => Bounded (a, b, c, d) | Since: base-2.1 |
a ~~ b => Bounded (a :~~: b) | Since: base-4.10.0.0 |
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e) => Bounded (a, b, c, d, e) | Since: base-2.1 |
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f) => Bounded (a, b, c, d, e, f) | Since: base-2.1 |
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g) => Bounded (a, b, c, d, e, f, g) | Since: base-2.1 |
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h) => Bounded (a, b, c, d, e, f, g, h) | Since: base-2.1 |
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i) => Bounded (a, b, c, d, e, f, g, h, i) | Since: base-2.1 |
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j) => Bounded (a, b, c, d, e, f, g, h, i, j) | Since: base-2.1 |
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k) => Bounded (a, b, c, d, e, f, g, h, i, j, k) | Since: base-2.1 |
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l) | Since: base-2.1 |
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m) | Since: base-2.1 |
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | Since: base-2.1 |
(Bounded a, Bounded b, Bounded c, Bounded d, Bounded e, Bounded f, Bounded g, Bounded h, Bounded i, Bounded j, Bounded k, Bounded l, Bounded m, Bounded n, Bounded o) => Bounded (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | Since: base-2.1 |
Class Enum
defines operations on sequentially ordered types.
The enumFrom
... methods are used in Haskell's translation of
arithmetic sequences.
Instances of Enum
may be derived for any enumeration type (types
whose constructors have no fields). The nullary constructors are
assumed to be numbered left-to-right by fromEnum
from 0
through n-1
.
See Chapter 10 of the Haskell Report for more details.
For any type that is an instance of class Bounded
as well as Enum
,
the following should hold:
- The calls
andsucc
maxBound
should result in a runtime error.pred
minBound
fromEnum
andtoEnum
should give a runtime error if the result value is not representable in the result type. For example,
is an error.toEnum
7 ::Bool
enumFrom
andenumFromThen
should be defined with an implicit bound, thus:
enumFrom x = enumFromTo x maxBound enumFromThen x y = enumFromThenTo x y bound where bound | fromEnum y >= fromEnum x = maxBound | otherwise = minBound
Methods
the successor of a value. For numeric types, succ
adds 1.
the predecessor of a value. For numeric types, pred
subtracts 1.
Convert from an Int
.
Convert to an Int
.
It is implementation-dependent what fromEnum
returns when
applied to a value that is too large to fit in an Int
.
Used in Haskell's translation of [n..]
with [n..] = enumFrom n
,
a possible implementation being enumFrom n = n : enumFrom (succ n)
.
For example:
enumFrom 4 :: [Integer] = [4,5,6,7,...]
enumFrom 6 :: [Int] = [6,7,8,9,...,maxBound :: Int]
enumFromThen :: a -> a -> [a] #
Used in Haskell's translation of [n,n'..]
with [n,n'..] = enumFromThen n n'
, a possible implementation being
enumFromThen n n' = n : n' : worker (f x) (f x n')
,
worker s v = v : worker s (s v)
, x = fromEnum n' - fromEnum n
and
f n y
| n > 0 = f (n - 1) (succ y)
| n < 0 = f (n + 1) (pred y)
| otherwise = y
For example:
enumFromThen 4 6 :: [Integer] = [4,6,8,10...]
enumFromThen 6 2 :: [Int] = [6,2,-2,-6,...,minBound :: Int]
enumFromTo :: a -> a -> [a] #
Used in Haskell's translation of [n..m]
with
[n..m] = enumFromTo n m
, a possible implementation being
enumFromTo n m
| n <= m = n : enumFromTo (succ n) m
| otherwise = []
.
For example:
enumFromTo 6 10 :: [Int] = [6,7,8,9,10]
enumFromTo 42 1 :: [Integer] = []
enumFromThenTo :: a -> a -> a -> [a] #
Used in Haskell's translation of [n,n'..m]
with
[n,n'..m] = enumFromThenTo n n' m
, a possible implementation
being enumFromThenTo n n' m = worker (f x) (c x) n m
,
x = fromEnum n' - fromEnum n
, c x = bool (>=) ((x 0)
f n y
| n > 0 = f (n - 1) (succ y)
| n < 0 = f (n + 1) (pred y)
| otherwise = y
and
worker s c v m
| c v m = v : worker s c (s v) m
| otherwise = []
For example:
enumFromThenTo 4 2 -6 :: [Integer] = [4,2,0,-2,-4,-6]
enumFromThenTo 6 8 2 :: [Int] = []
Instances
The Eq
class defines equality (==
) and inequality (/=
).
All the basic datatypes exported by the Prelude are instances of Eq
,
and Eq
may be derived for any datatype whose constituents are also
instances of Eq
.
The Haskell Report defines no laws for Eq
. However, ==
is customarily
expected to implement an equivalence relationship where two values comparing
equal are indistinguishable by "public" functions, with a "public" function
being one not allowing to see implementation details. For example, for a
type representing non-normalised natural numbers modulo 100, a "public"
function doesn't make the difference between 1 and 201. It is expected to
have the following properties:
Instances
Eq Bool | |
Eq Char | |
Eq Double | Note that due to the presence of
Also note that
|
Eq Float | Note that due to the presence of
Also note that
|
Eq Int | |
Eq Int8 | Since: base-2.1 |
Eq Int16 | Since: base-2.1 |
Eq Int32 | Since: base-2.1 |
Eq Int64 | Since: base-2.1 |
Eq Integer | |
Eq Natural | Since: base-4.8.0.0 |
Eq Ordering | |
Eq Word | |
Eq Word8 | Since: base-2.1 |
Eq Word16 | Since: base-2.1 |
Eq Word32 | Since: base-2.1 |
Eq Word64 | Since: base-2.1 |
Eq SomeTypeRep | |
Defined in Data.Typeable.Internal | |
Eq () | |
Eq TyCon | |
Eq Module | |
Eq TrName | |
Eq Void | Since: base-4.8.0.0 |
Eq SpecConstrAnnotation | Since: base-4.3.0.0 |
Defined in GHC.Exts Methods (==) :: SpecConstrAnnotation -> SpecConstrAnnotation -> Bool # (/=) :: SpecConstrAnnotation -> SpecConstrAnnotation -> Bool # | |
Eq Constr | Equality of constructors Since: base-4.0.0.0 |
Eq DataRep | Since: base-4.0.0.0 |
Eq ConstrRep | Since: base-4.0.0.0 |
Eq Fixity | Since: base-4.0.0.0 |
Eq Timeout | |
Eq Unique | |
Eq Version | Since: base-2.1 |
Eq HandlePosn | Since: base-4.1.0.0 |
Defined in GHC.IO.Handle | |
Eq ThreadId | Since: base-4.2.0.0 |
Eq BlockReason | Since: base-4.3.0.0 |
Defined in GHC.Conc.Sync | |
Eq ThreadStatus | Since: base-4.3.0.0 |
Defined in GHC.Conc.Sync | |
Eq CDev | |
Eq CIno | |
Eq CMode | |
Eq COff | |
Eq CPid | |
Eq CSsize | |
Eq CGid | |
Eq CNlink | |
Eq CUid | |
Eq CCc | |
Eq CSpeed | |
Eq CTcflag | |
Eq CRLim | |
Eq CBlkSize | |
Eq CBlkCnt | |
Eq CClockId | |
Eq CFsBlkCnt | |
Eq CFsFilCnt | |
Eq CId | |
Eq CKey | |
Eq CTimer | |
Eq CSocklen | |
Eq CNfds | |
Eq Fd | |
Eq AsyncException | Since: base-4.2.0.0 |
Defined in GHC.IO.Exception Methods (==) :: AsyncException -> AsyncException -> Bool # (/=) :: AsyncException -> AsyncException -> Bool # | |
Eq ArrayException | Since: base-4.2.0.0 |
Defined in GHC.IO.Exception Methods (==) :: ArrayException -> ArrayException -> Bool # (/=) :: ArrayException -> ArrayException -> Bool # | |
Eq ExitCode | |
Eq IOErrorType | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception | |
Eq Handle | Since: base-4.1.0.0 |
Eq BufferMode | Since: base-4.2.0.0 |
Defined in GHC.IO.Handle.Types | |
Eq Newline | Since: base-4.2.0.0 |
Eq NewlineMode | Since: base-4.2.0.0 |
Defined in GHC.IO.Handle.Types | |
Eq IODeviceType | Since: base-4.2.0.0 |
Defined in GHC.IO.Device | |
Eq SeekMode | Since: base-4.2.0.0 |
Eq CodingProgress | Since: base-4.4.0.0 |
Defined in GHC.IO.Encoding.Types Methods (==) :: CodingProgress -> CodingProgress -> Bool # (/=) :: CodingProgress -> CodingProgress -> Bool # | |
Eq MaskingState | Since: base-4.3.0.0 |
Defined in GHC.IO | |
Eq IOException | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception | |
Eq ErrorCall | Since: base-4.7.0.0 |
Eq ArithException | Since: base-3.0 |
Defined in GHC.Exception.Type Methods (==) :: ArithException -> ArithException -> Bool # (/=) :: ArithException -> ArithException -> Bool # | |
Eq All | Since: base-2.1 |
Eq Any | Since: base-2.1 |
Eq Fixity | Since: base-4.6.0.0 |
Eq Associativity | Since: base-4.6.0.0 |
Defined in GHC.Generics Methods (==) :: Associativity -> Associativity -> Bool # (/=) :: Associativity -> Associativity -> Bool # | |
Eq SourceUnpackedness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods (==) :: SourceUnpackedness -> SourceUnpackedness -> Bool # (/=) :: SourceUnpackedness -> SourceUnpackedness -> Bool # | |
Eq SourceStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods (==) :: SourceStrictness -> SourceStrictness -> Bool # (/=) :: SourceStrictness -> SourceStrictness -> Bool # | |
Eq DecidedStrictness | Since: base-4.9.0.0 |
Defined in GHC.Generics Methods (==) :: DecidedStrictness -> DecidedStrictness -> Bool # (/=) :: DecidedStrictness -> DecidedStrictness -> Bool # | |
Eq CChar | |
Eq CSChar | |
Eq CUChar | |
Eq CShort | |
Eq CUShort | |
Eq CInt | |
Eq CUInt | |
Eq CLong | |
Eq CULong | |
Eq CLLong | |
Eq CULLong | |
Eq CBool | |
Eq CFloat | |
Eq CDouble | |
Eq CPtrdiff | |
Eq CSize | |
Eq CWchar | |
Eq CSigAtomic | |
Defined in Foreign.C.Types | |
Eq CClock | |
Eq CTime | |
Eq CUSeconds | |
Eq CSUSeconds | |
Defined in Foreign.C.Types | |
Eq CIntPtr | |
Eq CUIntPtr | |
Eq CIntMax | |
Eq CUIntMax | |
Eq WordPtr | |
Eq IntPtr | |
Eq IOMode | Since: base-4.2.0.0 |
Eq Fingerprint | Since: base-4.4.0.0 |
Defined in GHC.Fingerprint.Type | |
Eq GeneralCategory | Since: base-2.1 |
Defined in GHC.Unicode Methods (==) :: GeneralCategory -> GeneralCategory -> Bool # (/=) :: GeneralCategory -> GeneralCategory -> Bool # | |
Eq SrcLoc | Since: base-4.9.0.0 |
Eq BigNat | |
Eq a => Eq [a] | |
Eq a => Eq (Maybe a) | Since: base-2.1 |
Eq a => Eq (Ratio a) | Since: base-2.1 |
Eq (StablePtr a) | Since: base-2.1 |
Eq (Ptr a) | Since: base-2.1 |
Eq (FunPtr a) | |
Eq p => Eq (Par1 p) | Since: base-4.7.0.0 |
Eq a => Eq (Complex a) | Since: base-2.1 |
Eq a => Eq (Min a) | Since: base-4.9.0.0 |
Eq a => Eq (Max a) | Since: base-4.9.0.0 |
Eq a => Eq (First a) | Since: base-4.9.0.0 |
Eq a => Eq (Last a) | Since: base-4.9.0.0 |
Eq m => Eq (WrappedMonoid m) | Since: base-4.9.0.0 |
Defined in Data.Semigroup Methods (==) :: WrappedMonoid m -> WrappedMonoid m -> Bool # (/=) :: WrappedMonoid m -> WrappedMonoid m -> Bool # | |
Eq a => Eq (Option a) | Since: base-4.9.0.0 |
Eq (Chan a) | Since: base-4.4.0.0 |
Eq (StableName a) | Since: base-2.1 |
Defined in GHC.StableName | |
Eq a => Eq (ZipList a) | Since: base-4.7.0.0 |
Eq a => Eq (Identity a) | Since: base-4.8.0.0 |
Eq (TVar a) | Since: base-4.8.0.0 |
Eq (ForeignPtr a) | Since: base-2.1 |
Defined in GHC.ForeignPtr | |
Eq (IORef a) | Pointer equality. Since: base-4.0.0.0 |
Eq a => Eq (First a) | Since: base-2.1 |
Eq a => Eq (Last a) | Since: base-2.1 |
Eq a => Eq (Dual a) | Since: base-2.1 |
Eq a => Eq (Sum a) | Since: base-2.1 |
Eq a => Eq (Product a) | Since: base-2.1 |
Eq a => Eq (Down a) | Since: base-4.6.0.0 |
Eq (MVar a) | Since: base-4.1.0.0 |
Eq a => Eq (NonEmpty a) | Since: base-4.9.0.0 |
(Eq a, Eq b) => Eq (Either a b) | Since: base-2.1 |
Eq (V1 p) | Since: base-4.9.0.0 |
Eq (U1 p) | Since: base-4.9.0.0 |
Eq (TypeRep a) | Since: base-2.1 |
(Eq a, Eq b) => Eq (a, b) | |
Eq (Fixed a) | Since: base-2.1 |
Eq a => Eq (Arg a b) | Since: base-4.9.0.0 |
Eq (Proxy s) | Since: base-4.7.0.0 |
Eq (STRef s a) | Pointer equality. Since: base-2.1 |
Eq (f p) => Eq (Rec1 f p) | Since: base-4.7.0.0 |
Eq (URec (Ptr ()) p) | Since: base-4.9.0.0 |
Eq (URec Char p) | Since: base-4.9.0.0 |
Eq (URec Double p) | Since: base-4.9.0.0 |
Eq (URec Float p) | |
Eq (URec Int p) | Since: base-4.9.0.0 |
Eq (URec Word p) | Since: base-4.9.0.0 |
(Eq a, Eq b, Eq c) => Eq (a, b, c) | |
Eq a => Eq (Const a b) | Since: base-4.9.0.0 |
Eq (f a) => Eq (Ap f a) | Since: base-4.12.0.0 |
Eq (f a) => Eq (Alt f a) | Since: base-4.8.0.0 |
Eq (a :~: b) | Since: base-4.7.0.0 |
Eq c => Eq (K1 i c p) | Since: base-4.7.0.0 |
(Eq (f p), Eq (g p)) => Eq ((f :+: g) p) | Since: base-4.7.0.0 |
(Eq (f p), Eq (g p)) => Eq ((f :*: g) p) | Since: base-4.7.0.0 |
(Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) | |
(Eq1 f, Eq1 g, Eq a) => Eq (Product f g a) | Since: base-4.9.0.0 |
(Eq1 f, Eq1 g, Eq a) => Eq (Sum f g a) | Since: base-4.9.0.0 |
Eq (a :~~: b) | Since: base-4.10.0.0 |
Eq (f p) => Eq (M1 i c f p) | Since: base-4.7.0.0 |
Eq (f (g p)) => Eq ((f :.: g) p) | Since: base-4.7.0.0 |
(Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e) | |
(Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a) | Since: base-4.9.0.0 |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq (a, b, c, d, e, f, g) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) => Eq (a, b, c, d, e, f, g, h) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) => Eq (a, b, c, d, e, f, g, h, i) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j) => Eq (a, b, c, d, e, f, g, h, i, j) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k) => Eq (a, b, c, d, e, f, g, h, i, j, k) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l) => Eq (a, b, c, d, e, f, g, h, i, j, k, l) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | |
class Fractional a => Floating a where #
Trigonometric and hyperbolic functions and related functions.
The Haskell Report defines no laws for Floating
. However, (
, +
)(
and *
)exp
are customarily expected to define an exponential field and have
the following properties:
exp (a + b)
=exp a * exp b
exp (fromInteger 0)
=fromInteger 1
Minimal complete definition
pi, exp, log, sin, cos, asin, acos, atan, sinh, cosh, asinh, acosh, atanh
Methods
(**) :: a -> a -> a infixr 8 #
computes log1p
x
, but provides more precise
results for small (absolute) values of log
(1 + x)x
if possible.
Since: base-4.9.0.0
computes expm1
x
, but provides more precise
results for small (absolute) values of exp
x - 1x
if possible.
Since: base-4.9.0.0
Instances
class Num a => Fractional a where #
Fractional numbers, supporting real division.
The Haskell Report defines no laws for Fractional
. However, (
and
+
)(
are customarily expected to define a division ring and have the
following properties:*
)
recip
gives the multiplicative inversex * recip x
=recip x * x
=fromInteger 1
Note that it isn't customarily expected that a type instance of
Fractional
implement a field. However, all instances in base
do.
Minimal complete definition
fromRational, (recip | (/))
Methods
Fractional division.
Reciprocal fraction.
fromRational :: Rational -> a #
Conversion from a Rational
(that is
).
A floating literal stands for an application of Ratio
Integer
fromRational
to a value of type Rational
, so such literals have type
(
.Fractional
a) => a
Instances
Fractional CFloat | |
Fractional CDouble | |
Integral a => Fractional (Ratio a) | Since: base-2.0.1 |
RealFloat a => |