Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. forkIOWithUnmask :: ((forall a . () => IO a -> IO a) -> IO ()) -> IO ThreadId

    base GHC.Conc.Sync

    Like forkIO, but the child thread is passed a function that can be used to unmask asynchronous exceptions. This function is typically used in the following way

    ... mask_ $ forkIOWithUnmask $ \unmask ->
    catch (unmask ...) handler
    
    so that the exception handler in the child thread is established with asynchronous exceptions masked, meanwhile the main body of the child thread is executed in the unmasked state. Note that the unmask function passed to the child thread should only be used in that thread; the behaviour is undefined if it is invoked in a different thread.

  2. forkOn :: Int -> IO () -> IO ThreadId

    base GHC.Conc.Sync

    Like forkIO, but lets you specify on which capability the thread should run. Unlike a forkIO thread, a thread created by forkOn will stay on the same capability for its entire lifetime (forkIO threads can migrate between capabilities according to the scheduling policy). forkOn is useful for overriding the scheduling policy when you know in advance how best to distribute the threads. The Int argument specifies a capability number (see getNumCapabilities). Typically capabilities correspond to physical processors, but the exact behaviour is implementation-dependent. The value passed to forkOn is interpreted modulo the total number of capabilities as returned by getNumCapabilities. GHC note: the number of capabilities is specified by the +RTS -N option when the program is started. Capabilities can be fixed to actual processor cores with +RTS -qa if the underlying operating system supports that, although in practice this is usually unnecessary (and may actually degrade performance in some cases - experimentation is recommended).

  3. forkOnWithUnmask :: Int -> ((forall a . () => IO a -> IO a) -> IO ()) -> IO ThreadId

    base GHC.Conc.Sync

    Like forkIOWithUnmask, but the child thread is pinned to the given CPU, as with forkOn.

  4. fork# :: (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, ThreadId# #)

    base GHC.Exts

    No documentation available.

  5. forkOn# :: Int# -> (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, ThreadId# #)

    base GHC.Exts

    No documentation available.

  6. formatRealFloat :: RealFloat a => FFFormat -> Maybe Int -> a -> String

    base GHC.Float

    No documentation available.

  7. formatRealFloatAlt :: RealFloat a => FFFormat -> Maybe Int -> Bool -> a -> String

    base GHC.Float

    No documentation available.

  8. formatDouble :: FloatFormat -> Double -> Builder

    bytestring Data.ByteString.Builder.RealFloat

    Returns a rendered Double. Returns the 'shortest' representation in scientific notation and takes an optional precision argument in standard notation. Also see doubleDec. With standard notation, the precision argument is used to truncate (or extend with 0s) the 'shortest' rendered Float. The 'default precision' does no such modifications and will return as many decimal places as the representation demands. e.g

    >>> formatDouble (standard 1) 1.2345e-2
    "0.0"
    
    >>> formatDouble (standard 10) 1.2345e-2
    "0.0123450000"
    
    >>> formatDouble standardDefaultPrecision 1.2345e-2
    "0.01234"
    
    >>> formatDouble scientific 12.345
    "1.2345e1"
    
    >>> formatDouble generic 12.345
    "12.345"
    

  9. formatFloat :: FloatFormat -> Float -> Builder

    bytestring Data.ByteString.Builder.RealFloat

    Returns a rendered Float. Returns the 'shortest' representation in scientific notation and takes an optional precision argument in standard notation. Also see floatDec. With standard notation, the precision argument is used to truncate (or extend with 0s) the 'shortest' rendered Float. The 'default precision' does no such modifications and will return as many decimal places as the representation demands. e.g

    >>> formatFloat (standard 1) 1.2345e-2
    "0.0"
    
    >>> formatFloat (standard 10) 1.2345e-2
    "0.0123450000"
    
    >>> formatFloat standardDefaultPrecision 1.2345e-2
    "0.01234"
    
    >>> formatFloat scientific 12.345
    "1.2345e1"
    
    >>> formatFloat generic 12.345
    "12.345"
    

  10. formatRealFloat :: RealFloat a => FPFormat -> Maybe Int -> a -> Builder

    text Data.Text.Lazy.Builder.RealFloat

    Encode a signed RealFloat according to FPFormat and optionally requested precision. This corresponds to the show{E,F,G}Float operations provided by base's Numeric module. NOTE: The functions in base-4.12 changed the serialisation in case of a Just 0 precision; this version of text still provides the serialisation as implemented in base-4.11. The next major version of text will switch to the more correct base-4.12 serialisation.

Page 9 of many | Previous | Next