Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
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 ] ] ] ]
singleton :: forall instr a (m :: Type -> Type) . instr a -> ProgramT instr m aoperational Control.Monad.Operational Program made from a single primitive instruction.
-
text-show TextShow O(1). A Builder taking a single character, satisfying
toLazyText (singleton c) = singleton c
singleton :: k -> v -> OMap k vth-desugar Language.Haskell.TH.Desugar.OMap No documentation available.
singleton :: k -> v -> OMap k vth-desugar Language.Haskell.TH.Desugar.OMap.Strict No documentation available.
-
th-desugar Language.Haskell.TH.Desugar.OSet No documentation available.
-
HaXml Text.XML.HaXml.Schema.TypeConversion No documentation available.
singleton :: a -> b -> Bimap a bbimap Data.Bimap O(1). A bimap with a single element. Version: 0.2
-
jsaddle Data.JSString O(1) Convert a character into a JSString. Subject to fusion. Performs replacement on invalid scalar values.