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

Copilot.Language.Operators.Struct

Description

Combinators to deal with streams carrying structs.

Synopsis

Documentation

(#) :: (KnownSymbol s, Typed t, Typed a, Struct a) => Stream a -> (a -> Field s t) -> Stream t Source #

Create a stream that carries a field of a struct in another stream.

This function implements a projection of a field of a struct over time. For example, if a struct of type T has two fields, t1 of type Int and t2 of type Word8, and s is a stream of type Stream T, then s # t2 has type Stream Word8 and contains the values of the t2 field of the structs in s at any point in time.