universe-some 1.2 → 1.2.1
raw patch · 4 files changed
+52/−21 lines, 4 filesdep ~basedep ~somedep ~template-haskellPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, some, template-haskell, th-abstraction, transformers, transformers-compat, universe-base
API changes (from Hackage documentation)
Files
- changelog +2/−0
- src/Data/Universe/Some.hs +7/−0
- src/Data/Universe/Some/TH.hs +17/−2
- universe-some.cabal +26/−19
+ changelog view
@@ -0,0 +1,2 @@+1.2.1+* Explicitly mark modules as Safe or Trustworthy
src/Data/Universe/Some.hs view
@@ -1,5 +1,12 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RankNTypes #-}+-- Data.Type.Equality is Trustworthy since base-4.9+#if __GLASGOW_HASKELL__ >=704 && MIN_VERSION_base(4,9,0)+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >=702+{-# LANGUAGE Trustworthy #-}+#endif module Data.Universe.Some ( UniverseSome (..), FiniteSome (..),
src/Data/Universe/Some/TH.hs view
@@ -4,6 +4,11 @@ #else {-# LANGUAGE TemplateHaskell #-} #endif+#if __GLASGOW_HASKELL__ >=704 && MIN_VERSION_template_haskell(2,12,0)+{-# LANGUAGE Safe #-}+#elif __GLASGOW_HASKELL__ >=702+{-# LANGUAGE Trustworthy #-}+#endif module Data.Universe.Some.TH ( DeriveUniverseSome (..), universeSomeQ,@@ -17,6 +22,9 @@ import Language.Haskell.TH import Language.Haskell.TH.Datatype +-- $setup+-- >>> :m + Data.Some Data.Universe.Class Data.Universe.Some+ -- | Derive the @'UniverseSome' n@ instance. -- -- >>> :set -XGADTs -XTemplateHaskell -XStandaloneDeriving@@ -27,14 +35,21 @@ -- >>> deriving instance Show b => Show (Tag b a) -- >>> instance Show b => GShow (Tag b) where gshowsPrec = showsPrec ----- >>> ; deriveUniverseSome ''Tag+-- (@data Unused@ is to workaround bug in older GHCi)+-- >>> data Unused; $(deriveUniverseSome ''Tag)+-- -- >>> universe :: [Some (Tag (Maybe Bool))] -- [Some IntTag,Some (BoolTag Nothing),Some (BoolTag (Just False)),Some (BoolTag (Just True))] -- -- 'deriveUniverseSome' variant taking a 'Name' guesses simple class constraints. -- If you need more specific, you can specify them:+-- (Note: on older GHCs this will warn, as the instance definition doesn't have all methods defined). ----- >>> ; deriveUniverseSome [d| instance Universe b => UniverseSome (Tag b) |]+-- >>> data Tag b a where IntTag :: Tag b Int; BoolTag :: b -> Tag b Bool+-- >>> deriving instance Show b => Show (Tag b a)+-- >>> instance Show b => GShow (Tag b) where gshowsPrec = showsPrec+-- >>> data Unused; $(deriveUniverseSome [d| instance Universe b => UniverseSome (Tag b) |])+-- ... -- >>> universe :: [Some (Tag (Maybe Bool))] -- [Some IntTag,Some (BoolTag Nothing),Some (BoolTag (Just False)),Some (BoolTag (Just True))] --
universe-some.cabal view
@@ -1,6 +1,6 @@-name: universe-some-version: 1.2-synopsis: Universe instances for Some from some+name: universe-some+version: 1.2.1+synopsis: Universe instances for Some from some description: A class for finite and recursively enumerable types and some helper functions for enumerating them defined in @universe-base@ package:@@ -19,15 +19,16 @@ . classes. -homepage: https://github.com/dmwit/universe-license: BSD3-license-file: LICENSE-author: Daniel Wagner, Oleg Grenrus-maintainer: me@dmwit.com-copyright: Daniel Wagner 2014, Oleg Grenrus 2019-category: Data-build-type: Simple-cabal-version: >=1.10+homepage: https://github.com/dmwit/universe+license: BSD3+license-file: LICENSE+author: Daniel Wagner, Oleg Grenrus+maintainer: me@dmwit.com+copyright: Daniel Wagner 2014, Oleg Grenrus 2019+category: Data+build-type: Simple+cabal-version: >=1.10+extra-source-files: changelog tested-with: GHC ==7.0.4 || ==7.4.2@@ -38,7 +39,8 @@ || ==8.2.2 || ==8.4.4 || ==8.6.5- || ==8.8.1+ || ==8.8.4+ || ==8.10.3 source-repository head type: git@@ -47,7 +49,7 @@ source-repository this type: git location: https://github.com/dmwit/universe- tag: instances-dependent-sum-1.1+ tag: universe-1.2.1 library default-language: Haskell2010@@ -57,12 +59,12 @@ Data.Universe.Some.TH build-depends:- base >=4.3 && <4.14- , some >=1 && <1.1- , template-haskell >=2.5 && <2.16- , th-abstraction >=0.2.11.0 && <0.4+ base >=4.3 && <4.16+ , some >=1.0.2 && <1.1+ , template-haskell >=2.5 && <2.18+ , th-abstraction >=0.4.2.0 && <0.5 , transformers >=0.3.0.0 && <0.6- , universe-base >=1.1 && <1.1.2+ , universe-base >=1.1.2 && <1.1.3 if !impl(ghc >=7.8) build-depends: type-equality >=1 && <1.1@@ -72,6 +74,11 @@ if !impl(ghc >=7.10.3) build-depends: transformers-compat >=0.6.1 && <0.7++ if impl(ghc >=8.10)+ -- these flags may abort compilation with GHC-8.10+ -- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295+ ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode test-suite th-test type: exitcode-stdio-1.0