cplug-0.2.0.0: Recompile and run partially applied C functions in Haskell, during runtime

Safe HaskellSafe
LanguageHaskell2010

Data.Either.Aux

Synopsis

Documentation

fromLeft :: Either a b -> Maybe a Source

This provides safe unpacking of a Left object.

fromRight :: Either a b -> Maybe b Source

This provides safe unpacking of a Right object.

mapLeft :: (t -> a) -> [Either t b] -> [Either a b] Source

This maps a function over a list, only applying it to Left objects

mapRight :: (t -> b) -> [Either a t] -> [Either a b] Source

This maps a function over a list, only applying it to Right objects

unsafeFromLeft :: Either a b -> a Source

This will throw an error if its input is Right