penny-lib-0.2.0.0: Extensible double-entry accounting system - library

Safe HaskellSafe-Infered

Penny.Lincoln.Serial

Synopsis

Documentation

data Serial Source

A type for serial numbers, used widely for different purposes throughout Penny.

Instances

forward :: Serial -> IntSource

Numbered from first to last, beginning at zero.

backward :: Serial -> IntSource

Numbered from last to first, ending at zero.

serials :: [a] -> [Serial]Source

Applied to a list of items, return a list of Serials usable to identify the list of items.

serialItems :: (Serial -> a -> b) -> [a] -> [b]Source

Label a list of items with serials.

serialItemsM :: Monad m => (Serial -> a -> m b) -> [a] -> m [b]Source

Label a list of items with serials, in a monad.

serialChildrenInFamily :: (Serial -> cOld -> cNew) -> Family p cOld -> State (NextFwd, NextBack) (Family p cNew)Source

serialEithers :: Monad m => (Serial -> a -> m c) -> (Serial -> b -> m d) -> [Either a b] -> m [Either c d]Source

data NextFwd Source

Instances

data NextBack Source

Instances