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.
singleton :: PrimType ty => ty -> UVect 1 tybasement Basement.Sized.UVect No documentation available.
-
basement Basement.Sized.Vect No documentation available.
-
basement Basement.String Create a single element String
singleton :: PrimType ty => ty -> UArray tybasement Basement.UArray No documentation available.
-
byteslice Data.Bytes Create a byte sequence with one byte.
singleton :: Enum k => k -> a -> EnumMap k aenummapset Data.EnumMap.Lazy No documentation available.
singleton :: Enum k => k -> a -> EnumMap k aenummapset Data.EnumMap.Strict No documentation available.
singleton :: Enum k => k -> EnumSet kenummapset Data.EnumSet No documentation available.
singleton :: Load r ix e => e -> Array r ix emassiv 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 ] ] ] ]
singleton :: Load r ix e => e -> Array r ix emassiv 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 ] ] ] ]