{-| Module : Auth.Biscuit.Utils Copyright : © Clément Delafargue, 2021 License : MIT Maintainer : clement@delafargue.name -} module Auth.Biscuit.Utils ( maybeToRight ) where -- | Exactly like `maybeToRight` from the `either` package, -- but without the dependency footprint maybeToRight :: b -> Maybe a -> Either b a maybeToRight :: b -> Maybe a -> Either b a maybeToRight b b = Either b a -> (a -> Either b a) -> Maybe a -> Either b a forall b a. b -> (a -> b) -> Maybe a -> b maybe (b -> Either b a forall a b. a -> Either a b Left b b) a -> Either b a forall a b. b -> Either a b Right