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 |
Language | Haskell2010 |
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]
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. |
Bounded Verbosity Source | |
Enum Verbosity Source | |
Eq Verbosity Source | |
Data Verbosity Source | |
Ord Verbosity Source | |
Read Verbosity Source | |
Show Verbosity Source | |
Generic Verbosity Source | |
Binary Verbosity Source | Encoded as one byte in range |
Default Verbosity Source |
|
NFData Verbosity Source | |
HasVerbosity Verbosity Source | |
type Rep Verbosity Source |
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