HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Modulebasement-0.0.16Haskell2010

Basement.Cast

  • 1 class
  • Packagebasement-0.0.16
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceCast.hs
classclass 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

Methods

  • cast :: source -> destination
Instances19Cast, …