Hoogle Search

Within LTS Haskell 24.67 (ghc-9.10.3)

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

  1. lua_stringtonumber :: State -> CString -> IO CSize

    lua Lua.Primary

    Converts the zero-terminated string s to a number, pushes that number into the stack, and returns the total size of the string, that is, its length plus one. The conversion can result in an integer or a float, according to the lexical conventions of Lua (see §3.1). The string may have leading and trailing spaces and a sign. If the string is not a valid numeral, returns 0 and pushes nothing. (Note that the result can be used as a boolean, true if the conversion succeeds.) https://www.lua.org/manual/5.4/manual.html#lua_stringtonumber.

  2. lua_tonumberx :: State -> StackIndex -> Ptr LuaBool -> IO Number

    lua Lua.Primary

    Converts the Lua value at the given index to the C type lua_Number (see lua_Number). The Lua value must be a number or a string convertible to a number (see §3.4.3); otherwise, lua_tonumberx returns 0. If isnum is not NULL, its referent is assigned a boolean value that indicates whether the operation succeeded. https://www.lua.org/manual/5.4/manual.html#lua_tonumberx

  3. fromNumArgs :: NumArgs -> CInt

    lua Lua.Types

    No documentation available.

  4. fromNumResults :: NumResults -> CInt

    lua Lua.Types

    No documentation available.

  5. enumFromN :: Num e => Comp -> e -> Sz1 -> Vector D e

    massiv Data.Massiv.Array

    Same as enumFromStepN with step dx = 1. Related: senumFromN, senumFromStepN, enumFromStepN, rangeSize, rangeStepSize, range

    Examples

    >>> import Data.Massiv.Array
    
    >>> enumFromN Seq (5 :: Double) 3
    Array D Seq (Sz1 3)
    [ 5.0, 6.0, 7.0 ]
    
    Similar:

  6. enumFromStepN :: Num e => Comp -> e -> e -> Sz1 -> Vector D e

    massiv Data.Massiv.Array

    Enumerate from a starting number x exactly n times with a custom step value dx. Unlike senumFromStepN, there is no dependency on neigboring elements therefore enumFromStepN is parallelizable. Related: senumFromN, senumFromStepN, enumFromN, rangeSize, rangeStepSize, range, rangeStepM

    Examples

    >>> import Data.Massiv.Array
    
    >>> enumFromStepN Seq 1 (0.1 :: Double) 5
    Array D Seq (Sz1 5)
    [ 1.0, 1.1, 1.2, 1.3, 1.4 ]
    
    >>> enumFromStepN Seq (-pi :: Float) (pi/4) 9
    Array D Seq (Sz1 9)
    [ -3.1415927, -2.3561945, -1.5707964, -0.78539824, 0.0, 0.78539824, 1.5707963, 2.3561947, 3.1415927 ]
    
    Similar:
    • Prelude.enumFrom Similar to take n [x, x + dx ..], except that enumFromStepN is parallelizable and it only works for Num and not for Enum elements. Floating point value will be slightly different as well.
    • Data.Vector.Generic.enumFromStepN Similar in the outcome, but very different in the way it works.

  7. liftNumArray2M :: (Index ix, Numeric r e, MonadThrow m) => (e -> e -> e) -> Array r ix e -> Array r ix e -> m (Array r ix e)

    massiv Data.Massiv.Array.Numeric

    Similar to liftArray2M, except it can be applied only to representations with Numeric instance and result representation stays the same.

  8. signumA :: (Index ix, Numeric r e) => Array r ix e -> Array r ix e

    massiv Data.Massiv.Array.Numeric

    Apply signum to each element of the array

  9. class (Size r, Num e) => FoldNumeric r e

    massiv Data.Massiv.Core

    No documentation available.

  10. guardNumberOfElements :: (MonadThrow m, Index ix, Index ix') => Sz ix -> Sz ix' -> m ()

    massiv Data.Massiv.Core

    Throw SizeElementsMismatchException whenever number of elements in both sizes do not match.

Page 250 of many | Previous | Next