summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistairWard <>2020-08-10 10:37:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2020-08-10 10:37:00 (GMT)
commit76286ac9a1b2349b51682ce27f99f62e8e8e04e5 (patch)
tree6114ec09a4f79522fa698919df7fa8025755bd7d
parent96608c19152eaaf319c7968d446559a21eb58a7b (diff)
version 0.0.1.11HEAD0.0.1.11master
-rwxr-xr-x[-rw-r--r--].ghci0
-rwxr-xr-x[-rw-r--r--]README.markdown0
-rwxr-xr-x[-rw-r--r--]changelog.Debian0
-rwxr-xr-x[-rw-r--r--]changelog.markdown4
-rwxr-xr-x[-rw-r--r--]copyright0
-rwxr-xr-x[-rw-r--r--]debian/DEBIAN/control2
-rw-r--r--fishfood.cabal2
-rwxr-xr-x[-rw-r--r--]fishfood.spec2
-rwxr-xr-x[-rw-r--r--]man/man1/fishfood.10
-rw-r--r--src-lib/FishFood/Data/CommandOptions.hs14
-rw-r--r--src-lib/FishFood/Data/Verbosity.hs26
-rw-r--r--src-test/FishFood/Test/QuickCheck/Data/Verbosity.hs5
12 files changed, 37 insertions, 18 deletions
diff --git a/.ghci b/.ghci
index 5647b0d..5647b0d 100644..100755
--- a/.ghci
+++ b/.ghci
diff --git a/README.markdown b/README.markdown
index f25808c..f25808c 100644..100755
--- a/README.markdown
+++ b/README.markdown
diff --git a/changelog.Debian b/changelog.Debian
index cc9aae3..cc9aae3 100644..100755
--- a/changelog.Debian
+++ b/changelog.Debian
diff --git a/changelog.markdown b/changelog.markdown
index a478194..6765a12 100644..100755
--- a/changelog.markdown
+++ b/changelog.markdown
@@ -61,3 +61,7 @@ Changed references to author's domain-name.
## 0.0.1.10
Updated list of test-compilers.
+
+## 0.0.1.11
+Replaced module **Distribution.Verbosity** with **FishFood.Data.Verbosity**.
+
diff --git a/copyright b/copyright
index fa84035..fa84035 100644..100755
--- a/copyright
+++ b/copyright
diff --git a/debian/DEBIAN/control b/debian/DEBIAN/control
index 17da5fe..3fde9de 100644..100755
--- a/debian/DEBIAN/control
+++ b/debian/DEBIAN/control
@@ -1,5 +1,5 @@
Package: fishfood
-Version: 0.0.1.10-1
+Version: 0.0.1.11-1
Section: utils
Priority: optional
Architecture: amd64
diff --git a/fishfood.cabal b/fishfood.cabal
index ebe0cbd..11872c2 100644
--- a/fishfood.cabal
+++ b/fishfood.cabal
@@ -14,7 +14,7 @@
-- along with FishFood. If not, see <http://www.gnu.org/licenses/>.
Name: fishfood
-Version: 0.0.1.10
+Version: 0.0.1.11
Cabal-version: >= 1.10
Copyright: (C) 2013-2015 Dr. Alistair Ward
License: GPL
diff --git a/fishfood.spec b/fishfood.spec
index 3708655..b2db0d1 100644..100755
--- a/fishfood.spec
+++ b/fishfood.spec
@@ -21,7 +21,7 @@
Summary: Calculates file-size frequency-distribution.
Name: fishfood
-Version: 0.0.1.10
+Version: 0.0.1.11
Release: 1
License: GPLv3
# From '/usr/share/doc/packages/rpm/GROUPS'.
diff --git a/man/man1/fishfood.1 b/man/man1/fishfood.1
index d50dbde..d50dbde 100644..100755
--- a/man/man1/fishfood.1
+++ b/man/man1/fishfood.1
diff --git a/src-lib/FishFood/Data/CommandOptions.hs b/src-lib/FishFood/Data/CommandOptions.hs
index f80f2b2..5aeb657 100644
--- a/src-lib/FishFood/Data/CommandOptions.hs
+++ b/src-lib/FishFood/Data/CommandOptions.hs
@@ -48,8 +48,8 @@ module FishFood.Data.CommandOptions(
import qualified Data.Default
import qualified Data.Maybe
-import qualified Distribution.Verbosity
import qualified FishFood.Data.File as Data.File
+import qualified FishFood.Data.Verbosity as Data.Verbosity
import qualified ToolShed.SelfValidate
-- | Either an arithmetic size-increase for which there's a default, or a geometric size-ratio.
@@ -57,10 +57,10 @@ type BinSizeDelta ratio = Either (Maybe Data.File.FileSize) ratio
-- | Declares a record to contain command-line options.
data CommandOptions ratio = MkCommandOptions {
- getBinSizeDelta :: BinSizeDelta ratio, -- ^ Either the arithmetic size-increase (defaulting to one standard-deviation), or the geometric size-ratio, of the sequence of bins into which files are categorized.
- getDeriveProbabilityMassFunction :: Bool, -- ^ Whether to derive the "Probability mass function" rather than the "Frequency-distribution".
- getNDecimalDigits :: Int, -- ^ The precision to which fractional data is displayed.
- getVerbosity :: Distribution.Verbosity.Verbosity -- ^ The threshold for ancillary information-output.
+ getBinSizeDelta :: BinSizeDelta ratio, -- ^ Either the arithmetic size-increase (defaulting to one standard-deviation), or the geometric size-ratio, of the sequence of bins into which files are categorized.
+ getDeriveProbabilityMassFunction :: Bool, -- ^ Whether to derive the "Probability mass function" rather than the "Frequency-distribution".
+ getNDecimalDigits :: Int, -- ^ The precision to which fractional data is displayed.
+ getVerbosity :: Data.Verbosity.Verbosity -- ^ The threshold for ancillary information-output.
} deriving Show
instance Data.Default.Default (CommandOptions ratio) where
@@ -68,7 +68,7 @@ instance Data.Default.Default (CommandOptions ratio) where
getBinSizeDelta = Left Nothing, -- Interpreted as one standard-deviation.
getDeriveProbabilityMassFunction = False,
getNDecimalDigits = 3,
- getVerbosity = Distribution.Verbosity.normal
+ getVerbosity = Data.Default.def
}
instance (Num ratio, Ord ratio, Show ratio) => ToolShed.SelfValidate.SelfValidator (CommandOptions ratio) where
@@ -97,7 +97,7 @@ instance (Num ratio, Ord ratio, Show ratio) => ToolShed.SelfValidate.SelfValidat
]
-- | Smart constructor.
-mkCommandOptions :: (Num ratio, Ord ratio, Show ratio) => BinSizeDelta ratio -> Bool -> Int -> Distribution.Verbosity.Verbosity -> CommandOptions ratio
+mkCommandOptions :: (Num ratio, Ord ratio, Show ratio) => BinSizeDelta ratio -> Bool -> Int -> Data.Verbosity.Verbosity -> CommandOptions ratio
mkCommandOptions binSizeDelta deriveProbabilityMassFunction nDecimalDigits verbosity
| ToolShed.SelfValidate.isValid commandOptions = commandOptions
| otherwise = error $ "FishFood.Data.CommandOptions.mkCommandOptions:\t" ++ ToolShed.SelfValidate.getFirstError commandOptions
diff --git a/src-lib/FishFood/Data/Verbosity.hs b/src-lib/FishFood/Data/Verbosity.hs
index 09916d1..f98386f 100644
--- a/src-lib/FishFood/Data/Verbosity.hs
+++ b/src-lib/FishFood/Data/Verbosity.hs
@@ -18,20 +18,36 @@
{- |
[@AUTHOR@] Dr. Alistair Ward
- [@DESCRIPTION@] Instance-definitions for 'Distribution.Verbosity.Verbosity'.
+ [@DESCRIPTION@]
+ The levels of program-output.
+ N.B.: the data-type is coincidentally similar to 'Distribution.Verbosity.Internal.VerbosityLevel'.
-}
module FishFood.Data.Verbosity(
+-- * Types
+-- ** Data-types
+ Verbosity(),
-- * Constants
range
) where
import qualified Data.Default
-import qualified Distribution.Verbosity
-instance Data.Default.Default Distribution.Verbosity.Verbosity where
- def = Distribution.Verbosity.normal
+-- | Define the levels of program-output.
+data Verbosity
+ = Silent
+ | Normal
+ | Verbose
+ | Deafening
+ deriving (Enum, Eq, Ord, Read, Show)
+
+instance Data.Default.Default Verbosity where
+ def = Normal
+
+instance Bounded Verbosity where
+ minBound = Silent
+ maxBound = Deafening
-- | The constant complete range of values.
-range :: [Distribution.Verbosity.Verbosity]
+range :: [Verbosity]
range = [minBound .. maxBound]
diff --git a/src-test/FishFood/Test/QuickCheck/Data/Verbosity.hs b/src-test/FishFood/Test/QuickCheck/Data/Verbosity.hs
index e87e95a..1627014 100644
--- a/src-test/FishFood/Test/QuickCheck/Data/Verbosity.hs
+++ b/src-test/FishFood/Test/QuickCheck/Data/Verbosity.hs
@@ -18,14 +18,13 @@
{- |
[@AUTHOR@] Dr. Alistair Ward
- [@DESCRIPTION@] Implements 'Test.QuickCheck.Arbitrary' for 'Distribution.Verbosity.Verbosity'.
+ [@DESCRIPTION@] Implements 'Test.QuickCheck.Arbitrary'.
-}
module FishFood.Test.QuickCheck.Data.Verbosity() where
-import qualified Distribution.Verbosity
import qualified FishFood.Data.Verbosity as Data.Verbosity
import qualified Test.QuickCheck
-instance Test.QuickCheck.Arbitrary Distribution.Verbosity.Verbosity where
+instance Test.QuickCheck.Arbitrary Data.Verbosity.Verbosity where
arbitrary = Test.QuickCheck.elements Data.Verbosity.range