cautious-gen (empty) → 0.0.0.0
raw patch · 7 files changed
+151/−0 lines, 7 filesdep +QuickCheckdep +basedep +cautioussetup-changed
Dependencies added: QuickCheck, base, cautious, cautious-gen, genvalidity, genvalidity-hspec, genvalidity-hspec-aeson, hspec
Files
- LICENSE +30/−0
- Setup.hs +3/−0
- cautious-gen.cabal +60/−0
- src/Cautious/Gen.hs +19/−0
- test/Cautious/CautiousSpec.hs +27/−0
- test/Spec.hs +1/−0
- test/TestImport.hs +11/−0
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright Author name here (c) 2018++All rights reserved.++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 of Author name here nor the names of other+ 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 AND 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 COPYRIGHT+OWNER 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.
+ Setup.hs view
@@ -0,0 +1,3 @@+import Distribution.Simple++main = defaultMain
+ cautious-gen.cabal view
@@ -0,0 +1,60 @@+-- This file has been generated from package.yaml by hpack version 0.20.0.+--+-- see: https://github.com/sol/hpack+--+-- hash: fcafff7eeb325ac39bfccfac889235edff61e4dc8dea541cf8e8f1329fff466e++name: cautious-gen+version: 0.0.0.0+description: GenValid instances for Cautious and CautiousT+category: Testing+homepage: https://github.com/Nickske666/cautious#readme+bug-reports: https://github.com/Nickske666/cautious/issues+author: Nick Van den Broeck+maintainer: nick.van.den.broeck666@gmail.com+copyright: 2018 Nick Van den Broeck+license: BSD3+license-file: LICENSE+build-type: Simple+cabal-version: >= 1.10++source-repository head+ type: git+ location: https://github.com/Nickske666/cautious++library+ hs-source-dirs:+ src/+ default-extensions: NoImplicitPrelude+ ghc-options: -Wall+ build-depends:+ base >=4.10 && <5+ , cautious >=0.3+ , genvalidity+ exposed-modules:+ Cautious.Gen+ other-modules:+ Paths_cautious_gen+ default-language: Haskell2010++test-suite cautious-test+ type: exitcode-stdio-1.0+ main-is: Spec.hs+ hs-source-dirs:+ test/+ default-extensions: NoImplicitPrelude+ ghc-options: -threaded -rtsopts -with-rtsopts=-N+ build-depends:+ QuickCheck+ , base >=4.10 && <5+ , cautious >=0.3+ , cautious-gen+ , genvalidity+ , genvalidity-hspec+ , genvalidity-hspec-aeson+ , hspec+ other-modules:+ Cautious.CautiousSpec+ TestImport+ Paths_cautious_gen+ default-language: Haskell2010
+ src/Cautious/Gen.hs view
@@ -0,0 +1,19 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# LANGUAGE UndecidableInstances #-}++module Cautious.Gen where++import Cautious.Cautious+import Cautious.CautiousT++import Data.GenValidity++instance (GenUnchecked a, GenUnchecked w, GenUnchecked e) =>+ GenUnchecked (Cautious w e a)++instance (GenValid a, GenValid w, GenValid e) => GenValid (Cautious w e a)++instance GenUnchecked (m (Cautious e w a)) =>+ GenUnchecked (CautiousT e w m a)++instance GenValid (m (Cautious e w a)) => GenValid (CautiousT e w m a)
+ test/Cautious/CautiousSpec.hs view
@@ -0,0 +1,27 @@+{-# LANGUAGE TypeApplications #-}++module Cautious.CautiousSpec+ ( spec+ ) where++import TestImport++import Cautious.Cautious+import Cautious.CautiousT+import Cautious.Gen ()++type CautiousExample = Cautious String String++type CautiousExampleT = CautiousT String String Maybe++spec :: Spec+spec = do+ genValidSpec @(CautiousExample Int)+ eqSpec @(CautiousExample Int)+ jsonSpecOnValid @(CautiousExample Int)+ functorSpecOnValid @CautiousExample+ applicativeSpecOnValid @CautiousExample+ monadSpecOnValid @CautiousExample+ functorSpecOnValid @CautiousExampleT+ applicativeSpecOnValid @CautiousExampleT+ monadSpecOnValid @CautiousExampleT
+ test/Spec.hs view
@@ -0,0 +1,1 @@+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
+ test/TestImport.hs view
@@ -0,0 +1,11 @@+module TestImport+ ( module X+ ) where++import Prelude as X++import Test.Hspec as X+import Test.QuickCheck as X++import Test.Validity as X+import Test.Validity.Aeson as X