azure-functions-worker-0.0.0.0: src/Azure/Functions/Internal/Lens.hs
module Azure.Functions.Internal.Lens
where
import Lens.Family
toEither :: Phantom f => a -> LensLike f (Maybe b) t (Either a b) b
toEither = to . orError
{-# INLINE toEither #-}
orError :: a -> Maybe b -> Either a b
orError msg = maybe (Left msg) Right
{-# INLINE orError #-}