data-check 0.1.0 → 0.1.1
raw patch · 6 files changed
+23/−82 lines, 6 filesdep ~data-checkPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: data-check
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- Data/Check.hs +10/−10
- LICENSE.md +1/−1
- README.md +2/−2
- data-check.cabal +6/−37
- tests/Main.hs +0/−32
CHANGELOG.md view
@@ -1,3 +1,7 @@+## Data Check 0.1.1++* Minor documentation and metadata changes.+ ## Data Check 0.1.0 * Initial release.
Data/Check.hs view
@@ -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 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 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 @@ -- | @'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
LICENSE.md view
@@ -1,4 +1,4 @@-Copyright © 2016 Mark Karpov+Copyright © 2016–2017 Mark Karpov All rights reserved.
README.md view
@@ -8,7 +8,7 @@ [](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 @@ ## License -Copyright © 2016 Mark Karpov+Copyright © 2016–2017 Mark Karpov Distributed under BSD 3 clause license.
data-check.cabal view
@@ -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 @@ 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
tests/Main.hs view
@@ -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