prettyprinter-combinators-0.1.2: Some useful combinators for the prettyprinter package
Copyright(c) Sergey Vinokurov 2018
LicenseApache-2.0 (see LICENSE)
Maintainerserg.foo@gmail.com
Safe HaskellSafe-Inferred
LanguageGHC2021

Prettyprinter.Show

Description

 
Synopsis

Documentation

ppShow :: Show a => a -> Doc ann Source #

newtype PPShow a Source #

Helper to use Show-based prettyprinting with DerivingVia.

>>> :{
data TestWithDeriving a b = TestWithDeriving
  { testSet         :: Maybe (Set a)
  , testB           :: b
  , testIntMap      :: IntMap String
  , testComplexMap  :: Map (Maybe (Set Int)) (IntMap (Set String))
  }
  deriving (Show)
  deriving Pretty via PPShow (TestWithDeriving a b)
:}

Constructors

PPShow 

Fields

Instances

Instances details
Show a => Pretty (PPShow a) Source # 
Instance details

Defined in Prettyprinter.Show

Methods

pretty :: PPShow a -> Doc ann #

prettyList :: [PPShow a] -> Doc ann #