Safe Haskell | Safe-Infered |
---|
Penny - double-entry accounting system
Penny is organized into a tree of modules, each with a name. Check out the links for details on each component of Penny.
Penny.Cabin - Penny reports. Depends on Lincoln and Liberty.
Penny.Copper - the Penny parser. Depends on Lincoln.
Penny.Liberty - Penny command line parser helpers. Depends on Lincoln and Copper.
Penny.Lincoln - the Penny core. Depends on no other Penny components.
Penny.Shield the Penny runtime environment
Penny.Zinc - the Penny command-line interface. Depends on Cabin, Copper, Liberty, and Lincoln.
The dependencies are represented as a dot file in doc/dependencies.dot in the Penny git repository.
This module exports a few functions that are useful for building a simple command line program with default options. To make anything more complicated you may need to import modules from deeper down within the hierarchy, but for a program based on the defaults only you should be able to import this module only (and nothing else).
- newtype DefaultTimeZone = DefaultTimeZone TimeZoneOffset
- utcDefault :: DefaultTimeZone
- minsToDefaultTimeZone :: Int -> DefaultTimeZone
- data RadGroup
- periodComma :: RadGroup
- periodSpace :: RadGroup
- commaPeriod :: RadGroup
- commaSpace :: RadGroup
- allReportsWithDefaults :: DefaultTimeZone -> RadGroup -> [Report]
- data T = T {
- sensitive :: CaseSensitive
- factory :: CaseSensitive -> Text -> Exceptional Text (Text -> Bool)
- currentTime :: DateTime
- defaultTimeZone :: DefaultTimeZone
- radGroup :: RadGroup
- defaultFromRuntime :: DefaultTimeZone -> RadGroup -> Runtime -> T
- defaultPenny :: DefaultTimeZone -> RadGroup -> IO ()
- customPenny :: DefaultTimeZone -> RadGroup -> (Runtime -> T) -> [Report] -> IO ()
Default time zone
newtype DefaultTimeZone Source
minsToDefaultTimeZone :: Int -> DefaultTimeZoneSource
Use to make a DefaultTimeZone based on the number of minutes the time zone is offset from UTC. Make sure the argument you supply is between (-840) and 840; otherwise your program will crash at runtime.
Radix and grouping characters
Radix is period, grouping is comma
Radix is period, grouping is space
Radix is comma, grouping is period
Radix is comma, grouping is space
Reports
Parser defaults
T | |
|
defaultFromRuntime :: DefaultTimeZone -> RadGroup -> Runtime -> TSource
Main function
defaultPenny :: DefaultTimeZone -> RadGroup -> IO ()Source
customPenny :: DefaultTimeZone -> RadGroup -> (Runtime -> T) -> [Report] -> IO ()Source