Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides some common functions and reexports basic modules.
- type Amount = Decimal
- type Comment = String
- range1 :: Ix a => ((a, b), (a, b)) -> [a]
- bounds1 :: ((c, b), (c, b)) -> (c, c)
- range2 :: Ix a => ((a1, a), (a1, a)) -> [a]
- bounds2 :: ((a, c), (a, c)) -> (c, c)
- updateArray :: (MArray a e m, Ix i) => a i e -> i -> (e -> e) -> m ()
- assocArray :: Ix i => [(i, e)] -> Array i e
- when' :: Num a => Bool -> a -> a
- both :: (b -> c) -> (b, b) -> (c, c)
- conv :: (Real a, Fractional c) => a -> c
- positivePart :: (Ord a, Num a) => a -> a
- assert :: (MonadTrans t, Monad (t IO)) => (b -> Bool) -> t IO b -> [Char] -> t IO b
- newtype PList a = PList {
- pList :: [a]
- data ADate
- date :: Int -> Int -> ADate
- endOfYear :: Int -> ADate
- month :: Int -> ADate
- yearMonth :: ADate -> (Int, Int)
- getMonth :: ADate -> Int
- getYear :: ADate -> Int
- data ASpan = ASpan {}
- months :: Int -> ASpan
- yearMonthSpan :: ASpan -> (Int, Int)
- yearSpan :: ASpan -> Int
- divides :: ASpan -> ASpan -> Bool
- dateSpan :: ADate -> ADate -> ASpan
- shift :: ASpan -> ADate -> ADate
- module Control.Applicative
- module Control.Arrow
- module Control.Monad
- module Control.Monad.RWS.Strict
- module Data.Array
- module Data.Array.IO
- module Data.Decimal
- module Data.Function
- module Data.List
- module Data.Maybe
- module Data.Monoid
- module Data.Ord
- module Data.Ratio
- module Data.String
- module Data.Tuple
- module Text.Printf
- module Text.Show
Basic Types
Ranges and Arrays
range2 :: Ix a => ((a1, a), (a1, a)) -> [a] Source #
Get the range of the second dimension of an array
updateArray :: (MArray a e m, Ix i) => a i e -> i -> (e -> e) -> m () Source #
helper function to update an MArray value
generate an array and take the bounds from the input data
Utility functions
when' :: Num a => Bool -> a -> a Source #
Return a value only if the condition holds and zero otherwise.
conv :: (Real a, Fractional c) => a -> c Source #
positivePart :: (Ord a, Num a) => a -> a Source #
assert :: (MonadTrans t, Monad (t IO)) => (b -> Bool) -> t IO b -> [Char] -> t IO b Source #
assert that the result of an action satisfies a certain condition or print an error message
Dates
accounting dates
endOfYear :: Int -> ADate Source #
Create an ADate
value that corresponds to the last month of the
given year.
month :: Int -> ADate Source #
Create an ADate
value that corresponds to the given month in
year 0. (Fails if argument is outside of [1..12])
Date spans
represents a time span between accounting dates
Reexported modules
module Control.Applicative
module Control.Arrow
module Control.Monad
module Control.Monad.RWS.Strict
module Data.Array
module Data.Array.IO
module Data.Decimal
module Data.Function
module Data.List
module Data.Maybe
module Data.Monoid
module Data.Ord
module Data.Ratio
module Data.String
module Data.Tuple
module Text.Printf
module Text.Show