hw-balancedparens 0.3.0.0 → 0.3.0.1
raw patch · 7 files changed
+23/−9 lines, 7 filesdep ~hw-rankselect-basePVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: hw-rankselect-base
API changes (from Hackage documentation)
+ HaskellWorks.Data.BalancedParens.Internal.RoseTree: instance GHC.Generics.Generic HaskellWorks.Data.BalancedParens.Internal.RoseTree.RoseTree
+ HaskellWorks.Data.BalancedParens.Simple: instance GHC.Generics.Generic (HaskellWorks.Data.BalancedParens.Simple.SimpleBalancedParens a)
Files
- gen/HaskellWorks/Data/BalancedParens/Gen.hs +3/−1
- hw-balancedparens.cabal +3/−3
- src/HaskellWorks/Data/BalancedParens/Internal/RoseTree.hs +5/−1
- src/HaskellWorks/Data/BalancedParens/Simple.hs +3/−1
- test/HaskellWorks/Data/BalancedParens/Internal/BroadwordSpec.hs +3/−1
- test/HaskellWorks/Data/BalancedParens/RangeMin2Spec.hs +3/−1
- test/HaskellWorks/Data/BalancedParens/RangeMinSpec.hs +3/−1
gen/HaskellWorks/Data/BalancedParens/Gen.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TupleSections #-} module HaskellWorks.Data.BalancedParens.Gen@@ -16,6 +17,7 @@ import Data.Coerce import Data.Semigroup ((<>)) import Data.Word+import GHC.Generics import HaskellWorks.Data.BalancedParens.ParensSeq (ParensSeq) import HaskellWorks.Data.Positioning import Hedgehog@@ -33,7 +35,7 @@ data LR a = L a Int | R a Int deriving (Eq, Show) -newtype BP = BP [Bool] deriving Eq+newtype BP = BP [Bool] deriving (Eq, Generic) showBps :: [Bool] -> String showBps = fmap fromBool
hw-balancedparens.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.2 name: hw-balancedparens-version: 0.3.0.0+version: 0.3.0.1 synopsis: Balanced parentheses description: Balanced parentheses. category: Data, Bit, Succinct Data Structures, Data Structures@@ -26,13 +26,13 @@ common criterion { build-depends: criterion >= 1.2 && < 1.6 } common deepseq { build-depends: deepseq >= 1.4.2.0 && < 1.5 } common hedgehog { build-depends: hedgehog >= 1.0 && < 1.1 }-common hspec { build-depends: hspec >= 2.2 && < 2.6 }+common hspec { build-depends: hspec >= 2.2 && < 3.0 } common hw-hspec-hedgehog { build-depends: hw-hspec-hedgehog >= 0.1 && < 0.2 } common hw-bits { build-depends: hw-bits >= 0.4.0.0 && < 0.8 } common hw-excess { build-depends: hw-excess >= 0.2.2.0 && < 0.3 } common hw-fingertree { build-depends: hw-fingertree >= 0.1.1.0 && < 0.2 } common hw-prim { build-depends: hw-prim >= 0.6.2.25 && < 0.7 }-common hw-rankselect-base { build-depends: hw-rankselect-base >= 0.2.0.0 && < 0.4 }+common hw-rankselect-base { build-depends: hw-rankselect-base >= 0.3.2.1 && < 0.4 } common transformers { build-depends: transformers >= 0.5.6.2 && < 0.6 } common vector { build-depends: vector >= 0.12 && < 0.13 }
src/HaskellWorks/Data/BalancedParens/Internal/RoseTree.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE DeriveGeneric #-}+ module HaskellWorks.Data.BalancedParens.Internal.RoseTree ( RoseTree(..) , toBools@@ -6,9 +8,11 @@ , depth ) where +import GHC.Generics+ newtype RoseTree = RoseTree { children :: [RoseTree]- } deriving (Eq, Show)+ } deriving (Eq, Show, Generic) toBools :: RoseTree -> [Bool] toBools rt = toBools' rt []
src/HaskellWorks/Data/BalancedParens/Simple.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} @@ -6,6 +7,7 @@ ) where import Control.Monad+import GHC.Generics import HaskellWorks.Data.BalancedParens.BalancedParens import HaskellWorks.Data.BalancedParens.CloseAt import HaskellWorks.Data.BalancedParens.Enclose@@ -22,7 +24,7 @@ import Prelude as P newtype SimpleBalancedParens a = SimpleBalancedParens a- deriving (BalancedParens, FindOpen, FindClose, Enclose, OpenAt, CloseAt, BitLength, BitShow, Eq, Rank0, Rank1, Select0, Select1, TestBit)+ deriving (BalancedParens, FindOpen, FindClose, Enclose, OpenAt, CloseAt, BitLength, BitShow, Eq, Rank0, Rank1, Select0, Select1, TestBit, Generic) instance Functor SimpleBalancedParens where fmap f (SimpleBalancedParens a) = SimpleBalancedParens (f a)
test/HaskellWorks/Data/BalancedParens/Internal/BroadwordSpec.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -5,6 +6,7 @@ module HaskellWorks.Data.BalancedParens.Internal.BroadwordSpec where import Data.Word+import GHC.Generics import HaskellWorks.Data.BalancedParens.FindClose import HaskellWorks.Data.Bits.BitShow import HaskellWorks.Data.Bits.Broadword@@ -21,7 +23,7 @@ {-# ANN module ("HLint: Ignore Redundant do" :: String) #-} {-# ANN module ("HLint: Ignore Reduce duplication" :: String) #-} -newtype ShowVector a = ShowVector a deriving (Eq, BitShow)+newtype ShowVector a = ShowVector a deriving (Eq, BitShow, Generic) instance BitShow a => Show (ShowVector a) where show = bitShow
test/HaskellWorks/Data/BalancedParens/RangeMin2Spec.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -6,6 +7,7 @@ module HaskellWorks.Data.BalancedParens.RangeMin2Spec where import Data.Word+import GHC.Generics import HaskellWorks.Data.BalancedParens import HaskellWorks.Data.BalancedParens.RangeMin import HaskellWorks.Data.Bits.BitShow@@ -17,7 +19,7 @@ {-# ANN module ("HLint: Ignore Redundant do" :: String) #-} {-# ANN module ("HLint: Ignore Reduce duplication" :: String) #-} -newtype ShowVector a = ShowVector a deriving (Eq, BitShow)+newtype ShowVector a = ShowVector a deriving (Eq, BitShow, Generic) instance BitShow a => Show (ShowVector a) where show = bitShow
test/HaskellWorks/Data/BalancedParens/RangeMinSpec.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -6,6 +7,7 @@ module HaskellWorks.Data.BalancedParens.RangeMinSpec where import Data.Word+import GHC.Generics import HaskellWorks.Data.BalancedParens import HaskellWorks.Data.BalancedParens.RangeMin import HaskellWorks.Data.Bits.BitLength@@ -23,7 +25,7 @@ {-# ANN module ("HLint: Ignore Redundant do" :: String) #-} {-# ANN module ("HLint: Ignore Reduce duplication" :: String) #-} -newtype ShowVector a = ShowVector a deriving (Eq, BitShow)+newtype ShowVector a = ShowVector a deriving (Eq, BitShow, Generic) instance BitShow a => Show (ShowVector a) where show = bitShow