verbosity 0.3.0.0 → 0.4.0.0
raw patch · 7 files changed
+85/−39 lines, 7 filesdep −data-default-classdep ~dhalldep ~latticesdep ~safecopyPVP ok
version bump matches the API change (PVP)
Dependencies removed: data-default-class
Dependency ranges changed: dhall, lattices, safecopy
API changes (from Hackage documentation)
- Data.Verbosity: instance Data.Default.Class.Default Data.Verbosity.Verbosity
- Data.Verbosity: instance Dhall.Inject Data.Verbosity.Verbosity
- Data.Verbosity: instance Dhall.Interpret Data.Verbosity.Verbosity
+ Data.Verbosity: instance Dhall.FromDhall Data.Verbosity.Verbosity
+ Data.Verbosity: instance Dhall.ToDhall Data.Verbosity.Verbosity
Files
- ChangeLog.md +20/−0
- LICENSE +1/−1
- dhall/Verbosity/Type +1/−1
- dhall/Verbosity/fold +8/−8
- src/Data/Verbosity.hs +43/−13
- src/Data/Verbosity/Class.hs +2/−0
- verbosity.cabal +10/−16
ChangeLog.md view
@@ -1,6 +1,25 @@ # ChangeLog / ReleaseNotes +## Version 0.4.0.0++* Bumped lower bound of `dhall` library set to 1.23.0. Version 1.22.0+ supported Dhall Standard 7.0.0, however, it failed to deserialise new-style+ enums properly, which was fixed in version 1.23.0. (**breaking change**)++* Dhall library restructured to fit with current Dhall best practices.++* Bumped upper bound of `lattices` to support versions 2.\* (**breaking+ change**)++* Bumped upper bound of `generic-lens` to support versions 2.\* (**change**)++* Bumped upper bound of `safecopy` to support versions 0.10.\* (**change**)++* Removed `data-default` dependency and associated instance for `Default`+ type class. (**breaking change**)++ ## Version 0.3.0.0 * Optional instances for `JoinSemiLattice`, `MeetSemiLattice`,@@ -19,6 +38,7 @@ * Dropped support for GHC \< 8.2. As a consequence `Data`, `Generic`, and `Typeable` are always derived. The last one is implied by the fact that GHC now always derives it. (**breaking change**)+* Uploaded to [Hackage][]: <http://hackage.haskell.org/package/verbosity-0.3.0.0> ## Version 0.2.3.0
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2015-2019 Peter Trško+Copyright (c) 2015-2020 Peter Trško All rights reserved.
dhall/Verbosity/Type view
@@ -1,3 +1,3 @@-< Silent : {} | Normal : {} | Verbose : {} | Annoying : {} >+< Silent | Normal | Verbose | Annoying > -- vim: ft=dhall
dhall/Verbosity/fold view
@@ -7,10 +7,10 @@ -- fold -- : ∀(r : Type) -- → ∀ (handler- -- : { Silent : {} → r- -- , Normal : {} → r- -- , Verbose : {} → r- -- , Annoying : {} → r+ -- : { Silent : r+ -- , Normal : r+ -- , Verbose : r+ -- , Annoying : r -- } -- ) -- → ∀(verbosity : Verbosity)@@ -18,10 +18,10 @@ -- ``` λ(r : Type) → λ(handler- : { Silent : {} → r- , Normal : {} → r- , Verbose : {} → r- , Annoying : {} → r+ : { Silent : r+ , Normal : r+ , Verbose : r+ , Annoying : r } ) → λ(verbosity : Verbosity)
src/Data/Verbosity.hs view
@@ -23,7 +23,7 @@ -- | -- Module: $HEADER$ -- Description: Verbosity enum.--- Copyright: (c) 2015-2019 Peter Trško+-- Copyright: (c) 2015-2020 Peter Trško -- License: BSD3 -- -- Maintainer: peter.trsko@gmail.com@@ -98,17 +98,20 @@ import qualified Data.Serialize as Cereal (Serialize(..), getWord8, putWord8) #endif -#ifdef DECLARE_DEFAULT_INSTANCE-import Data.Default.Class (Default(def))-#endif- #ifdef DECLARE_NFDATA_INSTANCE import Control.DeepSeq (NFData(rnf)) #endif #ifdef DECLARE_LATTICE_INSTANCES+#if MIN_VERSION_lattices(2,0,0) import Algebra.Lattice ( BoundedJoinSemiLattice(bottom)+ , BoundedMeetSemiLattice(top)+ , Lattice((/\), (\/))+ )+#else+import Algebra.Lattice+ ( BoundedJoinSemiLattice(bottom) , BoundedLattice , BoundedMeetSemiLattice(top) , JoinSemiLattice((\/))@@ -116,10 +119,15 @@ , MeetSemiLattice((/\)) ) #endif+#endif #ifdef DECLARE_DHALL_INSTANCES+#if MIN_VERSION_dhall(1,27,0)+import Dhall (FromDhall, ToDhall)+#else import qualified Dhall (Inject, Interpret) #endif+#endif #ifdef DECLARE_SERIALISE_INSTANCE import Codec.Serialise (Serialise)@@ -149,9 +157,9 @@ | Normal -- ^ Print only important messages. (default) | Verbose- -- ^ Print anything that comes in to mind.+ -- ^ Print anything that comes to mind. | Annoying- -- ^ Print debugging/tracing information.+ -- ^ Print debugging\/tracing information. deriving stock ( Bounded , Data@@ -163,18 +171,16 @@ , Show ) #ifdef DECLARE_DHALL_INSTANCES+#if MIN_VERSION_dhall(1,27,0)+ deriving anyclass (FromDhall, ToDhall)+#else deriving anyclass (Dhall.Inject, Dhall.Interpret) #endif+#endif #ifdef DECLARE_SERIALISE_INSTANCE deriving anyclass (Serialise) #endif -#ifdef DECLARE_DEFAULT_INSTANCE--- | @'def' = 'Normal'@-instance Default Verbosity where- def = Normal-#endif- #ifdef DECLARE_BINARY_INSTANCE -- | Encoded as one byte in range @['minBound' .. 'maxBound' :: Verbosity]@. instance Binary Verbosity where@@ -199,6 +205,27 @@ #endif #ifdef DECLARE_LATTICE_INSTANCES++#if MIN_VERSION_lattices(2,0,0)+-- |+-- @+-- ('\/') = 'max'+-- ('/\') = 'min'+-- @+instance Lattice Verbosity where+ (\/) = max+ (/\) = min++-- | @'bottom' = 'Silent'@+instance BoundedJoinSemiLattice Verbosity where+ bottom = minBound++-- | @'top' = 'Annoying'@+instance BoundedMeetSemiLattice Verbosity where+ top = maxBound++#else+ -- | @('\/') = 'max'@ instance JoinSemiLattice Verbosity where (\/) = max@@ -217,6 +244,9 @@ instance Lattice Verbosity instance BoundedLattice Verbosity+#endif++-- DECLARE_LATTICE_INSTANCES #endif -- | Increment verbosity level. Return 'Nothing' if trying to icrement beyond
src/Data/Verbosity/Class.hs view
@@ -49,6 +49,8 @@ class HasVerbosity s where -- | Lens for accessing 'Verbosity' embedded in the type @s@.+ --+ -- /Default implementaton in terms of 'HasType' added in version 0.3.0.0./ verbosity :: Functor f => (Verbosity -> f Verbosity) -> s -> f s default verbosity
verbosity.cabal view
@@ -1,5 +1,5 @@ name: verbosity-version: 0.3.0.0+version: 0.4.0.0 synopsis: Simple enum that encodes application verbosity. description: Simple enum that encodes application verbosity with various useful instances.@@ -10,7 +10,7 @@ license-file: LICENSE author: Peter Trško maintainer: peter.trsko@gmail.com-copyright: (c) 2015-2019 Peter Trško+copyright: (c) 2015-2020 Peter Trško category: Data build-type: Simple cabal-version: >=1.10@@ -43,10 +43,6 @@ description: Derive instances for Binary type class. default: True -flag data-default- description: Derive instances for Default type class.- default: True- flag deepseq description: Define instance for NFData type class. default: True@@ -101,8 +97,8 @@ -- Version 4.10 of base was bundled with GHC 8.2, which is the first version -- that supports DerivingStrategies. build-depends: base >=4.10 && <5- , generic-lens >=1.0.0.2 && <2- ghc-options: -Wall+ , generic-lens >=1.0.0.2 && <3+ ghc-options: -Wall -Wcompat if flag(pedantic) ghc-options: -Wimplicit-prelude@@ -115,10 +111,6 @@ build-depends: binary >=0.5 && <0.11 cpp-options: -DDECLARE_BINARY_INSTANCE - if flag(data-default)- build-depends: data-default-class ==0.0.* || ==0.1.*- cpp-options: -DDECLARE_DEFAULT_INSTANCE- if flag(deepseq) cpp-options: -DDECLARE_NFDATA_INSTANCE build-depends: deepseq >=1.1.0.0 && <2@@ -130,7 +122,7 @@ if flag(safecopy) cpp-options: -DDECLARE_SAFECOPY_INSTANCE- build-depends: safecopy >=0.5 && <0.10+ build-depends: safecopy >=0.5 && <0.11 -- Version 0.5 introduced: -- -- deriveSafeCopy :: Version a -> Name -> Name -> Q [Dec]@@ -140,11 +132,13 @@ if flag(lattices) cpp-options: -DDECLARE_LATTICE_INSTANCES- build-depends: lattices >=1.4 && <2+ build-depends: lattices >=1.4 && <3 if flag(dhall) cpp-options: -DDECLARE_DHALL_INSTANCES- build-depends: dhall >=1.0.1 && <2+ build-depends: dhall >=1.23.0 && <2+ -- Version 1.22.0 supported Dhall Standard 7.0.0, however, it failed to+ -- deserialise new-style enums properly, which was fixed in version 1.23.0. if flag(serialise) cpp-options: -DDECLARE_SERIALISE_INSTANCE@@ -157,4 +151,4 @@ source-repository this type: git location: git://github.com/trskop/verbosity.git- tag: 0.3.0.0+ tag: 0.4.0.0