Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Combinators to deal with streams carrying arrays.
Synopsis
- (.!!) :: (KnownNat n, Typed t) => Stream (Array n t) -> Stream Word32 -> Stream t
- (!) :: (KnownNat n, Typed t) => Stream (Array n t) -> Stream Word32 -> Stream t
- (!!) :: Stream (Array n t) -> Stream Word32 -> Projection (Array n t) (Stream Word32) t
- (=:) :: Projectable d s t => Projection d s t -> Stream t -> Stream d
- (=$) :: Projectable d s t => Projection d s t -> (Stream t -> Stream t) -> Stream d
Documentation
(.!!) :: (KnownNat n, Typed t) => Stream (Array n t) -> Stream Word32 -> Stream t Source #
Deprecated: This function is deprecated in Copilot 4. Use (!).
Create a stream that carries an element of an array in another stream.
This function implements a projection of the element of an array at a given
position, over time. For example, if s
is a stream of type Stream (Array
'5 Word8)
, then s .!! 3
has type Stream Word8
and contains the 3rd
element (starting from zero) of the arrays in s
at any point in time.
(!) :: (KnownNat n, Typed t) => Stream (Array n t) -> Stream Word32 -> Stream t Source #
Create a stream that carries an element of an array in another stream.
This function implements a projection of the element of an array at a given
position, over time. For example, if s
is a stream of type Stream (Array
'5 Word8)
, then s ! 3
has type Stream Word8
and contains the 3rd
element (starting from zero) of the arrays in s
at any point in time.
(!!) :: Stream (Array n t) -> Stream Word32 -> Projection (Array n t) (Stream Word32) t Source #
Pair a stream with an element accessor, without applying it to obtain the value of the element.
This function is needed to refer to an element accessor when the goal is to update the element value, not just to read it.
(=:) :: Projectable d s t => Projection d s t -> Stream t -> Stream d infixl 8 Source #
Modify the value of a sub-element of a type in a stream of elements of that type.
(=$) :: Projectable d s t => Projection d s t -> (Stream t -> Stream t) -> Stream d infixl 8 Source #
Update the value of a sub-element of a type in a stream of elements of that type, by applying a function on streams.