| Copyright | (c) 2015, Peter Trško |
|---|---|
| License | BSD3 |
| Maintainer | peter.trsko@gmail.com |
| Stability | experimental |
| Portability | BangPatterns (optional), CPP, NoImplicitPrelude, DeriveDataTypeable (optional), DeriveGeneric (optional) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Data.Verbosity
Description
Simple enum that encodes application Verbosity.
Documentation
Ordering:
Silent<Normal<Verbose<Annoying
Bounds:
minBound=Silent;maxBound=Annoying
Enum:
mapfromEnum[Silent..Annoying] = [0, 1, 2, 3]
Constructors
| Silent | Don't print any messages. |
| Normal | Print only important messages. (default) |
| Verbose | Print anything that comes in to mind. |
| Annoying | Print debugging/tracing information. |
Instances
| Bounded Verbosity | |
| Enum Verbosity | |
| Eq Verbosity | |
| Data Verbosity | |
| Ord Verbosity | |
| Read Verbosity | |
| Show Verbosity | |
| Generic Verbosity | |
| Binary Verbosity | Encoded as one byte in range |
| Default Verbosity |
|
| NFData Verbosity | |
| HasVerbosity Verbosity | |
| Typeable * Verbosity | |
| type Rep Verbosity |
parse :: (Eq string, IsString string) => string -> Maybe Verbosity Source
Generic Verbosity parsing function.
Use case-insensitive package to make this function case insensitive:
ghci> import Data.Verbosity as Verbosity ghci> import qualified Data.CaseInsensitive as CI (mk) ghci> Verbosity.parse (CI.mk "silent") Just Silent