Hoogle Search
Within LTS Haskell 24.68 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
http-types Network.HTTP.Types.Header -
http-types Network.HTTP.Types.Status Reset Content 205
defaultSetByteArray# :: Prim a => MutableByteArray# s -> Int# -> Int# -> a -> State# s -> State# sprimitive Data.Primitive.Types An implementation of setByteArray# that calls writeByteArray# to set each element. This is helpful when writing a Prim instance for a multi-word data type for which there is no CPU-accelerated way to broadcast a value to contiguous memory. It is typically used alongside defaultSetOffAddr#. For example:
data Trip = Trip Int Int Int instance Prim Trip sizeOfType# _ = 3# *# sizeOfType# (proxy# :: Proxy# Int) alignmentOfType# _ = alignmentOfType# (proxy# :: Proxy# Int) indexByteArray# arr# i# = ... readByteArray# arr# i# = ... writeByteArray# arr# i# (Trip a b c) = \s0 -> case writeByteArray# arr# (3# *# i#) a s0 of s1 -> case writeByteArray# arr# ((3# *# i#) +# 1#) b s1 of s2 -> case writeByteArray# arr# ((3# *# i#) +# 2# ) c s2 of s3 -> s3 setByteArray# = defaultSetByteArray# indexOffAddr# addr# i# = ... readOffAddr# addr# i# = ... writeOffAddr# addr# i# (Trip a b c) = \s0 -> case writeOffAddr# addr# (3# *# i#) a s0 of s1 -> case writeOffAddr# addr# ((3# *# i#) +# 1#) b s1 of s2 -> case writeOffAddr# addr# ((3# *# i#) +# 2# ) c s2 of s3 -> s3 setOffAddr# = defaultSetOffAddr#
defaultSetOffAddr# :: Prim a => Addr# -> Int# -> Int# -> a -> State# s -> State# sprimitive Data.Primitive.Types An implementation of setOffAddr# that calls writeOffAddr# to set each element. The documentation of defaultSetByteArray# provides an example of how to use this.
type
ASetter s t a b = a -> Identity b -> s -> Identity tlens Control.Lens.Combinators Running a Setter instantiates it to a concrete type. When consuming a setter directly to perform a mapping, you can use this type, but most user code will not need to use this type.
type
ASetter' s a = ASetter s s a alens Control.Lens.Combinators This is a useful alias for use when consuming a Setter'. Most user code will never have to use this type.
type ASetter' = Simple ASetter
type
AnIndexedSetter i s t a b = Indexed i a Identity b -> s -> Identity tlens Control.Lens.Combinators Running an IndexedSetter instantiates it to a concrete type. When consuming a setter directly to perform a mapping, you can use this type, but most user code will not need to use this type.
type
AnIndexedSetter' i s a = AnIndexedSetter i s s a alens Control.Lens.Combinators type AnIndexedSetter' i = Simple (AnIndexedSetter i)
-
lens Control.Lens.Combinators An IndexPreservingSetter can be composed with a IndexedSetter, IndexedTraversal or IndexedLens and leaves the index intact, yielding an IndexedSetter.
type
IndexPreservingSetter' s a = IndexPreservingSetter s s a alens Control.Lens.Combinators type IndexedPreservingSetter' i = Simple IndexedPreservingSetter