commutative 0.0.1.1 → 0.0.1.2
raw patch · 5 files changed
+19/−17 lines, 5 filessetup-changedPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Data.Commutative: instance Data.Commutative.CommutativeId (Data.Commutative.OneOf a)
Files
- Setup.hs +0/−2
- commutative.cabal +4/−2
- src/Data/Commutative.hs +3/−0
- test/Main.hs +12/−0
- test/Spec.hs +0/−13
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
commutative.cabal view
@@ -1,5 +1,5 @@ Name: commutative-Version: 0.0.1.1+Version: 0.0.1.2 Author: Athan Clark <athan.clark@gmail.com> Maintainer: Athan Clark <athan.clark@gmail.com> License: MIT@@ -28,13 +28,15 @@ Hs-Source-Dirs: src , test Ghc-Options: -Wall- Main-Is: Spec.hs+ Main-Is: Main.hs Build-Depends: base , tasty , tasty-quickcheck , tasty-hunit , QuickCheck , quickcheck-instances+ , random+ , semigroups Source-Repository head Type: git
src/Data/Commutative.hs view
@@ -71,6 +71,9 @@ commute (OneOf x) (OneOf y) = OneOf $ pick1 (getFirst $ First x `mappend` First y) (getLast $ Last x `mappend` Last y) +instance CommutativeId (OneOf a) where+ cempty = OneOf Nothing+ -- Numbers instance Num a => Commutative (Sum a) where commute (Sum x) (Sum y) = Sum $ x + y
+ test/Main.hs view
@@ -0,0 +1,12 @@+module Main where++import Data.CommutativeSpec++import Test.Tasty+++main :: IO ()+main = defaultMain tests++tests :: TestTree+tests = testGroup "Testing..." spec
− test/Spec.hs
@@ -1,13 +0,0 @@-module Spec where--import Data.CommutativeSpec--import Test.Tasty---main :: IO ()-main = defaultMain tests--tests :: TestTree-tests = testGroup "Testing..."- [spec]