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:
parent
b036fa27a3
commit
4845ee1245
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user