summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrkkrp <>2017-05-21 17:12:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2017-05-21 17:12:00 (GMT)
commit0d38e0db6f2ebe231e8d9bd166f96f75d802ef60 (patch)
tree05afa7fbe09ba620a5126092ec414eaeefd4004b
parent4667fbb301ec44746affcc4c799eb70e1a7abc71 (diff)
version 0.1.1HEAD0.1.1master
-rw-r--r--CHANGELOG.md4
-rw-r--r--Data/Check.hs20
-rw-r--r--LICENSE.md2
-rw-r--r--README.md4
-rw-r--r--data-check.cabal43
-rw-r--r--tests/Main.hs32
6 files changed, 23 insertions, 82 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c32ecf4..b03b809 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## Data Check 0.1.1
+
+* Minor documentation and metadata changes.
+
## Data Check 0.1.0
* Initial release.
diff --git a/Data/Check.hs b/Data/Check.hs
index cbc1e59..d1428bc 100644
--- a/Data/Check.hs
+++ b/Data/Check.hs
@@ -1,14 +1,14 @@
-- |
-- Module : Data.Check
--- Copyright : © 2016 Mark Karpov
+-- Copyright : © 2016–2017 Mark Karpov
-- License : BSD 3 clause
--
--- Maintainer : Mark Karpov <markkarpov@openmailbox.org>
+-- Maintainer : Mark Karpov <markkarpov92@gmail.com>
-- Stability : experimental
-- Portability : portable
--
--- This module provides generalized approach to checking and verification of
--- data, it's useful, for example, for validation of fields on web forms.
+-- This module provides a generalized approach to checking and verification
+-- of data. It's useful, for example, for validation of fields on web forms.
--
-- Typically, there are a number of transformations and checks you may want
-- to perform on a particular type of data, such as text. Thus, it makes
@@ -20,8 +20,8 @@
-- However, if we have many normalizing operations, we need a way to specify
-- in which order they should be performed, or result can be unpredictable.
--
--- To specify order in which transformations are performed, 'normalizer' and
--- 'normalizerM' functions take a “priority” argument, which is just a
+-- To specify the order in which transformations are performed, 'normalizer'
+-- and 'normalizerM' functions take a “priority” argument, which is just a
-- 'Natural' number. The bigger the number, the later the function will be
-- applied, so the transformation with priority 0 will always run first.
--
@@ -75,7 +75,7 @@ instance Eq (Normalizer m a) where
instance Ord (Normalizer m a) where
(Normalizer x _) `compare` (Normalizer y _) = x `compare` y
--- | Create a normalizing 'Checker'. Every normalizer has a priority — the
+-- | Create a normalizing 'Checker'. Every normalizer has a priority—the
-- bigger the number, the later the normalizer runs. Every normalizer you
-- use should have a unique priority number.
@@ -109,7 +109,7 @@ instance Eq (Validator m e a) where
instance Ord (Validator m e a) where
(Validator x _) `compare` (Validator y _) = x `compare` y
--- | Create a validating 'Checker'. Every validator has a priority — the
+-- | Create a validating 'Checker'. Every validator has a priority—the
-- bigger the number, the later the validation step runs. Every validator
-- you use should have a unique priority number.
@@ -134,8 +134,8 @@ validatorM n f = Checker S.empty (S.singleton $ Validator n f)
-- | @'Checker' m e a@ is a checker that checks value of type @a@, can
-- perform the check in @m@ monad, returning @e@ message when check fails.
--
--- 'Checker' is a 'Semigroup' and 'Monoid' — this is how you combine
--- different checkers and build more complex ones.
+-- 'Checker' is a 'Semigroup' and 'Monoid'—this is how you combine different
+-- checkers and build more complex ones.
data Checker m e a where
Checker :: Monad m
diff --git a/LICENSE.md b/LICENSE.md
index ae71695..19c227c 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,4 +1,4 @@
-Copyright © 2016 Mark Karpov
+Copyright © 2016–2017 Mark Karpov
All rights reserved.
diff --git a/README.md b/README.md
index 4347a6e..ebbf0ed 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
[![Coverage Status](https://coveralls.io/repos/mrkkrp/data-check/badge.svg?branch=master&service=github)](https://coveralls.io/github/mrkkrp/data-check?branch=master)
This is a library that implements generalized approach to checking and
-verification of data, it's useful, for example, for validation of fields on
+verification of data. It's useful, for example, for validation of fields on
web forms.
Typically, there are a number of transformations and checks you may want to
@@ -40,6 +40,6 @@ priority-spaces are separate.
## License
-Copyright © 2016 Mark Karpov
+Copyright © 2016–2017 Mark Karpov
Distributed under BSD 3 clause license.
diff --git a/data-check.cabal b/data-check.cabal
index 2a588e6..771a8d0 100644
--- a/data-check.cabal
+++ b/data-check.cabal
@@ -1,49 +1,18 @@
---
--- Cabal configuration for ‘data-check’ package.
---
--- Copyright © 2016 Mark Karpov <markkarpov@openmailbox.org>
---
--- Redistribution and use in source and binary forms, with or without
--- modification, are permitted provided that the following conditions are
--- met:
---
--- * Redistributions of source code must retain the above copyright notice,
--- this list of conditions and the following disclaimer.
---
--- * Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in the
--- documentation and/or other materials provided with the distribution.
---
--- * Neither the name Mark Karpov nor the names of contributors may be used
--- to endorse or promote products derived from this software without
--- specific prior written permission.
---
--- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS “AS IS” AND ANY
--- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
--- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
--- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
--- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
--- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
--- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
--- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
--- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
--- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
--- POSSIBILITY OF SUCH DAMAGE.
-
name: data-check
-version: 0.1.0
+version: 0.1.1
cabal-version: >= 1.10
+tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.1
license: BSD3
license-file: LICENSE.md
-author: Mark Karpov <markkarpov@openmailbox.org>
-maintainer: Mark Karpov <markkarpov@openmailbox.org>
+author: Mark Karpov <markkarpov92@gmail.com>
+maintainer: Mark Karpov <markkarpov92@gmail.com>
homepage: https://github.com/mrkkrp/data-check
bug-reports: https://github.com/mrkkrp/data-check/issues
category: Data, Web
synopsis: Library for checking and normalization of data (e.g. from web forms)
build-type: Simple
description: Library for checking and normalization of data (e.g. from web forms).
-extra-source-files: CHANGELOG.md
+extra-doc-files: CHANGELOG.md
, README.md
source-repository head
@@ -73,7 +42,7 @@ test-suite tests
type: exitcode-stdio-1.0
build-depends: base >= 4.7 && < 5.0
, QuickCheck >= 2.4 && < 3.0
- , data-check >= 0.1.0
+ , data-check
, hspec >= 2.0 && < 3.0
if flag(dev)
ghc-options: -Wall -Werror
diff --git a/tests/Main.hs b/tests/Main.hs
index 8255d23..3b610e6 100644
--- a/tests/Main.hs
+++ b/tests/Main.hs
@@ -1,35 +1,3 @@
---
--- Tests for the ‘data-check’ package.
---
--- Copyright © 2016 Mark Karpov <markkarpov@openmailbox.org>
---
--- Redistribution and use in source and binary forms, with or without
--- modification, are permitted provided that the following conditions are
--- met:
---
--- * Redistributions of source code must retain the above copyright notice,
--- this list of conditions and the following disclaimer.
---
--- * Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in the
--- documentation and/or other materials provided with the distribution.
---
--- * Neither the name Mark Karpov nor the names of contributors may be used
--- to endorse or promote products derived from this software without
--- specific prior written permission.
---
--- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS “AS IS” AND ANY
--- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
--- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
--- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
--- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
--- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
--- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
--- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
--- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
--- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
--- POSSIBILITY OF SUCH DAMAGE.
-
{-# LANGUAGE MultiWayIf #-}
module Main (main) where