packages feed

genvalidity-dlist (empty) → 0.1.0.0

raw patch · 5 files changed

+92/−0 lines, 5 filesdep +basedep +dlistdep +genvalidity

Dependencies added: base, dlist, genvalidity, validity-dlist

Files

+ CHANGELOG.md view
@@ -0,0 +1,7 @@+# Changelog++## [0.1.0.0] - 2024-08-06++### Added++* Instances for `DList` and `DNonEmpty`
+ LICENSE view
@@ -0,0 +1,21 @@+The MIT License (MIT)++Copyright (c) 2016-2024 Tom Sydney Kerckhove, Clinton Mead++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.
+ genvalidity-dlist.cabal view
@@ -0,0 +1,40 @@+cabal-version: 1.12++-- This file has been generated from package.yaml by hpack version 0.36.0.+--+-- see: https://github.com/sol/hpack++name:           genvalidity-dlist+version:        0.1.0.0+synopsis:       GenValidity support for dlist+category:       Testing+homepage:       https://github.com/NorfairKing/validity#readme+bug-reports:    https://github.com/NorfairKing/validity/issues+author:         Tom Sydney Kerckhove, Clinton Mead+maintainer:     syd@cs-syd.eu+copyright:      Copyright: (c) 2016-2024 Tom Sydney Kerckhove, Clinton Mead+license:        MIT+license-file:   LICENSE+build-type:     Simple+extra-source-files:+    LICENSE+    CHANGELOG.md++source-repository head+  type: git+  location: https://github.com/NorfairKing/validity++library+  exposed-modules:+      Data.GenValidity.DList+      Data.GenValidity.DNonEmpty+  other-modules:+      Paths_genvalidity_dlist+  hs-source-dirs:+      src+  build-depends:+      base >=4.9 && <=5+    , dlist+    , genvalidity >=1.0+    , validity-dlist+  default-language: Haskell2010
+ src/Data/GenValidity/DList.hs view
@@ -0,0 +1,12 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}++module Data.GenValidity.DList () where++import Data.DList (DList)+import qualified Data.DList as DList+import Data.GenValidity (GenValid (..))+import Data.Validity.DList ()++instance (GenValid a) => GenValid (DList a) where+  genValid = DList.fromList <$> genValid+  shrinkValid = fmap DList.fromList . shrinkValid . DList.toList
+ src/Data/GenValidity/DNonEmpty.hs view
@@ -0,0 +1,12 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}++module Data.GenValidity.DNonEmpty () where++import Data.DList.DNonEmpty (DNonEmpty)+import qualified Data.DList.DNonEmpty as DNonEmpty+import Data.GenValidity (GenValid (..))+import Data.Validity.DNonEmpty ()++instance (GenValid a) => GenValid (DNonEmpty a) where+  genValid = DNonEmpty.fromList <$> genValid+  shrinkValid = fmap DNonEmpty.fromNonEmpty . shrinkValid . DNonEmpty.toNonEmpty