packages feed

universe-some 1.2.1 → 1.2.2

raw patch · 5 files changed

+27/−74 lines, 5 filesdep −transformers-compatdep −type-equalitydep ~basedep ~somedep ~template-haskellPVP ok

version bump matches the API change (PVP)

Dependencies removed: transformers-compat, type-equality

Dependency ranges changed: base, some, template-haskell, th-abstraction, transformers, universe-base

API changes (from Hackage documentation)

Files

changelog view
@@ -1,2 +1,5 @@+1.2.2+* Support GHC-9.6.5..9.10.1+ 1.2.1 * Explicitly mark modules as Safe or Trustworthy
src/Data/Universe/Some.hs view
@@ -1,12 +1,6 @@-{-# 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
@@ -1,14 +1,5 @@-{-# LANGUAGE CPP #-}-#if __GLASGOW_HASKELL__ >= 800-{-# LANGUAGE TemplateHaskellQuotes #-}-#else-{-# LANGUAGE TemplateHaskell #-}-#endif-#if __GLASGOW_HASKELL__ >=704 && MIN_VERSION_template_haskell(2,12,0) {-# LANGUAGE Safe #-}-#elif __GLASGOW_HASKELL__ >=702-{-# LANGUAGE Trustworthy #-}-#endif+{-# LANGUAGE TemplateHaskellQuotes #-} module Data.Universe.Some.TH (   DeriveUniverseSome (..),   universeSomeQ,@@ -24,6 +15,7 @@  -- $setup -- >>> :m + Data.Some Data.Universe.Class Data.Universe.Some+-- >>> import Language.Haskell.TH (DecsQ)  -- | Derive the @'UniverseSome' n@ instance. --@@ -48,7 +40,7 @@ -- >>> 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) |])+-- >>> data Unused; $(deriveUniverseSome ([d| instance Universe b => UniverseSome (Tag b) |] :: DecsQ)) -- ... -- >>> universe :: [Some (Tag (Maybe Bool))] -- [Some IntTag,Some (BoolTag Nothing),Some (BoolTag (Just False)),Some (BoolTag (Just True))]@@ -67,11 +59,7 @@     di <- reifyDatatype name     let DatatypeInfo { datatypeContext = ctxt                      , datatypeName    = parentName-#if MIN_VERSION_th_abstraction(0,3,0)                      , datatypeInstTypes = vars0-#else-                     , datatypeVars    = vars0-#endif                      , datatypeCons    = cons                      } = di @@ -79,20 +67,11 @@       Nothing -> fail "Datatype should have at least one type variable"       Just (vars, var) -> do         varNames <- forM vars $ \v -> case v of-#if MIN_VERSION_template_haskell(2,8,0)           SigT (VarT n) StarT -> newName "x"-#else-          SigT (VarT n) StarK -> newName "x"-#endif           _                   -> fail "Only arguments of kind Type are supported" -#if MIN_VERSION_template_haskell(2,10,0)         let constrs :: [TypeQ]             constrs = map (\n -> conT ''Universe `appT` varT n) varNames-#else-        let constrs :: [PredQ]-            constrs = map (\n -> classP ''Universe [varT n]) varNames-#endif         let typ     = foldl (\c n -> c `appT` varT n) (conT parentName) varNames          i <- instanceD (cxt constrs) (conT ''UniverseSome `appT` typ)@@ -105,13 +84,8 @@ instanceDecFor di = valD (varP 'universeSome) (normalB $ universeSomeQ' di) []  instance DeriveUniverseSome Dec where-#if MIN_VERSION_template_haskell(2,11,0)   deriveUniverseSome (InstanceD overlaps c classHead []) = do     let instanceFor = InstanceD overlaps c classHead-#else-  deriveUniverseSome (InstanceD c classHead []) = do-    let instanceFor = InstanceD c classHead-#endif     case classHead of       ConT u `AppT` t | u == ''UniverseSome -> do         name <- headOfType t@@ -142,11 +116,7 @@ universeSomeQ' di = do   let DatatypeInfo { datatypeContext = ctxt                    , datatypeName    = parentName-#if MIN_VERSION_th_abstraction(0,3,0)                    , datatypeInstTypes = vars0-#else-                   , datatypeVars    = vars0-#endif                    , datatypeCons    = cons                    } = di 
test/Test.hs view
@@ -8,6 +8,7 @@ import Data.GADT.Show import Data.Universe.Some (UniverseSome (..)) import Data.Universe.Some.TH+import Language.Haskell.TH (DecsQ)  ------------------------------------------------------------------------------- -- Name@@ -34,7 +35,7 @@ deriving instance Show b => Show (Tag2 b a) instance Show b => GShow (Tag2 b) where gshowsPrec = showsPrec -deriveUniverseSome [d| instance Universe b => UniverseSome (Tag2 b) |]+deriveUniverseSome ([d| instance Universe b => UniverseSome (Tag2 b) |] :: DecsQ)  ------------------------------------------------------------------------------- -- Manual
universe-some.cabal view
@@ -1,5 +1,6 @@+cabal-version:      2.2 name:               universe-some-version:            1.2.1+version:            1.2.2 synopsis:           Universe instances for Some from some description:   A class for finite and recursively enumerable types and some helper functions for enumerating them@@ -20,36 +21,29 @@   classes.  homepage:           https://github.com/dmwit/universe-license:            BSD3+license:            BSD-3-Clause 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-   || ==7.6.3-   || ==7.8.4-   || ==7.10.3-   || ==8.0.2-   || ==8.2.2-   || ==8.4.4-   || ==8.6.5+  GHC ==8.6.5    || ==8.8.4-   || ==8.10.3+   || ==8.10.7+   || ==9.0.2+   || ==9.2.8+   || ==9.4.8+   || ==9.6.5+   || ==9.8.2+   || ==9.10.1  source-repository head   type:     git   location: https://github.com/dmwit/universe--source-repository this-  type:     git-  location: https://github.com/dmwit/universe-  tag:      universe-1.2.1+  subdir:   universe-some  library   default-language: Haskell2010@@ -59,23 +53,14 @@     Data.Universe.Some.TH    build-depends:-      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.2    && <1.1.3--  if !impl(ghc >=7.8)-    build-depends: type-equality >=1 && <1.1--  if impl(ghc >=7.10.3)-    build-depends: transformers >=0.4.2.0--  if !impl(ghc >=7.10.3)-    build-depends: transformers-compat >=0.6.1 && <0.7+      base              >=4.12    && <4.21+    , some              >=1.0.6    && <1.1+    , template-haskell  >=2.14     && <2.23+    , th-abstraction    >=0.7.0.0  && <0.8+    , transformers      >=0.5.6.2  && <0.7+    , universe-base     >=1.1.4    && <1.1.5 -  if impl(ghc >=8.10)+  if impl(ghc >=9)     -- 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