convert-1.0: Safe and unsafe data conversion utilities with strong type-level operation. checking.

Safe HaskellNone
LanguageHaskell2010

Data.Convert.Base

Documentation

class MaybeConvertible a e b | a b -> e where Source

Methods

tryConvert :: a -> Either e b Source

class MaybeConvertible' a e b | b -> a e where Source

Methods

tryConvert' :: a -> Either e b Source

class Convertible a b where Source

Methods

convert :: a -> b Source

class Convertible' a b | b -> a where Source

Methods

convert' :: a -> b Source

class Castable a b where Source

Methods

cast :: a -> b Source

Instances

type IsoCastable a b = (Castable a b, Castable b a) Source

class ConvertibleM m n where Source

Methods

convertM :: m (t1 :: k) -> n (t1 :: k) Source

class ConvertibleM2 m n where Source

Methods

convertM2 :: m (t1 :: k) (t2 :: k) -> n (t1 :: k) (t2 :: k) Source

class ConvertibleM3 m n where Source

Methods

convertM3 :: m (t1 :: k) (t2 :: k) (t3 :: k) -> n (t1 :: k) (t2 :: k) (t3 :: k) Source

class ConvertibleM4 m n where Source

Methods

convertM4 :: m (t1 :: k) (t2 :: k) (t3 :: k) (t4 :: k) -> n (t1 :: k) (t2 :: k) (t3 :: k) (t4 :: k) Source

class ConvertibleM5 m n where Source

Methods

convertM5 :: m (t1 :: k) (t2 :: k) (t3 :: k) (t4 :: k) (t5 :: k) -> n (t1 :: k) (t2 :: k) (t3 :: k) (t4 :: k) (t5 :: k) Source

unsafeConvert :: Show e => MaybeConvertible a e b => a -> b Source