Safe Haskell | None |
---|
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.
- data ScreenLines
- unScreenLines :: ScreenLines -> Int
- data ScreenWidth
- unScreenWidth :: ScreenWidth -> Int
- data Output
- data Runtime
- environment :: Runtime -> [(String, String)]
- currentTime :: Runtime -> DateTime
- output :: Runtime -> Output
- screenLines :: Runtime -> Maybe ScreenLines
- screenWidth :: Runtime -> Maybe ScreenWidth
- data Term
- term :: Runtime -> Maybe Term
- runtime :: IO Runtime
- termFromEnv :: Runtime -> Term
- autoTerm :: Runtime -> Term
Documentation
environment :: Runtime -> [(String, String)]Source
currentTime :: Runtime -> DateTimeSource
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.