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

Copilot.Language.Operators.Cast

Description

Type-safe casting operators.

Synopsis

Documentation

cast :: (Cast a b, Typed a, Typed b) => Stream a -> Stream b Source #

Perform a safe cast from Stream a to Stream b.

unsafeCast :: (UnsafeCast a b, Typed a, Typed b) => Stream a -> Stream b Source #

Perform an unsafe cast from Stream a to Stream b.

class Cast a b Source #

Class to capture casting between types for which it can be performed safely.

Minimal complete definition

cast

Instances

Instances details
Cast Bool Bool Source #

Identity casting.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Bool Int8 Source #

Cast a boolean stream to a stream of numbers, producing 1 if the value at a point in time is True, and 0 otherwise.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Bool Int16 Source #

Cast a boolean stream to a stream of numbers, producing 1 if the value at a point in time is True, and 0 otherwise.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Bool Int32 Source #

Cast a boolean stream to a stream of numbers, producing 1 if the value at a point in time is True, and 0 otherwise.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Bool Int64 Source #

Cast a boolean stream to a stream of numbers, producing 1 if the value at a point in time is True, and 0 otherwise.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Bool Word8 Source #

Cast a boolean stream to a stream of numbers, producing 1 if the value at a point in time is True, and 0 otherwise.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Bool Word16 Source #

Cast a boolean stream to a stream of numbers, producing 1 if the value at a point in time is True, and 0 otherwise.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Bool Word32 Source #

Cast a boolean stream to a stream of numbers, producing 1 if the value at a point in time is True, and 0 otherwise.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Bool Word64 Source #

Cast a boolean stream to a stream of numbers, producing 1 if the value at a point in time is True, and 0 otherwise.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Int8 Int8 Source #

Identity casting.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Int8 Int16 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Int8 Int32 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Int8 Int64 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Int16 Int16 Source #

Identity casting.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Int16 Int32 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Int16 Int64 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Int32 Int32 Source #

Identity casting.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Int32 Int64 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Int64 Int64 Source #

Identity casting.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word8 Int16 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word8 Int32 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word8 Int64 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word8 Word8 Source #

Identity casting.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word8 Word16 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word8 Word32 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word8 Word64 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word16 Int32 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word16 Int64 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word16 Word16 Source #

Identity casting.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word16 Word32 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word16 Word64 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word32 Int64 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word32 Word32 Source #

Identity casting.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word32 Word64 Source #

Cast number to bigger type.

Instance details

Defined in Copilot.Language.Operators.Cast

Cast Word64 Word64 Source #

Identity casting.

Instance details

Defined in Copilot.Language.Operators.Cast

class UnsafeCast a b Source #

Class to capture casting between types for which casting may be unsafe and/or result in a loss of precision or information.

Minimal complete definition

unsafeCast

Instances

Instances details
UnsafeCast Int8 Double Source #

Unsafe signed integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int8 Float Source #

Unsafe signed integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int8 Word8 Source #

Signed to unsigned casting.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int16 Double Source #

Unsafe signed integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int16 Float Source #

Unsafe signed integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int16 Int8 Source #

Unsafe downcasting to smaller sizes.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int16 Word16 Source #

Signed to unsigned casting.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int32 Double Source #

Unsafe signed integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int32 Float Source #

Unsafe signed integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int32 Int8 Source #

Unsafe downcasting to smaller sizes.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int32 Int16 Source #

Unsafe downcasting to smaller sizes.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int32 Word32 Source #

Signed to unsigned casting.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int64 Double Source #

Unsafe signed integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int64 Float Source #

Unsafe signed integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int64 Int8 Source #

Unsafe downcasting to smaller sizes.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int64 Int16 Source #

Unsafe downcasting to smaller sizes.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int64 Int32 Source #

Unsafe downcasting to smaller sizes.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Int64 Word64 Source #

Signed to unsigned casting.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word8 Double Source #

Unsafe unsigned integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word8 Float Source #

Unsafe unsigned integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word8 Int8 Source #

Cast from unsigned numbers to signed numbers.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word16 Double Source #

Unsafe unsigned integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word16 Float Source #

Unsafe unsigned integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word16 Int16 Source #

Cast from unsigned numbers to signed numbers.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word16 Word8 Source #

Unsafe downcasting to smaller sizes.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word32 Double Source #

Unsafe unsigned integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word32 Float Source #

Unsafe unsigned integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word32 Int32 Source #

Cast from unsigned numbers to signed numbers.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word32 Word8 Source #

Unsafe downcasting to smaller sizes.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word32 Word16 Source #

Unsafe downcasting to smaller sizes.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word64 Double Source #

Unsafe unsigned integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word64 Float Source #

Unsafe unsigned integer promotion to floating point values.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word64 Int64 Source #

Cast from unsigned numbers to signed numbers.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word64 Word8 Source #

Unsafe downcasting to smaller sizes.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word64 Word16 Source #

Unsafe downcasting to smaller sizes.

Instance details

Defined in Copilot.Language.Operators.Cast

UnsafeCast Word64 Word32 Source #

Unsafe downcasting to smaller sizes.

Instance details

Defined in Copilot.Language.Operators.Cast