copilot-language-4.7.1: A Haskell-embedded DSL for monitoring hard real-time distributed systems.

Safe Haskell | Safe
Language | Haskell2010

Copilot.Language.Operators.Cast

Description

Type-safe casting operators.

Synopsis

- cast :: Cast a b => Stream a -> Stream b
- unsafeCast :: UnsafeCast a b => Stream a -> Stream b
- class Cast a b
- class UnsafeCast a b

# Documentation

cast :: Cast a b => Stream a -> Stream b Source #

Perform a safe cast from `Stream a` to `Stream b`.

unsafeCast :: UnsafeCast a 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 Int16 Int16 Source # | Identity casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Int16 -> Stream Int16 Source #
Cast Int16 Int32 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Int16 -> Stream Int32 Source #
Cast Int16 Int64 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Int16 -> Stream Int64 Source #
Cast Int32 Int32 Source # | Identity casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Int32 -> Stream Int32 Source #
Cast Int32 Int64 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Int32 -> Stream Int64 Source #
Cast Int64 Int64 Source # | Identity casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Int64 -> Stream Int64 Source #
Cast Int8 Int16 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Int8 -> Stream Int16 Source #
Cast Int8 Int32 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Int8 -> Stream Int32 Source #
Cast Int8 Int64 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Int8 -> Stream Int64 Source #
Cast Int8 Int8 Source # | Identity casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Int8 -> Stream Int8 Source #
Cast Word16 Int32 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word16 -> Stream Int32 Source #
Cast Word16 Int64 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word16 -> Stream Int64 Source #
Cast Word16 Word16 Source # | Identity casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word16 -> Stream Word16 Source #
Cast Word16 Word32 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word16 -> Stream Word32 Source #
Cast Word16 Word64 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word16 -> Stream Word64 Source #
Cast Word32 Int64 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word32 -> Stream Int64 Source #
Cast Word32 Word32 Source # | Identity casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word32 -> Stream Word32 Source #
Cast Word32 Word64 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word32 -> Stream Word64 Source #
Cast Word64 Word64 Source # | Identity casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word64 -> Stream Word64 Source #
Cast Word8 Int16 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word8 -> Stream Int16 Source #
Cast Word8 Int32 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word8 -> Stream Int32 Source #
Cast Word8 Int64 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word8 -> Stream Int64 Source #
Cast Word8 Word16 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word8 -> Stream Word16 Source #
Cast Word8 Word32 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word8 -> Stream Word32 Source #
Cast Word8 Word64 Source # | Cast number to bigger type.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word8 -> Stream Word64 Source #
Cast Word8 Word8 Source # | Identity casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Word8 -> Stream Word8 Source #
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 Methods cast :: Stream Bool -> Stream Int16 Source #
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 Methods cast :: Stream Bool -> Stream Int32 Source #
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 Methods cast :: Stream Bool -> Stream Int64 Source #
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 Methods cast :: Stream Bool -> Stream Int8 Source #
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 Methods cast :: Stream Bool -> Stream Word16 Source #
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 Methods cast :: Stream Bool -> Stream Word32 Source #
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 Methods cast :: Stream Bool -> Stream Word64 Source #
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 Methods cast :: Stream Bool -> Stream Word8 Source #
Cast Bool Bool Source # | Identity casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods cast :: Stream Bool -> Stream Bool Source #

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 Int16 Int8 Source # | Unsafe downcasting to smaller sizes.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int16 -> Stream Int8 Source #
UnsafeCast Int16 Word16 Source # | Signed to unsigned casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int16 -> Stream Word16 Source #
UnsafeCast Int16 Double Source # | Unsafe signed integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int16 -> Stream Double Source #
UnsafeCast Int16 Float Source # | Unsafe signed integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int16 -> Stream Float Source #
UnsafeCast Int32 Int16 Source # | Unsafe downcasting to smaller sizes.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int32 -> Stream Int16 Source #
UnsafeCast Int32 Int8 Source # | Unsafe downcasting to smaller sizes.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int32 -> Stream Int8 Source #
UnsafeCast Int32 Word32 Source # | Signed to unsigned casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int32 -> Stream Word32 Source #
UnsafeCast Int32 Double Source # | Unsafe signed integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int32 -> Stream Double Source #
UnsafeCast Int32 Float Source # | Unsafe signed integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int32 -> Stream Float Source #
UnsafeCast Int64 Int16 Source # | Unsafe downcasting to smaller sizes.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int64 -> Stream Int16 Source #
UnsafeCast Int64 Int32 Source # | Unsafe downcasting to smaller sizes.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int64 -> Stream Int32 Source #
UnsafeCast Int64 Int8 Source # | Unsafe downcasting to smaller sizes.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int64 -> Stream Int8 Source #
UnsafeCast Int64 Word64 Source # | Signed to unsigned casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int64 -> Stream Word64 Source #
UnsafeCast Int64 Double Source # | Unsafe signed integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int64 -> Stream Double Source #
UnsafeCast Int64 Float Source # | Unsafe signed integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int64 -> Stream Float Source #
UnsafeCast Int8 Word8 Source # | Signed to unsigned casting.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int8 -> Stream Word8 Source #
UnsafeCast Int8 Double Source # | Unsafe signed integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int8 -> Stream Double Source #
UnsafeCast Int8 Float Source # | Unsafe signed integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Int8 -> Stream Float Source #
UnsafeCast Word16 Int16 Source # | Cast from unsigned numbers to signed numbers.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word16 -> Stream Int16 Source #
UnsafeCast Word16 Word8 Source # | Unsafe downcasting to smaller sizes.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word16 -> Stream Word8 Source #
UnsafeCast Word16 Double Source # | Unsafe unsigned integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word16 -> Stream Double Source #
UnsafeCast Word16 Float Source # | Unsafe unsigned integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word16 -> Stream Float Source #
UnsafeCast Word32 Int32 Source # | Cast from unsigned numbers to signed numbers.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word32 -> Stream Int32 Source #
UnsafeCast Word32 Word16 Source # | Unsafe downcasting to smaller sizes.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word32 -> Stream Word16 Source #
UnsafeCast Word32 Word8 Source # | Unsafe downcasting to smaller sizes.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word32 -> Stream Word8 Source #
UnsafeCast Word32 Double Source # | Unsafe unsigned integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word32 -> Stream Double Source #
UnsafeCast Word32 Float Source # | Unsafe unsigned integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word32 -> Stream Float Source #
UnsafeCast Word64 Int64 Source # | Cast from unsigned numbers to signed numbers.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word64 -> Stream Int64 Source #
UnsafeCast Word64 Word16 Source # | Unsafe downcasting to smaller sizes.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word64 -> Stream Word16 Source #
UnsafeCast Word64 Word32 Source # | Unsafe downcasting to smaller sizes.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word64 -> Stream Word32 Source #
UnsafeCast Word64 Word8 Source # | Unsafe downcasting to smaller sizes.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word64 -> Stream Word8 Source #
UnsafeCast Word64 Double Source # | Unsafe unsigned integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word64 -> Stream Double Source #
UnsafeCast Word64 Float Source # | Unsafe unsigned integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word64 -> Stream Float Source #
UnsafeCast Word8 Int8 Source # | Cast from unsigned numbers to signed numbers.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word8 -> Stream Int8 Source #
UnsafeCast Word8 Double Source # | Unsafe unsigned integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word8 -> Stream Double Source #
UnsafeCast Word8 Float Source # | Unsafe unsigned integer promotion to floating point values.
Instance details Defined in Copilot.Language.Operators.Cast Methods unsafeCast :: Stream Word8 -> Stream Float Source #