di-df1 1.0.1 → 1.0.2
raw patch · 4 files changed
+72/−6 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Di.Df1: type Df1 = Di Level Path Message
+ Di.Df1.Monad: type Df1T = DiT Level Path Message
+ Di.Df1.Monad: type MonadDf1 = MonadDi Level Path Message
Files
- CHANGELOG.md +5/−0
- di-df1.cabal +1/−1
- lib/Di/Df1.hs +20/−2
- lib/Di/Df1/Monad.hs +46/−3
CHANGELOG.md view
@@ -1,3 +1,8 @@+# Version 1.0.2++* Added `Df1`, `Df1T` and `MonadDf1` type-synonyms.++ # Version 1.0.1 * Removed unnecessary `MonadIO` constraint.
di-df1.cabal view
@@ -1,5 +1,5 @@ name: di-df1-version: 1.0.1+version: 1.0.2 author: Renzo Carbonara maintainer: renλren.zone copyright: Renzo Carbonara 2018
lib/Di/Df1.hs view
@@ -15,8 +15,10 @@ -- Consider this a preview release: The API is likely to stay stable, but -- extensive testing, formalization and tooling is due. module Di.Df1- ( -- * Hierarchy- push+ ( Df1++ -- * Hierarchy+ , push -- * Metadata , attr -- * Messages@@ -53,6 +55,22 @@ import qualified Di.Core as Di (Di, Log(Log), log, log', push) import qualified Di.Handle as Di (LineRenderer(LineRendererUtf8)) import qualified Df1++--------------------------------------------------------------------------------++-- | Convenience type-synonym for a 'Di.Di' restricted to all the /df1/+-- monomorphic types.+--+-- @+-- 'Df1' == 'Di.Di' 'Df1.Level' 'Df1.Path' 'Df1.Message'+-- :: *+-- @+--+-- This type-synonym is not used within the @di-df1@ library itself because+-- all functions exposed in the library have more general types. However,+-- users are encouraged to use 'Df1' if they find it useful to reduce+-- boilerplate and improve type inferrence.+type Df1 = Di.Di Df1.Level Df1.Path Df1.Message --------------------------------------------------------------------------------
lib/Di/Df1/Monad.hs view
@@ -1,9 +1,13 @@+{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} -- | This module exports an API compatible with "Di.Monad". module Di.Df1.Monad- ( -- * Hierarchy- push+ ( Df1T+ , MonadDf1++ -- * Hierarchy+ , push -- * Metadata , attr -- * Messages@@ -20,7 +24,46 @@ import Prelude hiding (error) import qualified Df1-import qualified Di.Monad as Di (MonadDi, log, push)+import qualified Di.Monad as Di++--------------------------------------------------------------------------------++-- | Convenience type-synonym for a 'Di.DiT' restricted to all the /df1/+-- monomorphic types.+--+-- @+-- 'Df1T' == 'Di.DiT' 'Df1.Level' 'Df1.Path' 'Df1.Message'+-- :: (* -> *) -> * -> *+--+-- 'Df1T' m == 'Di.DiT' 'Df1.Level' 'Df1.Path' 'Df1.Message' m+-- :: * -> *+--+-- 'Df1T' m a == 'Di.DiT' 'Df1.Level' 'Df1.Path' 'Df1.Message' m a+-- :: *+-- @+--+-- This type-synonym is not used within the @di-df1@ library itself because+-- all functions exposed in the library have more general types. However,+-- users are encouraged to use 'MonadDf1' if they find it useful to reduce+-- boilerplate and improve type inferrence.+type Df1T = Di.DiT Df1.Level Df1.Path Df1.Message++-- | Convenience type-synonym for a 'Di.MonadDi' restricted to all the /df1/+-- monomorphic types.+--+-- @+-- 'MonadDf1' == 'Di.MonadDi' 'Df1.Level' 'Df1.Path' 'Df1.Message'+-- :: (* -> *) -> 'GHC.Exts.Constraint'+--+-- 'MonadDf1' m == 'Di.MonadDi' 'Df1.Level' 'Df1.Path' 'Df1.Message' m+-- :: 'GHC.Exts.Constraint'+-- @+--+-- This type-synonym is not used within the @di-df1@ library itself because+-- all functions exposed in the library have more general types. However,+-- users are encouraged to use 'MonadDf1' if they find it useful to reduce+-- boilerplate and improve type inferrence.+type MonadDf1 = Di.MonadDi Df1.Level Df1.Path Df1.Message --------------------------------------------------------------------------------