copilot-language-3.11: A Haskell-embedded DSL for monitoring hard real-time distributed systems.
Safe HaskellSafe
LanguageHaskell2010

Copilot.Language.Operators.Array

Description

Combinators to deal with streams carrying arrays.

Synopsis

Documentation

(.!!) :: (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.