License | BSD-style |
---|---|
Maintainer | Haskell Foundation |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
class Cast source destination where #
Cast
an object of type a to b.
Do not add instance of this class if the source type is not of the same size of the destination type. Also keep in mind this is casting a value of a given type into a destination type. The value won't be changed to fit the destination represention.
If you wish to convert a value of a given type into another type, look at
From
and TryFrom
.
cast (-10 :: Int) :: Word === 18446744073709551606
Nothing
Instances
Cast Int Int64 # | |
Defined in Basement.Cast | |
Cast Int Word # | |
Defined in Basement.Cast | |
Cast Int Word64 # | |
Defined in Basement.Cast | |
Cast Int8 Word8 # | |
Defined in Basement.Cast | |
Cast Int16 Word16 # | |
Defined in Basement.Cast | |
Cast Int32 Word32 # | |
Defined in Basement.Cast | |
Cast Int64 Int # | |
Defined in Basement.Cast | |
Cast Int64 Word # | |
Defined in Basement.Cast | |
Cast Int64 Word64 # | |
Defined in Basement.Cast | |
Cast Word Int # | |
Defined in Basement.Cast | |
Cast Word Int64 # | |
Defined in Basement.Cast | |
Cast Word Word64 # | |
Defined in Basement.Cast | |
Cast Word8 Int8 # | |
Defined in Basement.Cast | |
Cast Word16 Int16 # | |
Defined in Basement.Cast | |
Cast Word32 Int32 # | |
Defined in Basement.Cast | |
Cast Word64 Int # | |
Defined in Basement.Cast | |
Cast Word64 Int64 # | |
Defined in Basement.Cast | |
Cast Word64 Word # | |
Defined in Basement.Cast | |
Cast (Block a) (Block Word8) # | |