From ddb1898b39b19d5ddf6cace36480e763ac5d5315 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 14 Apr 2016 12:05:38 -0400 Subject: [PATCH] Add an Intersection newtype wrapping These. --- src/Data/Bifunctor/These.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Data/Bifunctor/These.hs b/src/Data/Bifunctor/These.hs index c0175a7f5..5b92fcf44 100644 --- a/src/Data/Bifunctor/These.hs +++ b/src/Data/Bifunctor/These.hs @@ -42,6 +42,9 @@ apThese fg ab = uncurry maybeThese $ uncurry (***) (bimap (<*>) (<*>) (unpack fg newtype Union a b = Union { getUnion :: Maybe (These a b) } deriving (Eq, Show) +newtype Intersection a b = Intersection { getIntersection :: Maybe (These a b) } + deriving (Eq, Show) + -- Instances