| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Vision.Image.Conversion
Contents
Synopsis
- class Convertible a b where
- safeConvert :: a -> ConvertResult b
- convert :: Convertible a b => a -> b
Documentation
class Convertible a b where #
A typeclass that represents something that can be converted.
A Convertible a b instance represents an a that can be converted to a b.
Methods
safeConvert :: a -> ConvertResult b #
Convert a to b, returning Right on success and Left on error.
For a simpler interface, see convert.
Instances
convert :: Convertible a b => a -> b #
Convert from one type of data to another. Raises an exception if there is
an error with the conversion. For a function that does not raise an exception
in that case, see safeConvert.
Orphan instances
| Convertible GreyPixel GreyPixel Source # | |
Methods | |
| Convertible GreyPixel HSVPixel Source # | |
Methods | |
| Convertible GreyPixel RGBPixel Source # | |
Methods | |
| Convertible GreyPixel RGBAPixel Source # | |
Methods | |
| Convertible HSVPixel GreyPixel Source # | |
Methods | |
| Convertible HSVPixel HSVPixel Source # | |
Methods | |
| Convertible HSVPixel RGBPixel Source # | |
Methods | |
| Convertible HSVPixel RGBAPixel Source # | |
Methods | |
| Convertible RGBPixel GreyPixel Source # | |
Methods | |
| Convertible RGBPixel HSVPixel Source # | |
Methods | |
| Convertible RGBPixel RGBPixel Source # | |
Methods | |
| Convertible RGBPixel RGBAPixel Source # | |
Methods | |
| Convertible RGBAPixel GreyPixel Source # | |
Methods | |
| Convertible RGBAPixel HSVPixel Source # | |
Methods | |
| Convertible RGBAPixel RGBPixel Source # | |
Methods | |
| Convertible RGBAPixel RGBAPixel Source # | |
Methods | |