penny-0.24.0.0: Extensible double-entry accounting system

Safe HaskellNone

Penny.Shield

Description

Shield - the Penny runtime environment

Both Cabin and Copper can benefit from knowing information about the Penny runtime environment, such as environment variables and whether standard output is a terminal. That information is provided by the Runtime type. In the future this module may also provide information about the POSIX locale configuration. For now, that information would require reaching into the FFI and so it is not implemented.

Synopsis

Documentation

data Output Source

Constructors

IsTTY 
NotTTY 

Instances

data Runtime Source

Information about the runtime environment.

data Term Source

Instances

termFromEnv :: Runtime -> TermSource

Determines which Chunk Term to use based on the TERM environment variable, regardless of whether standard output is a terminal. Uses Dumb if TERM is not set.

autoTerm :: Runtime -> TermSource

Determines which Chunk Term to use based on whether standard output is a terminal. Uses Dumb if standard output is not a terminal; otherwise, uses the TERM environment variable.