relational-query 0.10.1.0 → 0.10.1.1
raw patch · 3 files changed
+19/−4 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Database.Relational.OverloadedProjection: instance (Database.Record.Persistable.PersistableWidth a, GHC.OverloadedLabels.IsLabel l (Database.Relational.Pi.Unsafe.Pi a b)) => GHC.OverloadedLabels.IsLabel l (Database.Relational.SqlSyntax.Types.PI c a b)
+ Database.Relational.OverloadedProjection: instance (Database.Record.Persistable.PersistableWidth a, Database.Relational.OverloadedProjection.HasProjection l a b) => GHC.OverloadedLabels.IsLabel l (Database.Relational.SqlSyntax.Types.PI c a b)
Files
- ChangeLog.md +5/−1
- relational-query.cabal +1/−1
- src/Database/Relational/OverloadedProjection.hs +13/−2
ChangeLog.md view
@@ -1,8 +1,12 @@ <!-- -*- Markdown -*- --> +## 0.10.1.1++- fix overloaded-labels instances for GHC 8.2.+ ## 0.10.1.0 -- add overloaded projections.+- define projections with overloaded-labels. - add a portable sequence number operation. ## 0.10.0.0
relational-query.cabal view
@@ -1,5 +1,5 @@ name: relational-query-version: 0.10.1.0+version: 0.10.1.1 synopsis: Typeful, Modular, Relational, algebraic query engine description: This package contiains typeful relation structure and relational-algebraic query building DSL which can
src/Database/Relational/OverloadedProjection.hs view
@@ -38,14 +38,25 @@ class HasProjection l a b | l a -> b where projection :: PiLabel l -> Pi a b +#if __GLASGOW_HASKELL__ >= 802 -- | Derive 'IsLabel' instance from 'HasProjection'. instance HasProjection l a b => IsLabel l (Pi a b) where+ fromLabel = projection (GetPi :: PiLabel l)++-- | Derive 'PI' label.+instance (PersistableWidth a, HasProjection l a b)+ => IsLabel l (PI c a b) where+ fromLabel = (! projection (GetPi :: PiLabel l))+#else+-- | Derive 'IsLabel' instance from 'HasProjection'.+instance HasProjection l a b => IsLabel l (Pi a b) where fromLabel _ = projection (GetPi :: PiLabel l) -- | Derive 'PI' label.-instance (PersistableWidth a, IsLabel l (Pi a b))+instance (PersistableWidth a, HasProjection l a b) => IsLabel l (PI c a b) where- fromLabel s = (! fromLabel s)+ fromLabel _ = (! projection (GetPi :: PiLabel l))+#endif #else module Database.Relational.OverloadedProjection () where #endif