unison-cli-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Cli.Pretty

Description

Small combinators that pretty-print small types in a canonical way for human consumption, such as hashes, file paths, and project names.

Synopsis

Documentation

displayBranchHash :: CausalHash -> Text Source #

Displays a full, non-truncated Branch.CausalHash to a string, e.g. #abcdef

prettyPath :: Path -> Pretty Source #

prettyPath' :: Path' -> Pretty Source #

prettyProjectNameSlash :: ProjectName -> Pretty Source #

prettyProjectName with a trailing slash.

prettyShareURI :: URI -> Pretty Source #

prettySlashProjectBranchName :: ProjectBranchName -> Pretty Source #

Like prettyProjectBranchName, but with a leading forward slash. This is used in some outputs to encourage/advertise an unambiguous syntax for project branches, as there's an ambiguity with single-segment relative paths.

Not all project branches are printed such: for example, when listing all branches of a project, we probably don't need or want to prefix every one with a forward slash.

prettyURI :: URI -> Pretty Source #