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. singleton :: PrimType ty => ty -> UVect 1 ty

    basement Basement.Sized.UVect

    No documentation available.

  2. singleton :: ty -> Vect 1 ty

    basement Basement.Sized.Vect

    No documentation available.

  3. singleton :: Char -> String

    basement Basement.String

    Create a single element String

  4. singleton :: PrimType ty => ty -> UArray ty

    basement Basement.UArray

    No documentation available.

  5. singleton :: Word8 -> Bytes

    byteslice Data.Bytes

    Create a byte sequence with one byte.

  6. singleton :: Enum k => k -> a -> EnumMap k a

    enummapset Data.EnumMap.Lazy

    No documentation available.

  7. singleton :: Enum k => k -> a -> EnumMap k a

    enummapset Data.EnumMap.Strict

    No documentation available.

  8. singleton :: Enum k => k -> EnumSet k

    enummapset Data.EnumSet

    No documentation available.

  9. singleton :: Load r ix e => e -> Array r ix e

    massiv Data.Massiv.Array

    Create an Array with a single element.

    Examples

    >>> import Data.Massiv.Array as A
    
    >>> singleton 7 :: Array D Ix4 Double
    Array D Seq (Sz (1 :> 1 :> 1 :. 1))
    [ [ [ [ 7.0 ]
    ]
    ]
    ]
    
    Instead of specifying type signature we could use TypeApplications
    >>> :set -XTypeApplications
    
    >>> singleton @U @Ix4 @Double 7
    Array U Seq (Sz (1 :> 1 :> 1 :. 1))
    [ [ [ [ 7.0 ]
    ]
    ]
    ]
    

  10. singleton :: Load r ix e => e -> Array r ix e

    massiv Data.Massiv.Vector

    Create an Array with a single element.

    Examples

    >>> import Data.Massiv.Array as A
    
    >>> singleton 7 :: Array D Ix4 Double
    Array D Seq (Sz (1 :> 1 :> 1 :. 1))
    [ [ [ [ 7.0 ]
    ]
    ]
    ]
    
    Instead of specifying type signature we could use TypeApplications
    >>> :set -XTypeApplications
    
    >>> singleton @U @Ix4 @Double 7
    Array U Seq (Sz (1 :> 1 :> 1 :. 1))
    [ [ [ [ 7.0 ]
    ]
    ]
    ]
    

Page 12 of many | Previous | Next