Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Copilot.Language.Operators.Cast
Description
Type-safe casting operators.
Synopsis
- cast :: (Cast a b, Typed a, Typed b) => Stream a -> Stream b
- unsafeCast :: (UnsafeCast a b, Typed a, Typed b) => Stream a -> Stream b
- class Cast a b
- class UnsafeCast a b
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 to capture casting between types for which it can be performed safely.
Minimal complete definition
Instances
Cast Int16 Int16 Source # | Identity casting. |
Cast Int16 Int32 Source # | Cast number to bigger type. |
Cast Int16 Int64 Source # | Cast number to bigger type. |
Cast Int32 Int32 Source # | Identity casting. |
Cast Int32 Int64 Source # | Cast number to bigger type. |
Cast Int64 Int64 Source # | Identity casting. |
Cast Int8 Int16 Source # | Cast number to bigger type. |
Cast Int8 Int32 Source # | Cast number to bigger type. |
Cast Int8 Int64 Source # | Cast number to bigger type. |
Cast Int8 Int8 Source # | Identity casting. |
Cast Word16 Int32 Source # | Cast number to bigger type. |
Cast Word16 Int64 Source # | Cast number to bigger type. |
Cast Word16 Word16 Source # | Identity casting. |
Cast Word16 Word32 Source # | Cast number to bigger type. |
Cast Word16 Word64 Source # | Cast number to bigger type. |
Cast Word32 Int64 Source # | Cast number to bigger type. |
Cast Word32 Word32 Source # | Identity casting. |
Cast Word32 Word64 Source # | Cast number to bigger type. |
Cast Word64 Word64 Source # | Identity casting. |
Cast Word8 Int16 Source # | Cast number to bigger type. |
Cast Word8 Int32 Source # | Cast number to bigger type. |
Cast Word8 Int64 Source # | Cast number to bigger type. |
Cast Word8 Word16 Source # | Cast number to bigger type. |
Cast Word8 Word32 Source # | Cast number to bigger type. |
Cast Word8 Word64 Source # | Cast number to bigger type. |
Cast Word8 Word8 Source # | Identity casting. |
Cast Bool Int16 Source # | Cast a boolean stream to a stream of numbers, producing 1 if the
value at a point in time is |
Cast Bool Int32 Source # | Cast a boolean stream to a stream of numbers, producing 1 if the
value at a point in time is |
Cast Bool Int64 Source # | Cast a boolean stream to a stream of numbers, producing 1 if the
value at a point in time is |
Cast Bool Int8 Source # | Cast a boolean stream to a stream of numbers, producing 1 if the
value at a point in time is |
Cast Bool Word16 Source # | Cast a boolean stream to a stream of numbers, producing 1 if the
value at a point in time is |
Cast Bool Word32 Source # | Cast a boolean stream to a stream of numbers, producing 1 if the
value at a point in time is |
Cast Bool Word64 Source # | Cast a boolean stream to a stream of numbers, producing 1 if the
value at a point in time is |
Cast Bool Word8 Source # | Cast a boolean stream to a stream of numbers, producing 1 if the
value at a point in time is |
Cast Bool Bool Source # | Identity casting. |
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
Instances
UnsafeCast Int16 Int8 Source # | Unsafe downcasting to smaller sizes. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int16 Word16 Source # | Signed to unsigned casting. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int16 Double Source # | Unsafe signed integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int16 Float Source # | Unsafe signed integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int32 Int16 Source # | Unsafe downcasting to smaller sizes. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int32 Int8 Source # | Unsafe downcasting to smaller sizes. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int32 Word32 Source # | Signed to unsigned casting. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int32 Double Source # | Unsafe signed integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int32 Float Source # | Unsafe signed integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int64 Int16 Source # | Unsafe downcasting to smaller sizes. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int64 Int32 Source # | Unsafe downcasting to smaller sizes. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int64 Int8 Source # | Unsafe downcasting to smaller sizes. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int64 Word64 Source # | Signed to unsigned casting. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int64 Double Source # | Unsafe signed integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int64 Float Source # | Unsafe signed integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int8 Word8 Source # | Signed to unsigned casting. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int8 Double Source # | Unsafe signed integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Int8 Float Source # | Unsafe signed integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word16 Int16 Source # | Cast from unsigned numbers to signed numbers. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word16 Word8 Source # | Unsafe downcasting to smaller sizes. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word16 Double Source # | Unsafe unsigned integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word16 Float Source # | Unsafe unsigned integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word32 Int32 Source # | Cast from unsigned numbers to signed numbers. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word32 Word16 Source # | Unsafe downcasting to smaller sizes. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word32 Word8 Source # | Unsafe downcasting to smaller sizes. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word32 Double Source # | Unsafe unsigned integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word32 Float Source # | Unsafe unsigned integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word64 Int64 Source # | Cast from unsigned numbers to signed numbers. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word64 Word16 Source # | Unsafe downcasting to smaller sizes. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word64 Word32 Source # | Unsafe downcasting to smaller sizes. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word64 Word8 Source # | Unsafe downcasting to smaller sizes. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word64 Double Source # | Unsafe unsigned integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word64 Float Source # | Unsafe unsigned integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word8 Int8 Source # | Cast from unsigned numbers to signed numbers. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word8 Double Source # | Unsafe unsigned integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast | |
UnsafeCast Word8 Float Source # | Unsafe unsigned integer promotion to floating point values. |
Defined in Copilot.Language.Operators.Cast |