|
module Pretty (
|
|
(.$)
|
|
, assertRight
|
|
, onRight
|
|
) where
|
|
|
|
import System.Exit (die)
|
|
|
|
(.$) :: (a -> b) -> (b -> c) -> (a -> c)
|
|
(.$) f g = g . f
|
|
|
|
onRight :: (a -> IO b) -> Either String a -> IO b
|
|
onRight = either die
|
|
|
|
assertRight :: Either String a -> IO a
|
|
assertRight = onRight return
|