mirror of
https://github.com/github/semantic.git
synced 2025-01-03 04:51:57 +03:00
Define a Pretty1 instance for Join.
This commit is contained in:
parent
13c0b6d496
commit
1ccff72b08
@ -13,6 +13,7 @@ module Data.Functor.Both
|
|||||||
import Data.Bifunctor.Join as X
|
import Data.Bifunctor.Join as X
|
||||||
import Data.Functor.Classes
|
import Data.Functor.Classes
|
||||||
import Data.Semigroup
|
import Data.Semigroup
|
||||||
|
import Data.Text.Prettyprint.Doc as Pretty
|
||||||
import Prelude hiding (fst, snd)
|
import Prelude hiding (fst, snd)
|
||||||
import qualified Prelude
|
import qualified Prelude
|
||||||
import Text.Show
|
import Text.Show
|
||||||
@ -55,3 +56,6 @@ instance Eq2 p => Eq1 (Join p) where
|
|||||||
|
|
||||||
instance Show2 p => Show1 (Join p) where
|
instance Show2 p => Show1 (Join p) where
|
||||||
liftShowsPrec sp sl d = showsUnaryWith (liftShowsPrec2 sp sl sp sl) "Join" d . runJoin
|
liftShowsPrec sp sl d = showsUnaryWith (liftShowsPrec2 sp sl sp sl) "Join" d . runJoin
|
||||||
|
|
||||||
|
instance Pretty2 p => Pretty1 (Join p) where
|
||||||
|
liftPretty p pl = liftPretty2 p pl p pl . runJoin
|
||||||
|
Loading…
Reference in New Issue
Block a user