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