stack-2.15.1: The Haskell Tool Stack
Safe HaskellSafe-Inferred
LanguageGHC2021

Stack.Path

Description

Types and functions related to Stack's path command.

Synopsis

Documentation

data PathInfo Source #

Type representing information passed to all the path printers.

path :: [Text] -> RIO Runner () Source #

Print out useful path information in a human-readable format (and support others later).

paths :: [(String, Text, UseHaddocks (PathInfo -> Text))] Source #

The paths of interest to a user. The first tuple string is used for a description that the optparse flag uses, and the second string as a machine-readable key and also for --foo flags. The user can choose a specific path to list like --stack-root. But really it's mainly for the documentation aspect.

When printing output we generate PathInfo and pass it to the function to generate an appropriate string. Trailing slashes are removed, see #506.