module Control.Foldl.Internal (
Maybe'(..)
, lazy
, strict
, Either'(..)
, hush
, Pair(..)
) where
data Maybe' a = Just' !a | Nothing'
lazy :: Maybe' a -> Maybe a
lazy :: forall a. Maybe' a -> Maybe a
lazy Maybe' a
Nothing' = forall a. Maybe a
Nothing
lazy (Just' a
a) = forall a. a -> Maybe a
Just a
a
{-# INLINABLE lazy #-}
strict :: Maybe a -> Maybe' a
strict :: forall a. Maybe a -> Maybe' a
strict Maybe a
Nothing = forall a. Maybe' a
Nothing'
strict (Just a
a ) = forall a. a -> Maybe' a
Just' a
a
{-# INLINABLE strict #-}
data Either' a b = Left' !a | Right' !b
hush :: Either' a b -> Maybe b
hush :: forall a b. Either' a b -> Maybe b
hush (Left' a
_) = forall a. Maybe a
Nothing
hush (Right' b
b) = forall a. a -> Maybe a
Just b
b
{-# INLINABLE hush #-}
data Pair a b = Pair !a !b