convertible-1.0.0: Typeclasses and instances for converting between typesSource codeContentsIndex
Data.Convertible.Utils
Portabilityportable
Stabilityprovisional
MaintainerJohn Goerzen <jgoerzen@complete.org>
Description
Synopsis
boundedConversion :: (Ord a, Bounded b, Show a, Show b, Convertible a Integer, Convertible b Integer, Typeable a, Typeable b) => (a -> ConvertResult b) -> a -> ConvertResult b
mkTypeName :: String -> TypeRep
Documentation
boundedConversionSource
:: (Ord a, Bounded b, Show a, Show b, Convertible a Integer, Convertible b Integer, Typeable a, Typeable b)
=> a -> ConvertResult bFunction to do the conversion
-> aInput data
-> ConvertResult bResult

Utility function to perform bounds checking as part of a conversion.

Does this be examining the bounds of the destination type, converting to the type of the source via safeConvert, comparing to the source value. Results in an error if the conversion is out of bounds.

mkTypeName :: String -> TypeRepSource
Produced by Haddock version 2.4.2