1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 00:42:33 +03:00

🔥 the TotalCrosswalk instance over Both.

This commit is contained in:
Rob Rix 2016-04-14 21:59:44 -04:00
parent b036fa27a3
commit 4845ee1245

View File

@ -1,7 +1,6 @@
{-# LANGUAGE FlexibleInstances #-}
module Data.Functor.Both where
import Data.Align
import Data.Bifunctor
import Data.Bifunctor.Join
import Data.Bifunctor.These
@ -45,7 +44,3 @@ snd = Prelude.snd . runBoth
instance Monoid a => Monoid (Join (,) a) where
mempty = pure mempty
mappend a b = mappend <$> a <*> b
instance TotalCrosswalk (Join (,)) where
tsequenceL d = runBothWith (alignWith (\ these -> fromMaybe <$> d <*> maybeBothOfThese these))