Safe Haskell | None |
---|---|

Language | Haskell2010 |

`AUTHOR`

- Dr. Alistair Ward
`DESCRIPTION`

- Defines options for program-operation.
- Defines an appropriate default value, which is expected to be over-ridden on the command-line.
- Self-validates.

## Synopsis

- type BinSizeDelta ratio = Either (Maybe FileSize) ratio
- data CommandOptions ratio
- mkCommandOptions :: (Num ratio, Ord ratio, Show ratio) => BinSizeDelta ratio -> Bool -> Int -> Verbosity -> CommandOptions ratio
- setBinSizeIncrement :: FileSize -> CommandOptions ratio -> CommandOptions ratio
- setBinSizeRatio :: ratio -> CommandOptions ratio -> CommandOptions ratio

# Types

## Type-synonyms

type BinSizeDelta ratio = Either (Maybe FileSize) ratio Source #

Either an arithmetic size-increase for which there's a default, or a geometric size-ratio.

## Data-types

data CommandOptions ratio Source #

Declares a record to contain command-line options.

## Instances

Show ratio => Show (CommandOptions ratio) Source # | |

Defined in FishFood.Data.CommandOptions showsPrec :: Int -> CommandOptions ratio -> ShowS # show :: CommandOptions ratio -> String # showList :: [CommandOptions ratio] -> ShowS # | |

Default (CommandOptions ratio) Source # | |

Defined in FishFood.Data.CommandOptions def :: CommandOptions ratio # | |

(Num ratio, Ord ratio, Show ratio) => SelfValidator (CommandOptions ratio) Source # | |

Defined in FishFood.Data.CommandOptions getErrors :: CommandOptions ratio -> [String] # isValid :: CommandOptions ratio -> Bool # |

# Functions

## Constructor

mkCommandOptions :: (Num ratio, Ord ratio, Show ratio) => BinSizeDelta ratio -> Bool -> Int -> Verbosity -> CommandOptions ratio Source #

Smart constructor.

## Mutators

setBinSizeIncrement :: FileSize -> CommandOptions ratio -> CommandOptions ratio Source #

Mutator.

setBinSizeRatio :: ratio -> CommandOptions ratio -> CommandOptions ratio Source #

Mutator.