hasbolt-extras 0.0.1.3 → 0.0.1.4
raw patch · 11 files changed
+23/−15 lines, 11 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Database.Bolt.Extras.DSL.Typed: param :: forall (field :: Symbol) (a :: k -> Type) (types :: k). SelectorLike a => HasField' types field => (SymbolS field, Text) -> a types -> a types
+ Database.Bolt.Extras.DSL.Typed: param :: forall (field :: Symbol) k (a :: k -> Type) (types :: k). SelectorLike a => HasField' types field => (SymbolS field, Text) -> a types -> a types
- Database.Bolt.Extras.DSL.Typed: prop :: forall (field :: Symbol) (a :: k -> Type) (types :: k) (typ :: Type). SelectorLike a => HasField types field typ => IsValue typ => (SymbolS field, typ) -> a types -> a types
+ Database.Bolt.Extras.DSL.Typed: prop :: forall (field :: Symbol) k (a :: k -> Type) (types :: k) (typ :: Type). SelectorLike a => HasField types field typ => IsValue typ => (SymbolS field, typ) -> a types -> a types
- Database.Bolt.Extras.DSL.Typed: propMaybe :: forall (field :: Symbol) (a :: k -> Type) (types :: k) (typ :: Type). SelectorLike a => HasField types field typ => IsValue typ => (SymbolS field, Maybe typ) -> a types -> a types
+ Database.Bolt.Extras.DSL.Typed: propMaybe :: forall (field :: Symbol) k (a :: k -> Type) (types :: k) (typ :: Type). SelectorLike a => HasField types field typ => IsValue typ => (SymbolS field, Maybe typ) -> a types -> a types
- Database.Bolt.Extras.Graph: relations :: forall n_ackW a_ackX b_ackY b_almr. Lens (Graph n_ackW a_ackX b_ackY) (Graph n_ackW a_ackX b_almr) (Map (n_ackW, n_ackW) b_ackY) (Map (n_ackW, n_ackW) b_almr)
+ Database.Bolt.Extras.Graph: relations :: forall n_ache a_achf b_achg b_aloe. Lens (Graph n_ache a_achf b_achg) (Graph n_ache a_achf b_aloe) (Map (n_ache, n_ache) b_achg) (Map (n_ache, n_ache) b_aloe)
- Database.Bolt.Extras.Graph: vertices :: forall n_ackW a_ackX b_ackY a_alms. Lens (Graph n_ackW a_ackX b_ackY) (Graph n_ackW a_alms b_ackY) (Map n_ackW a_ackX) (Map n_ackW a_alms)
+ Database.Bolt.Extras.Graph: vertices :: forall n_ache a_achf b_achg a_alof. Lens (Graph n_ache a_achf b_achg) (Graph n_ache a_alof b_achg) (Map n_ache a_achf) (Map n_ache a_alof)
Files
- CHANGELOG.md +4/−0
- hasbolt-extras.cabal +3/−3
- src/Database/Bolt/Extras/DSL/Internal/Executer.hs +0/−1
- src/Database/Bolt/Extras/DSL/Internal/Instances.hs +0/−1
- src/Database/Bolt/Extras/DSL/Typed/Types.hs +3/−3
- src/Database/Bolt/Extras/Graph/Internal/AbstractGraph.hs +0/−1
- src/Database/Bolt/Extras/Graph/Internal/Get.hs +0/−1
- src/Database/Bolt/Extras/Graph/Internal/GraphQuery.hs +0/−1
- src/Database/Bolt/Extras/Graph/Internal/Put.hs +0/−1
- src/Database/Bolt/Extras/Internal/Cypher.hs +0/−1
- src/Database/Bolt/Extras/Template/Internal/Converters.hs +13/−2
CHANGELOG.md view
@@ -6,6 +6,10 @@ ## [Unreleased] +## [0.0.1.4] - 2020-05-27+### Fixed+- Compatibility with GHC-8.10.+ ## [0.0.1.3] - 2020-03-04 ### Fixed - https://www.wrike.com/open.htm?id=472936296: fix recursion in `GetTypeFromRecord` type family.
hasbolt-extras.cabal view
@@ -1,5 +1,5 @@ name: hasbolt-extras-version: 0.0.1.3+version: 0.0.1.4 synopsis: Extras for hasbolt library description: Extras for hasbolt library homepage: https://github.com/biocad/hasbolt-extras#readme@@ -52,7 +52,7 @@ , Database.Bolt.Extras.Graph.Internal.Put , Database.Bolt.Extras.Graph.Internal.GraphQuery - build-depends: base >= 4.7 && <5+ build-depends: base >= 4.8 && <5 , aeson >= 1.2.4.0 , aeson-casing >= 0.1.0.5 , containers >= 0.5.10.2@@ -90,7 +90,7 @@ hs-source-dirs: test main-is: Doctest.hs - build-depends: base >= 4.7 && < 5 + build-depends: base >= 4.8 && < 5 , hasbolt-extras , doctest >= 0.16
src/Database/Bolt/Extras/DSL/Internal/Executer.hs view
@@ -9,7 +9,6 @@ foldFree) import Control.Monad.Writer (Writer, execWriter, tell)-import Data.Monoid ((<>)) import Data.Text as T (Text, intercalate, unwords)
src/Database/Bolt/Extras/DSL/Internal/Instances.hs view
@@ -11,7 +11,6 @@ import Control.Monad.Writer (execWriter, tell) import Data.Function ((&))-import Data.Monoid ((<>)) import Data.Proxy (Proxy (..)) import Data.Text (intercalate, pack) import Database.Bolt.Extras (ToCypher (..),
src/Database/Bolt/Extras/DSL/Typed/Types.hs view
@@ -103,7 +103,7 @@ -- >>> toCypherN $ defN .& lbl @Foo .& prop (#bar =: "hello") -- (:Foo{bar:"hello"}) prop- :: forall (field :: Symbol) (a :: k -> Type) (types :: k) (typ :: Type)+ :: forall (field :: Symbol) k (a :: k -> Type) (types :: k) (typ :: Type) . SelectorLike a => HasField types field typ => B.IsValue typ@@ -121,7 +121,7 @@ -- >>> toCypherN $ defN .& lbl @Foo .& propMaybe (#bar =: Nothing) -- (:Foo) propMaybe- :: forall (field :: Symbol) (a :: k -> Type) (types :: k) (typ :: Type)+ :: forall (field :: Symbol) k (a :: k -> Type) (types :: k) (typ :: Type) . SelectorLike a => HasField types field typ => B.IsValue typ@@ -145,7 +145,7 @@ -- -- __NOTE__: this will add @$@ symbol to parameter name automatically. param- :: forall (field :: Symbol) (a :: k -> Type) (types :: k)+ :: forall (field :: Symbol) k (a :: k -> Type) (types :: k) . SelectorLike a => HasField' types field => (SymbolS field, Text)
src/Database/Bolt/Extras/Graph/Internal/AbstractGraph.hs view
@@ -16,7 +16,6 @@ import Control.Lens (makeLenses, over) import Data.Map.Strict (Map, insert, notMember)-import Data.Monoid ((<>)) import Data.Text (Text) import GHC.Generics (Generic) import Text.Printf (printf)
src/Database/Bolt/Extras/Graph/Internal/Get.hs view
@@ -65,7 +65,6 @@ import Data.Maybe (catMaybes, fromJust, isJust)-import Data.Monoid ((<>)) import Data.Text (Text, cons, intercalate, pack,
src/Database/Bolt/Extras/Graph/Internal/GraphQuery.hs view
@@ -24,7 +24,6 @@ mapWithKey, toList, union, (!))-import Data.Monoid ((<>)) import Data.Text as T (Text, intercalate, null, pack)
src/Database/Bolt/Extras/Graph/Internal/Put.hs view
@@ -15,7 +15,6 @@ import Data.List (foldl') import Data.Map.Strict (toList, (!))-import Data.Monoid ((<>)) import Data.Text (Text, intercalate, pack)
src/Database/Bolt/Extras/Internal/Cypher.hs view
@@ -15,7 +15,6 @@ -- This file contains some converation rules from 'Database.Bolt' types to `Cypher`. ------------------------------------------------------------------------------------------------- -import Data.Monoid ((<>)) import Data.Text as T (Text, concat, cons, intercalate, pack, replace, toUpper)
src/Database/Bolt/Extras/Template/Internal/Converters.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} module Database.Bolt.Extras.Template.Internal.Converters@@ -23,6 +24,16 @@ import Language.Haskell.TH import Language.Haskell.TH.Syntax +-- Starting with template-haskell-2.16.0.0, 'TupE' constructor accepts @Maybe Exp@, to support+-- TupleSections. We use this alias for compatibility with both old and new versions.+tupE' :: [Exp] -> Exp+#if MIN_VERSION_template_haskell(2, 16, 0)+tupE' = TupE . map Just+#else+tupE' = TupE+#endif++ -- | Describes a @bijective@ class, i.e. class that has two functions: @phi :: a -> SomeType@ and @phiInv :: SomeType -> a@. -- Requires class name, @SomeType@ name and names of the class functions (@phi@ and @phiInv@). --@@ -204,7 +215,7 @@ -- `key` is field record name. -- `value` is the data that corresponding field holds. pairs :: [Exp]- pairs = zipWith (\fld val -> TupE [strToTextE $ fieldLabelModifier fld, val]) fieldNames valuesExp+ pairs = zipWith (\fld val -> tupE' [strToTextE $ fieldLabelModifier fld, val]) fieldNames valuesExp -- Map representation: -- mapE = fromList pairs@@ -260,7 +271,7 @@ -- maybeNamesE :: [Exp] -- Contains Exp representation of (Text, Bool) – field name and isMaybe check result on it.- let maybeNamesE = zipWith (\n m -> TupE [n, ConE $ if m then trueName else falseName]) fieldNamesE maybeFields+ let maybeNamesE = zipWith (\n m -> tupE' [n, ConE $ if m then trueName else falseName]) fieldNamesE maybeFields -- varExp :: Q Exp -- Pattern match variable packed in Exp. It will be used in QuasiQuotation below.