packages feed

fclabels 2.0.4 → 2.0.5

raw patch · 3 files changed

+19/−12 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

CHANGELOG view
@@ -1,5 +1,8 @@ CHANGELOG +2.0.5+  - Support for GHC 8.10. Thanks to Potato Hatsue.+ 2.0.4   - Import Functor, Applicative, and Monad instances for Kleisli from the     base-orphans package for future GHC 8.10 support.
fclabels.cabal view
@@ -1,5 +1,5 @@ Name:          fclabels-Version:       2.0.4+Version:       2.0.5 Author:        Sebastiaan Visser, Erik Hesselink, Chris Eidhof, Sjoerd Visscher                with lots of help and feedback from others. Synopsis:      First class accessor labels implemented as lenses.@@ -47,11 +47,9 @@                See "Data.Label.Base" and "Data.Label.Monadic" for more                information.                .-               * /Changelog from 2.0.3.2 to 2.0.4/+               * /Changelog from 2.0.4 to 2.0.5/                .-               >   - Import Functor, Applicative, and Monad instances for-               >     Kleisli from the base-orphans package for future GHC 8.10-               >     support.+               >   - Support for GHC 8.10. Thanks to Potato Hatsue.  Maintainer:         Sebastiaan Visser <code@fvisser.nl> Homepage:           https://github.com/sebastiaanvisser/fclabels@@ -59,7 +57,7 @@ License:            BSD3 License-File:       LICENSE Category:           Data, Lenses-Cabal-Version:      >= 1.8+Cabal-Version:      >= 1.10 Build-Type:         Simple Tested-With:   GHC==7.4.2,@@ -88,12 +86,14 @@    GHC-Options: -Wall   Build-Depends:-      base             >= 4.5   && < 4.14+      base             >= 4.5   && < 4.15     , base-orphans     >= 0.8.2 && < 0.9-    , template-haskell >= 2.2   && < 2.16+    , template-haskell >= 2.2   && < 2.17     , mtl              >= 1.0   && < 2.3     , transformers     >= 0.2   && < 0.6 +  Default-Language: Haskell2010+ Source-Repository head   Type:     git   Location: git://github.com/sebastiaanvisser/fclabels.git@@ -110,6 +110,7 @@     , mtl     , transformers     , HUnit            >= 1.2 && < 1.7+  Default-Language: Haskell2010  Benchmark benchmark   Type:            exitcode-stdio-1.0@@ -120,3 +121,4 @@       base      < 5     , fclabels     , criterion < 1.6+  Default-Language: Haskell2010
src/Data/Label/Derive.hs view
@@ -128,10 +128,12 @@          types   =        map (\(LabelExpr _ _ t _) -> t) labels          context = head $ map (\(LabelExpr _ c _ _) -> c) labels          vars    = head $ map (\(LabelExpr v _ _ _) -> v) labels-     if sigs-       then tupE bodies `sigE`-              forallT vars context (foldl appT (tupleT (length bodies)) types)-       else tupE bodies+     case bodies of+       [b] -> if sigs then b `sigE` forallT vars context (head types) else b+       _   -> if sigs+          then tupE bodies `sigE`+               forallT vars context (foldl appT (tupleT (length bodies)) types)+          else tupE bodies  -- | Low level standalone label derivation function.