tables 0.4.1 → 0.4.1.1
raw patch · 4 files changed
+37/−14 lines, 4 filesdep ~deepseqdep ~template-haskelldep ~transformers
Dependency ranges changed: deepseq, template-haskell, transformers
Files
- .travis.yml +1/−0
- CHANGELOG.markdown +10/−0
- src/Data/Table.hs +22/−10
- tables.cabal +4/−4
.travis.yml view
@@ -3,6 +3,7 @@ env: - GHCVER=7.4.2 - GHCVER=7.6.3+ - GHCVER=7.8.2 before_install: # Grab lens 4.0
CHANGELOG.markdown view
@@ -1,3 +1,13 @@+0.4.1.1+----+* GHC 7.10 compatibility++0.4.1+----++0.4+----+ 0.3.1 ----- * Improved `Setup.lhs` to work with more versions of `cabal`.
src/Data/Table.hs view
@@ -57,7 +57,7 @@ , difference , intersection -- ** Reading and Writing- , null+ , Data.Table.null , count , With(..) , Withal(..)@@ -366,14 +366,10 @@ return [InstanceD [] (AppT (ConT ''Tabular) t) [-#if MIN_VERSION_template_haskell(2,9,0)- TySynInstD ''PKT $ TySynEqn [t] pkt-#else- TySynInstD ''PKT [t] pkt-#endif+ tySynInstD' ''PKT [t] pkt , DataInstD [] ''Key [k, t, a] (zipWith (\(kk,n) kt ->- ForallC [] [EqualP k (ConT kk), EqualP a kt]+ ForallC [] [equalP' k (ConT kk), equalP' a kt] (NormalC (uppercase n) [])) keys keyTypes) [] , DataInstD [] ''Tab [t, a] [NormalC tabName $ zipWith@@ -575,17 +571,17 @@ SupplementalHashMap idx -> traverse (\(k,vs) -> indexed f k (fromList vs)) (HM.toList idx) <&> mconcat {-# INLINE group #-} -instance (Applicative f, Gettable f) => Group f (Key Inverted t (Set a)) t a where+instance (Applicative f, Contravariant f) => Group f (Key Inverted t (Set a)) t a where group _ _ EmptyTable = pure EmptyTable group ky f (Table m) = case ixTab m ky of InvertedMap idx -> coerce $ traverse (\(k,vs) -> indexed f k (fromList vs)) $ M.toList idx -instance (Applicative f, Gettable f, a ~ Int) => Group f (Key InvertedInt t IntSet) t a where+instance (Applicative f, Contravariant f, a ~ Int) => Group f (Key InvertedInt t IntSet) t a where group _ _ EmptyTable = pure EmptyTable group ky f (Table m) = case ixTab m ky of InvertedIntMap idx -> coerce $ traverse (\(k,vs) -> indexed f k (fromList vs)) $ IM.toList idx -instance (Applicative f, Gettable f) => Group f (Key InvertedHash t (HashSet a)) t a where+instance (Applicative f, Contravariant f) => Group f (Key InvertedHash t (HashSet a)) t a where group _ _ EmptyTable = pure EmptyTable group ky f (Table m) = case ixTab m ky of InvertedHashMap idx -> coerce $ traverse (\(k,vs) -> indexed f k (fromList vs)) $ HM.toList idx@@ -1151,3 +1147,19 @@ instance (NFData t, NFData a, NFData (PKT t)) => NFData (AnIndex t InvertedHash (HashSet a)) where rnf (InvertedHashMap m) = rnf m ++-- Compatibility for equality predicates across TH versions+equalP' :: Type -> Type -> Pred+#if MIN_VERSION_template_haskell(2,10,0)+equalP' = AppT . AppT EqualityT+#else+equalP' = EqualP+#endif++-- | Compatibility shim for recent changes to template haskell's 'tySynInstD'+tySynInstD' :: Name -> [Type] -> Type -> Dec+#if MIN_VERSION_template_haskell(2,9,0)+tySynInstD' fam ts r = TySynInstD fam (TySynEqn ts r)+#else+tySynInstD' = TySynInstD+#endif
tables.cabal view
@@ -1,6 +1,6 @@ name: tables category: Data, Lenses-version: 0.4.1+version: 0.4.1.1 license: BSD3 cabal-version: >= 1.8 license-file: LICENSE@@ -51,13 +51,13 @@ cereal >= 0.3 && < 0.5, comonad >= 4 && < 5, containers >= 0.4 && < 0.6,- deepseq >= 1.3 && < 1.4,+ deepseq >= 1.3 && < 1.5, hashable >= 1.1 && < 1.3, lens >= 4 && < 5, profunctors >= 4 && < 5, safecopy >= 0.6.3 && < 0.9,- template-haskell >= 2.7 && < 2.10,- transformers >= 0.2 && < 0.4,+ template-haskell >= 2.7 && < 2.11,+ transformers >= 0.2 && < 0.5, transformers-compat >= 0.1 && < 1, unordered-containers == 0.2.*