universe-instances-extended 1.1.3 → 1.1.4
raw patch · 3 files changed
+20/−48 lines, 3 filesdep −contravariantdep ~adjunctionsdep ~basedep ~comonadPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies removed: contravariant
Dependency ranges changed: adjunctions, base, comonad, universe-base
API changes (from Hackage documentation)
- Data.Universe.Instances.Extended: class Universe a
+ Data.Universe.Instances.Extended: class () => Universe a
Files
- changelog +4/−0
- src/Data/Universe/Instances/Extended.hs +1/−12
- universe-instances-extended.cabal +15/−36
changelog view
@@ -1,3 +1,7 @@+1.1.4++* Support GHC-9.6.5..9.10.1+ 1.1.3 * Add Solo instances
src/Data/Universe/Instances/Extended.hs view
@@ -1,19 +1,15 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UndecidableInstances #-} -- Data.Coerce is Unsafe-#if __GLASGOW_HASKELL__ >=704 && !MIN_VERSION_base(4,7,0)-{-# LANGUAGE Safe #-}-#elif __GLASGOW_HASKELL__ >=702 {-# LANGUAGE Trustworthy #-}-#endif module Data.Universe.Instances.Extended ( -- | Instances for 'Universe' and 'Finite' for function-like functors and the empty type. Universe(..), Finite(..) ) where import Control.Comonad.Trans.Traced (TracedT (..))+import Data.Coerce (coerce) import Data.Functor.Contravariant (Op (..), Predicate (..)) import Data.Functor.Rep (Representable (..), Co (..)) import Data.Map (Map)@@ -24,9 +20,6 @@ import qualified Data.Map as M import qualified Data.Set as S -#if MIN_VERSION_base(4,7,0)-import Data.Coerce (coerce)-#endif -- $setup --@@ -61,11 +54,7 @@ where universe = map tabulate universe instance (Universe a, Finite b, Ord b) => Universe (Op a b) where-#if MIN_VERSION_base(4,7,0) universe = coerce (universe :: [b -> a])-#else- universe = map Op universe-#endif instance (Finite a, Ord a) => Universe (Predicate a) where universe = map (Predicate . flip S.member) universe
universe-instances-extended.cabal view
@@ -1,5 +1,6 @@+cabal-version: 2.2 name: universe-instances-extended-version: 1.1.3+version: 1.1.4 synopsis: Universe instances for types from selected extra packages description: A class for finite and recursively enumerable types and some helper functions for enumerating them@@ -11,61 +12,39 @@ @ homepage: https://github.com/dmwit/universe-license: BSD3+license: BSD-3-Clause license-file: LICENSE author: Daniel Wagner maintainer: me@dmwit.com copyright: Daniel Wagner 2014 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.4- || ==9.0.1- || ==9.2.1+ || ==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- library default-language: Haskell2010 hs-source-dirs: src exposed-modules: Data.Universe.Instances.Extended build-depends:- base >=4.3 && <4.17+ adjunctions >=4.4.2 && <4.5+ , base >=4.12 && <4.21+ , comonad >=5.0.8 && <5.1 , containers- , universe-base >=1.1.3 && <1.1.4-- if impl(ghc >=7.4)- -- adjunctions-4.4 and comonad-5.0.8 have explicit annotations- build-depends:- adjunctions >=4.4 && <4.5- , comonad >=5.0.8 && <5.1-- else- build-depends:- adjunctions >=4.3 && <4.4- , comonad >=4.2 && <5.1-- if !impl(ghc >=8.6)- build-depends: contravariant >=1.5.3 && <1.6+ , universe-base >=1.1.4 && <1.1.5 if impl(ghc >=9.0) -- these flags may abort compilation with GHC-8.10