invertible 0.2.0.3 → 0.2.0.4
raw patch · 3 files changed
+10/−1 lines, 3 filesdep ~basedep ~template-haskellPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, template-haskell
API changes (from Hackage documentation)
Files
- Data/Invertible/Monoid.hs +6/−0
- Data/Invertible/TH.hs +3/−0
- invertible.cabal +1/−1
Data/Invertible/Monoid.hs view
@@ -1,5 +1,6 @@ -- | -- Bidirectional transforms for "Data.Monoid".+{-# LANGUAGE CPP #-} {-# LANGUAGE Safe, TypeOperators, QuasiQuotes #-} module Data.Invertible.Monoid ( BiEndo(..)@@ -32,6 +33,11 @@ -- | The monoid of endomorphisms under composition. newtype BiEndo a = BiEndo { appBiEndo :: a <-> a }++#if MIN_VERSION_base(4,11,0)+instance Semigroup (BiEndo a) where+ BiEndo f <> BiEndo g = BiEndo (f C.. g)+#endif instance Monoid (BiEndo a) where mempty = BiEndo C.id
Data/Invertible/TH.hs view
@@ -51,6 +51,9 @@ patToExp (TH.VarP v) = TH.VarE v patToExp (TH.TupP l) = TH.TupE $ map patToExp l patToExp (TH.UnboxedTupP l) = TH.UnboxedTupE $ map patToExp l+#if MIN_VERSION_template_haskell(2,12,0)+patToExp (TH.UnboxedSumP p a n) = TH.UnboxedSumE (patToExp p) a n+#endif patToExp (TH.ConP c a) = foldl (\f -> TH.AppE f . patToExp) (TH.ConE c) a patToExp (TH.InfixP l o r) = TH.InfixE (Just $ patToExp l) (TH.ConE o) (Just $ patToExp r) patToExp (TH.UInfixP l o r) = TH.UInfixE (patToExp l) (TH.ConE o) (patToExp r)
invertible.cabal view
@@ -1,5 +1,5 @@ name: invertible-version: 0.2.0.3+version: 0.2.0.4 synopsis: bidirectional arrows, bijective functions, and invariant functors description: Representations and operations for bidirectional arrows (total isomorphisms: an