hasbolt-extras 0.0.3.0 → 0.0.3.1
raw patch · 4 files changed
+13/−3 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Database.Bolt.Extras.Graph: relations :: forall n_agbw a_agbx b_agby b_agEq. Lens (Graph n_agbw a_agbx b_agby) (Graph n_agbw a_agbx b_agEq) (Map (n_agbw, n_agbw) b_agby) (Map (n_agbw, n_agbw) b_agEq)
+ Database.Bolt.Extras.Graph: relations :: forall n_agbI a_agbJ b_agbK b_agEC. Lens (Graph n_agbI a_agbJ b_agbK) (Graph n_agbI a_agbJ b_agEC) (Map (n_agbI, n_agbI) b_agbK) (Map (n_agbI, n_agbI) b_agEC)
- Database.Bolt.Extras.Graph: vertices :: forall n_agbw a_agbx b_agby a_agEr. Lens (Graph n_agbw a_agbx b_agby) (Graph n_agbw a_agEr b_agby) (Map n_agbw a_agbx) (Map n_agbw a_agEr)
+ Database.Bolt.Extras.Graph: vertices :: forall n_agbI a_agbJ b_agbK a_agED. Lens (Graph n_agbI a_agbJ b_agbK) (Graph n_agbI a_agED b_agbK) (Map n_agbI a_agbJ) (Map n_agbI a_agED)
Files
- CHANGELOG.md +6/−0
- hasbolt-extras.cabal +1/−1
- src/Database/Bolt/Extras/Internal/Instances.hs +2/−1
- src/Database/Bolt/Extras/Template/Internal/Converters.hs +4/−1
CHANGELOG.md view
@@ -6,6 +6,12 @@ ## [Unreleased] +## [0.0.3.1] - 2023-09-28+### Changed+- `FromValue` now can unpack DB `Int` as Haskell `Double`.+- Verbose error in TemplateHaskell converter when property of a node or a relationship can't be+ unpacked.+ ## [0.0.3.0] - 2023-08-17 ### Added - `IsString` instance for `Cond` and `Conds`.
hasbolt-extras.cabal view
@@ -1,5 +1,5 @@ name: hasbolt-extras-version: 0.0.3.0+version: 0.0.3.1 synopsis: Extras for hasbolt library description: Extras for hasbolt library homepage: https://github.com/biocad/hasbolt-extras#readme
src/Database/Bolt/Extras/Internal/Instances.hs view
@@ -19,7 +19,7 @@ NodeLikeProps (..), ToIsValue (..), ToValue (..)) import Database.Bolt.Extras.Utils (currentLoc)-import GHC.Float (double2Float, float2Double)+import GHC.Float (double2Float, float2Double, int2Double) import GHC.Stack (HasCallStack) @@ -80,6 +80,7 @@ instance FromValue Double where fromValue (F doubleV) = doubleV+ fromValue (I intV) = int2Double intV fromValue v = error $ $currentLoc ++ "could not unpack " ++ show v ++ " into Double" instance FromValue Float where
src/Database/Bolt/Extras/Template/Internal/Converters.hs view
@@ -323,7 +323,10 @@ where exactE v = case exactEither v of Right res -> res- Left err -> error $ show err+ Left err -> error+ $ "Could not unpack "+ <> unpack fieldName <> ": " <> show err+ <> ", value: " <> show v unpackError :: HasCallStack => Show c => c -> String -> a unpackError container label = error $ $currentLoc ++ " could not unpack " ++ label ++ " from " ++ show container