fixed-vector-QC (empty) → 2.0.0.0
raw patch · 4 files changed
+109/−0 lines, 4 filesdep +QuickCheckdep +basedep +fixed-vector
Dependencies added: QuickCheck, base, fixed-vector
Files
- ChangeLog.md +3/−0
- Data/Vector/Fixed/Instances/QuickCheck.hs +37/−0
- LICENSE +30/−0
- fixed-vector-QC.cabal +39/−0
+ ChangeLog.md view
@@ -0,0 +1,3 @@+2.0.0.0+-------+* Initial release
+ Data/Vector/Fixed/Instances/QuickCheck.hs view
@@ -0,0 +1,37 @@+{-# LANGUAGE DerivingVia #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}+-- | Module with @aeson@ instances for data types defined in fixed+-- vector+module Data.Vector.Fixed.Instances.QuickCheck () where++import Data.Vector.Fixed (Arity,ArityPeano,ViaFixed(..),Vector)+import qualified Data.Vector.Fixed as F+import qualified Data.Vector.Fixed.Boxed as FB+import qualified Data.Vector.Fixed.Strict as FF+import qualified Data.Vector.Fixed.Unboxed as FU+import qualified Data.Vector.Fixed.Primitive as FP+import qualified Data.Vector.Fixed.Storable as FS+import Test.QuickCheck+++instance (Vector v a, Arbitrary a) => Arbitrary (ViaFixed v a) where+ arbitrary = F.replicateM arbitrary+++deriving via ViaFixed (FB.Vec n) a instance (Arity n, Arbitrary a) => Arbitrary (FB.Vec n a)+deriving via ViaFixed (FF.Vec n) a instance (Arity n, Arbitrary a) => Arbitrary (FF.Vec n a)+deriving via ViaFixed (FP.Vec n) a instance (Arity n, Arbitrary a, FP.Prim a) => Arbitrary (FP.Vec n a)+deriving via ViaFixed (FS.Vec n) a instance (Arity n, Arbitrary a, FS.Storable a) => Arbitrary (FS.Vec n a)+deriving via ViaFixed (FU.Vec n) a instance (Arity n, Arbitrary a, FU.Unbox n a) => Arbitrary (FU.Vec n a)++deriving via ViaFixed (F.VecList n) a instance (Arity n, Arbitrary a) => Arbitrary (F.VecList n a)+deriving via ViaFixed (F.VecPeano n) a instance (ArityPeano n, Arbitrary a) => Arbitrary (F.VecPeano n a)+deriving via ViaFixed F.Only a instance (Arbitrary a) => Arbitrary (F.Only a)++instance Arbitrary (F.Empty a) where+ arbitrary = pure F.Empty
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright (c) Aleksey Khudyakov++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:++1. Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++2. 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.++3. Neither the name of the author nor the names of his contributors+ may be used to endorse or promote products derived from this software+ without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``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 AUTHORS OR CONTRIBUTORS 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.
+ fixed-vector-QC.cabal view
@@ -0,0 +1,39 @@+Name: fixed-vector-QC+Version: 2.0.0.0+Synopsis: QuickCheck instances for fixed-vector+Description:+ This package contains Arbitrary instances for data types defined in+ fixed-vector package.++Cabal-Version: >= 1.10+License: BSD3+License-File: LICENSE+Author: Aleksey Khudyakov <alexey.skladnoy@gmail.com>+Maintainer: Aleksey Khudyakov <alexey.skladnoy@gmail.com>+Bug-reports: https://github.com/Shimuuar/fixed-vector/issues+Category: Data+Build-Type: Simple+extra-source-files:+ ChangeLog.md++tested-with:+ GHC ==8.10.7+ || ==9.0.1+ || ==9.2.8+ || ==9.4.7+ || ==9.6.6+ || ==9.8.2+ || ==9.10.1++source-repository head+ type: git+ location: http://github.com/Shimuuar/fixed-vector++Library+ Ghc-options: -Wall+ Default-Language: Haskell2010+ Build-Depends: base >=4.14 && <5+ , fixed-vector >=2.0+ , QuickCheck >=2.13+ Exposed-modules:+ Data.Vector.Fixed.Instances.QuickCheck