packages feed

json-ast-quickcheck (empty) → 0.1

raw patch · 4 files changed

+99/−0 lines, 4 filesdep +QuickCheckdep +basedep +json-astsetup-changed

Dependencies added: QuickCheck, base, json-ast, quickcheck-instances

Files

+ LICENSE view
@@ -0,0 +1,22 @@+Copyright (c) 2016, Nikita Volkov++Permission is hereby granted, free of charge, to any person+obtaining a copy of this software and associated documentation+files (the "Software"), to deal in the Software without+restriction, including without limitation the rights to use,+copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the+Software is furnished to do so, subject to the following+conditions:++The above copyright notice and this permission notice shall be+included in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR+OTHER DEALINGS IN THE SOFTWARE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ json-ast-quickcheck.cabal view
@@ -0,0 +1,51 @@+name:+  json-ast-quickcheck+version:+  0.1+synopsis:+  Compatibility layer for "json-ast" and "QuickCheck"+description:+homepage:+  https://github.com/nikita-volkov/json-ast-quickcheck +bug-reports:+  https://github.com/nikita-volkov/json-ast-quickcheck/issues +author:+  Nikita Volkov <nikita.y.volkov@mail.ru>+maintainer:+  Nikita Volkov <nikita.y.volkov@mail.ru>+copyright:+  (c) 2016, Nikita Volkov+license:+  MIT+license-file:+  LICENSE+build-type:+  Simple+cabal-version:+  >=1.10+++source-repository head+  type:+    git+  location:+    git://github.com/nikita-volkov/json-ast-quickcheck.git+++library+  hs-source-dirs:+    library+  default-extensions:+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, ImpredicativeTypes, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples+  default-language:+    Haskell2010+  other-modules:+  exposed-modules:+    JSON.AST.QuickCheck+  build-depends:+    json-ast == 0.1.*,+    -- testing:+    quickcheck-instances >= 0.3.12 && < 0.4,+    QuickCheck >= 2.8.1 && < 3,+    -- general:+    base >= 4.6 && < 5
+ library/JSON/AST/QuickCheck.hs view
@@ -0,0 +1,24 @@+module JSON.AST.QuickCheck where++import Prelude+import JSON.AST+import Test.QuickCheck+import Test.QuickCheck.Instances+++instance Arbitrary JSON where+  arbitrary =+    oneof [null, bool, number, string, array, object]+    where+      null =+        pure Null+      bool =+        fmap Bool arbitrary+      number =+        fmap Number arbitrary+      string =+        fmap String arbitrary+      array =+        fmap Array arbitrary+      object =+        fmap Object arbitrary