1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00

Add a Union type wrapping These.

This commit is contained in:
Rob Rix 2016-04-14 12:05:21 -04:00
parent 19b6b1fc1d
commit 9f835dbd04

View File

@ -39,6 +39,10 @@ apThese fg ab = uncurry maybeThese $ uncurry (***) (bimap (<*>) (<*>) (unpack fg
where unpack = fromThese Nothing Nothing . bimap Just Just
newtype Union a b = Union { getUnion :: Maybe (These a b) }
deriving (Eq, Show)
-- Instances
instance Bifunctor These where