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