on master help sign in
`types` now supports Text by default
commitda921ac463645109a807151b39aa151c5a80d118 authorCsongor Kiss <kiss.csongor.kiss@gmail.com> dateMon 8 Jul 2019, 14:44 (7 years ago) parent631ba53
3 files changed+7−3
ChangeLog.md+1 generic-lens.cabal+4−3 src/Data/Generics/Product/Types.hs+2
ChangeLog.md+1
@@ -1,6 +1,7 @@
11## 1.2.0.0
22- Add `HasTypesUsing` and `HasTypesCustom` for custom traversals (Lysxia)
33- Improve type errors when no Generic instance is defined
4+- `types` now supports Text by default
45
56### Breaking API changes
67- `HasType` now includes a reflexive case so that every type 'contains' itself (Matt Parsons)
generic-lens.cabal+4−3
@@ -70,9 +70,10 @@ library
7070 , Data.Generics.Product.Internal.Constraints
7171 , Data.Generics.Product.Internal.HList
7272
73− build-depends: base >= 4.9 && <= 5.0
74− , profunctors >= 5.0 && <= 6.0
75− , tagged >= 0.8 && <= 0.9
73+ build-depends: base >= 4.9 && < 5.0
74+ , profunctors >= 5.0 && < 6.0
75+ , tagged >= 0.8 && < 1
76+ , text >= 1.2 && < 1.3
7677
7778 hs-source-dirs: src
7879 default-language: Haskell2010
src/Data/Generics/Product/Types.hs+2
@@ -48,6 +48,7 @@ module Data.Generics.Product.Types
4848import Data.Kind
4949import Data.Int (Int8, Int16, Int32, Int64)
5050import Data.Word (Word, Word8, Word16, Word32, Word64)
51+import qualified Data.Text as T
5152
5253import GHC.Generics
5354import GHC.TypeLits
@@ -241,6 +242,7 @@ type family ChildrenDefault (a :: Type) :: [Type] where
241242 ChildrenDefault Word16 = '[]
242243 ChildrenDefault Word32 = '[]
243244 ChildrenDefault Word64 = '[]
245+ ChildrenDefault T.Text = '[]
244246 ChildrenDefault a
245247 = Defined (Rep a)
246248 (NoGeneric a