Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Util.Pretty

Contents

Description

Like Show, but designed to be easy to read rather than unambiguous and complete.

Synopsis

Documentation

class Pretty a where Source #

Format values in an eye-pleasing way. Unlike Show, this isn't intended to produce any kind of valid syntax, or even preserve information.

Minimal complete definition

pretty | format

Instances

Pretty Bool # 
Pretty Char.Char # 
Pretty Double # 
Pretty Float # 
Pretty Int # 
Pretty Integer # 
Pretty Word.Word8 # 
Pretty Word.Word16 # 
Pretty Word.Word32 # 
Pretty Word.Word64 # 
Pretty () # 

Methods

pretty :: () -> Text Source #

format :: () -> Format.Doc Source #

formatList :: [()] -> Format.Doc Source #

Pretty Dynamic.Dynamic # 
Pretty ByteString.ByteString # 
Pretty UTCTime # 
Pretty Calendar.Day # 
Pretty Lazy.Text # 
Pretty Text # 
Pretty Format.Doc # 
Pretty Commit # 
Pretty Size # 
Pretty Rect # 
Pretty Color # 
Pretty Key # 
Pretty UnserializeError # 
Pretty Qualified # 
Pretty Control # 
Pretty Attributes # 
Pretty RulerId # 
Pretty TrackId # 
Pretty ViewId # 
Pretty BlockId # 
Pretty Namespace # 
Pretty Id # 
Pretty Doc # 
Pretty Anga # 
Pretty Tala # 
Pretty State # 
Pretty Tempo # 
Pretty TempoChange # 
Pretty Duration # 
Pretty Key # 
Pretty Transpose # 
Pretty ScaleId # 
Pretty NoteNumber # 
Pretty Input # 
Pretty Degree # 
Pretty Pitch # 
Pretty Note # 
Pretty ScoreTime # 
Pretty RealTime # 
Pretty ChannelMessage # 
Pretty Key # 
Pretty Message # 
Pretty WriteDevice # 
Pretty ReadDevice # 
Pretty ReadMessage # 
Pretty WriteMessage # 
Pretty Message # 
Pretty Control # 
Pretty Channel # 
Pretty State # 
Pretty Note # 
Pretty Frame # 
Pretty Stack # 
Pretty Msg # 
Pretty Modification # 
Pretty Tree # 
Pretty Blob # 
Pretty Skeleton # 
Pretty Zoom # 
Pretty Type # 
Pretty Warp # 
Pretty PControl # 
Pretty Control # 
Pretty Instrument # 
Pretty Key # 
Pretty Flag # 
Pretty Str # 
Pretty Symbol # 
Pretty Sollu # 
Pretty Pattern # 
Pretty Emphasis # 
Pretty Stroke # 
Pretty Valantalai # 
Pretty Thoppi # 
Pretty Stroke # 
Pretty Stroke # 
Pretty Stroke # 
Pretty Stroke # 
Pretty StrokeMaps # 
Pretty Tags # 
Pretty Metadata # 
Pretty Korvai # 
Pretty Module # 
Pretty Attributes # 
Pretty Note # 
Pretty Orientation # 
Pretty Stack # 
Pretty Event # 
Pretty Selection # 
Pretty Key # 
Pretty Events # 
Pretty Range # 
Pretty Mark # 
Pretty Marklist # 
Pretty Ruler # 
Pretty LabeledMark # 
Pretty ControlFunction # 
Pretty PControlRef # 
Pretty ControlRef # 
Pretty Quoted # 
Pretty Val # 
Pretty Environ # 
Pretty Duration # 
Pretty PitchError # 
Pretty Scale # 
Pretty PitchConfig # 
Pretty PSignal # 
Pretty Val # 
Pretty Environ # 
Pretty RelativePitch # 
Pretty Event # 
Pretty Type # 
Pretty NumValue # 
Pretty NumType # 
Pretty Type # 
Pretty Config # 
Pretty Flag # 
Pretty Patch # 
Pretty Keyswitch # 
Pretty Keymap # 
Pretty InitializePatch # 
Pretty Flag # 
Pretty Scale # 
Pretty Patch # 
Pretty Settings # 
Pretty Initialization # 
Pretty Config # 
Pretty Backend # 
Pretty Record # 
Pretty Event # 
Pretty Patch # 
Pretty Allotted # 
Pretty AllotState # 
Pretty State # 
Pretty Event # 
Pretty Time # 
Pretty Duration # 
Pretty StaffConfig # 
Pretty Config # 
Pretty Meter # 
Pretty TrackSignal # 
Pretty RenderSource # 
Pretty RenderStyle # 
Pretty RenderConfig # 
Pretty Track # 
Pretty Padding # 
Pretty View # 
Pretty TracklikeId # 
Pretty TrackFlag # 
Pretty Status # 
Pretty DisplayTrack # 
Pretty Track # 
Pretty Box # 
Pretty Config # 
Pretty NoteDestination # 
Pretty TrackDestinations # 
Pretty Block # 
Pretty Default # 
Pretty LilypondPerformance # 
Pretty MidiPerformance # 
Pretty Meta # 
Pretty Backend # 
Pretty Allocation # 
Pretty Allocations # 
Pretty Config # 
Pretty Track # 
Pretty Context # 
Pretty UiMsg # 
Pretty State # 
Pretty Track # 
Pretty View # 
Pretty CmdUpdate # 
Pretty Error # 
Pretty TrackInfo # 
Pretty Range # 
Pretty Track # 
Pretty State # 
Pretty SaveHistory # 
Pretty Sliced # 
Pretty Track # 
Pretty TrackWarp # 
Pretty Track # 
Pretty Scale # 
Pretty ControlDamage # 
Pretty ScoreDamage # 
Pretty BlockDeps # 
Pretty CacheEntry # 
Pretty Cached # 
Pretty CacheKey # 
Pretty Cache # 
Pretty ArgName # 
Pretty CallName # 
Pretty Integrated # 
Pretty ControlMod # 
Pretty Collect # 
Pretty Mode # 
Pretty CallPriority # 
Pretty Library # 
Pretty Inversion # 
Pretty Dynamic # 
Pretty Tagged # 
Pretty ErrorPlace # 
Pretty CallError # 
Pretty ErrorVal # 
Pretty Error # 
Pretty TransposeType # 
Pretty TimeType # 
Pretty Normalized # 
Pretty Performance # 
Pretty DeriveStatus # 
Pretty Msg # 
Pretty Range # 
Pretty UpDown # 
Pretty PitchDirection # 
Pretty PitchState # 
Pretty DynState # 
Pretty Stroke # 
Pretty Bol # 
Pretty Stroke # 
Pretty DegreeMap # 
Pretty Tuning # 
Pretty Key # 
Pretty Voice # 
Pretty Voices # 
Pretty Ly # 
Pretty StaffGroup # 
Pretty KotekanNote # 
Pretty Repeat # 
Pretty Atom # 
Pretty KotekanPattern # 
Pretty SavePoint # 
Pretty Backend # 
Pretty ResolvedInstrument # 
Pretty HistoryEntry # 
Pretty HistoryCollect # 
Pretty HistoryConfig # 
Pretty History # 
Pretty InstrumentCode # 
Pretty Action # 
Pretty EditMode # 
Pretty SyncConfig # 
Pretty Patch # 
Pretty Code # 
Pretty MouseOn # 
Pretty Bindable # 
Pretty KeySpec # 
Pretty Hand # 
Pretty Degree # 
Pretty Composite # 
Pretty Expr # 
Pretty CallType # 
Pretty Track # 
Pretty Pos # 
Pretty Sample # 
Pretty Patch # 
Pretty Modify # 
Pretty Edit # 
Pretty Control # 
Pretty Note # 
Pretty Result # 
Pretty a => Pretty [a] # 

Methods

pretty :: [a] -> Text Source #

format :: [a] -> Format.Doc Source #

formatList :: [[a]] -> Format.Doc Source #

Pretty a => Pretty (Maybe a) # 
(Integral a, Pretty a) => Pretty (Ratio.Ratio a) # 
Pretty a => Pretty (NonEmpty.NonEmpty a) # 
Pretty v => Pretty (IntMap v) # 
Pretty a => Pretty (Tree.Tree a) # 
Pretty a => Pretty (Set a) # 
Pretty a => Pretty (Vector.Vector a) # 
(Storable a, Pretty a) => Pretty (Storable.Vector a) # 
(Unbox a, Pretty a) => Pretty (Unboxed.Vector a) # 
Pretty a => Pretty (Builder a) # 
Pretty a => Pretty (Lazy a) # 
Pretty (Value Format.Doc) # 
Pretty (Record Format.Doc) # 
Pretty n => Pretty (Ranges n) # 
Pretty a => Pretty (Stroke a) # 
Pretty a => Pretty (Note a) # 
Pretty dur => Pretty (NoteT dur) # 
Pretty (Signal y) # 
Pretty a => Pretty (Typed a) # 
Pretty d => Pretty (LEvent d) # 
ShowVal val => Pretty (Term val) # 
ShowVal val => Pretty (Call val) # 
Pretty stroke => Pretty (NoteT stroke) # 

Methods

pretty :: NoteT stroke -> Text Source #

format :: NoteT stroke -> Format.Doc Source #

formatList :: [NoteT stroke] -> Format.Doc Source #

Pretty stroke => Pretty (Note stroke) # 

Methods

pretty :: Note stroke -> Text Source #

format :: Note stroke -> Format.Doc Source #

formatList :: [Note stroke] -> Format.Doc Source #

Pretty stroke => Pretty (Instrument stroke) # 
Pretty stroke => Pretty (StrokeMap stroke) # 
Pretty stroke => Pretty (Patterns stroke) # 
Pretty stroke => Pretty (Stroke stroke) # 

Methods

pretty :: Stroke stroke -> Text Source #

format :: Stroke stroke -> Format.Doc Source #

formatList :: [Stroke stroke] -> Format.Doc Source #

Pretty stroke => Pretty (Note stroke) # 

Methods

pretty :: Note stroke -> Text Source #

format :: Note stroke -> Format.Doc Source #

formatList :: [Note stroke] -> Format.Doc Source #

Pretty (RawPitch a) #

Will look like: 62.95nn,4i(*wayang)

Pretty a => Pretty (Stream a) # 
(Show pitch, Pretty pitch) => Pretty (GenericInput pitch) # 
Pretty a => Pretty (AttributeMap a) # 
Pretty code => Pretty (Common code) # 
Pretty code => Pretty (SynthDecl code) # 
Pretty code => Pretty (Synth code) # 
Pretty code => Pretty (Db code) # 

Methods

pretty :: Db code -> Text Source #

format :: Db code -> Format.Doc Source #

formatList :: [Db code] -> Format.Doc Source #

Pretty code => Pretty (Inst code) # 

Methods

pretty :: Inst code -> Text Source #

format :: Inst code -> Format.Doc Source #

formatList :: [Inst code] -> Format.Doc Source #

Pretty t => Pretty (Block t) # 
Pretty (Call d) # 
Pretty val => Pretty (Context val) # 
Pretty val => Pretty (PassedArgs val) # 
Pretty (LookupCall call) # 
Show a => Pretty (CallDuration a) # 
Pretty (Merger a) # 
Pretty (Merge a) # 
Pretty (TrackCall d) # 
Pretty (ScopePriority call) # 
Pretty (TrackInfo d) # 
Pretty a => Pretty (GenericEvent a) # 
Pretty a => Pretty (Note a) # 
Pretty a => Pretty (Note a) # 
Pretty a => Pretty (Pasang a) # 
Pretty (a -> b) # 

Methods

pretty :: (a -> b) -> Text Source #

format :: (a -> b) -> Format.Doc Source #

formatList :: [a -> b] -> Format.Doc Source #

(Pretty a, Pretty b) => Pretty (Either a b) # 
(Pretty a, Pretty b) => Pretty (a, b) # 

Methods

pretty :: (a, b) -> Text Source #

format :: (a, b) -> Format.Doc Source #

formatList :: [(a, b)] -> Format.Doc Source #

(Pretty k, Pretty v) => Pretty (Map k v) # 

Methods

pretty :: Map k v -> Text Source #

format :: Map k v -> Format.Doc Source #

formatList :: [Map k v] -> Format.Doc Source #

(Pretty a, Pretty b) => Pretty (Seq.Paired a b) # 
(Pretty t, Pretty u) => Pretty (Update t u) # 
(Pretty a, Pretty b, Pretty c) => Pretty (a, b, c) # 

Methods

pretty :: (a, b, c) -> Text Source #

format :: (a, b, c) -> Format.Doc Source #

formatList :: [(a, b, c)] -> Format.Doc Source #

(Pretty note, Pretty control, Pretty pitch) => Pretty (Scope note control pitch) # 

Methods

pretty :: Scope note control pitch -> Text Source #

format :: Scope note control pitch -> Format.Doc Source #

formatList :: [Scope note control pitch] -> Format.Doc Source #

(Pretty a, Pretty b, Pretty c, Pretty d) => Pretty (a, b, c, d) # 

Methods

pretty :: (a, b, c, d) -> Text Source #

format :: (a, b, c, d) -> Format.Doc Source #

formatList :: [(a, b, c, d)] -> Format.Doc Source #

(Pretty gen, Pretty trans, Pretty track, Pretty val) => Pretty (ScopesT gen trans track val) # 

Methods

pretty :: ScopesT gen trans track val -> Text Source #

format :: ScopesT gen trans track val -> Format.Doc Source #

formatList :: [ScopesT gen trans track val] -> Format.Doc Source #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e) => Pretty (a, b, c, d, e) # 

Methods

pretty :: (a, b, c, d, e) -> Text Source #

format :: (a, b, c, d, e) -> Format.Doc Source #

formatList :: [(a, b, c, d, e)] -> Format.Doc Source #

(Pretty a, Pretty b, Pretty c, Pretty d, Pretty e, Pretty f) => Pretty (a, b, c, d, e, f) # 

Methods

pretty :: (a, b, c, d, e, f) -> Text Source #

format :: (a, b, c, d, e, f) -> Format.Doc Source #

formatList :: [(a, b, c, d, e, f)] -> Format.Doc Source #

pretty :: Pretty a => a -> Text Source #

formatted :: Pretty a => a -> Text Source #

Render a Pretty value to the default width.

pprint :: Pretty a => a -> IO () Source #

formatting

textList :: [Text] -> Format.Doc Source #

A list of strings, but without quotes around them.

delimitedList Source #

Arguments

:: Bool

Always spaces around the delimiters. Otherwise, they only get spaces if the list wraps.

-> Char.Char 
-> Char.Char 
-> [Format.Doc] 
-> Format.Doc 

Format a comma-separated list. Try to put it on one line, but break before commas if that's not possible.

misc

readWord :: ReadPrec String Source #

Read a space separated word.