1
1
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:
Rob Rix 2017-09-10 19:36:22 +01:00
parent 13c0b6d496
commit 1ccff72b08

View File

@ -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