on develop help sign in
Merge pull request #420 from reflex-frp/eac@add-unzip-instance

Unzip instance for Event

commit316c3cd4e8b54ccb3b81d05914c009f0252135a7 authorElliot Cameron <3noch@users.noreply.github.com> dateTue 5 May 2020, 10:32 (6 years ago) parentefe98da7cd510e
1 file changed+7−1
src/Reflex/Class.hs+7−1
src/Reflex/Class.hs+7−1
@@ -180,7 +180,7 @@ import Prelude hiding (zip, zipWith)
180180import Data.These.Combinators (justThese)
181181#endif
182182#if MIN_VERSION_semialign(1,1,0)
183−import Data.Zip (Zip (..))
183+import Data.Zip (Zip (..), Unzip (..))
184184#endif
185185#endif
186186
@@ -1091,6 +1091,12 @@ instance Reflex t => Zip (Event t) where
10911091 zip x y = mapMaybe justThese $ align x y
10921092#endif
10931093
1094+#ifdef MIN_VERSION_semialign
1095+#if MIN_VERSION_semialign(1,1,0)
1096+instance Reflex t => Unzip (Event t) where
1097+ unzip = splitE
1098+#endif
1099+#endif
10941100
10951101-- | Create a new 'Event' that only occurs if the supplied 'Event' occurs and
10961102-- the 'Behavior' is true at the time of occurrence.