records-sop 0.1.0.2 → 0.1.0.3
raw patch · 4 files changed
+15/−9 lines, 4 filesdep ~generics-sopdep ~ghc-primdep ~hspecsetup-changedPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: generics-sop, ghc-prim, hspec
API changes (from Hackage documentation)
- Generics.SOP.Record.SubTyping: instance (a1 ~ a2) => Generics.SOP.Record.SubTyping.IsElemOf' 'GHC.Types.True s a1 s a2 r
+ Generics.SOP.Record: type family Snd (p :: (a, b)) :: b
+ Generics.SOP.Record.SubTyping: instance (a1 Data.Type.Equality.~ a2) => Generics.SOP.Record.SubTyping.IsElemOf' 'GHC.Types.True s a1 s a2 r
- Generics.SOP.Record: P :: (Snd p) -> P
+ Generics.SOP.Record: P :: Snd p -> P
- Generics.SOP.Record: fromRecord :: (IsRecord a r) => RecordRep a -> a
+ Generics.SOP.Record: fromRecord :: IsRecord a r => RecordRep a -> a
- Generics.SOP.Record: toRecord :: (IsRecord a _r) => a -> RecordRep a
+ Generics.SOP.Record: toRecord :: IsRecord a _r => a -> RecordRep a
Files
- CHANGELOG.md +4/−0
- Setup.hs +0/−2
- records-sop.cabal +5/−5
- src/Generics/SOP/Record.hs +6/−2
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.1.0.3 (2019-05-09)++* Compatibility with `generics-sop-0.5`.+ # 0.1.0.2 (2018-10-20) * Relax version bound on generics-sop and add an
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
records-sop.cabal view
@@ -1,12 +1,12 @@ name: records-sop-version: 0.1.0.2+version: 0.1.0.3 author: Andres Löh <andres@well-typed.com> maintainer: andres@well-typed.com license: BSD3 license-file: LICENSE cabal-version: >= 1.10 build-type: Simple-tested-with: GHC == 8.0.2, GHC == 8.2.1, GHC == 8.4.3, GHC == 8.6.1+tested-with: GHC == 8.0.2, GHC == 8.2.1, GHC == 8.4.4, GHC == 8.6.5 category: Generics synopsis: Record subtyping and record utilities with generics-sop description:@@ -33,7 +33,7 @@ build-depends: base >= 4.9 && < 5.0, deepseq >= 1.3 && < 1.5,- generics-sop >= 0.3 && < 0.5,+ generics-sop >= 0.3 && < 0.6, ghc-prim >= 0.5 && < 0.6 default-language: Haskell2010@@ -50,8 +50,8 @@ build-depends: base >= 4.9 && < 5.0, deepseq >= 1.4 && < 1.5,- hspec >= 2.2 && < 2.6,- generics-sop >= 0.3 && < 0.5,+ hspec >= 2.2 && < 2.8,+ generics-sop >= 0.3 && < 0.6, records-sop, should-not-typecheck >= 2.1 && < 2.2 default-language:
src/Generics/SOP/Record.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}@@ -102,7 +102,11 @@ -- type family ToRecordCode_Datatype (a :: Type) (d :: DatatypeInfo) (c :: [[Type]]) :: RecordCode where+#if MIN_VERSION_generics_sop(0,5,0)+ ToRecordCode_Datatype a (ADT _ _ cis _) c = ToRecordCode_Constructor a cis c+#else ToRecordCode_Datatype a (ADT _ _ cis) c = ToRecordCode_Constructor a cis c+#endif ToRecordCode_Datatype a (Newtype _ _ ci) c = ToRecordCode_Constructor a '[ ci ] c -- | Helper for 'RecordCodeOf', handling the constructor level. Only@@ -243,7 +247,7 @@ -------------------------------------------------------------------------- -- Utilities --------------------------------------------------------------------------- + -- | Projection of the second component of a type-level pair, -- wrapped in a newtype. --