Skip to content

Commit bc5988a

Browse files
authored
version 0.0.1.7: add more HasCallStack (#44)
1 parent 279193e commit bc5988a

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
## [0.0.1.7] - 2021-04-28
10+
### Changed
11+
- Add more `HasCallStack`.
12+
913
## [0.0.1.6] - 2020-12-26
1014
### Fixed
1115
- Fix `makeNodeLike` for `Maybe` fields, bug introduced in previous version.

hasbolt-extras.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: hasbolt-extras
2-
version: 0.0.1.6
2+
version: 0.0.1.7
33
synopsis: Extras for hasbolt library
44
description: Extras for hasbolt library
55
homepage: https://github.com/biocad/hasbolt-extras#readme

src/Database/Bolt/Extras/DSL/Typed/Parameters.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ import Control.Monad.IO.Class (MonadIO)
1515
import Data.Kind (Type)
1616
import qualified Data.Map.Strict as Map
1717
import Data.Text (Text, pack)
18-
import Database.Bolt (BoltActionT,
19-
IsValue (..),
20-
Record, Value,
21-
queryP)
18+
import Database.Bolt (BoltActionT, IsValue (..), Record,
19+
Value, queryP)
20+
import GHC.Stack (HasCallStack, withFrozenCallStack)
2221
import GHC.TypeLits (Symbol)
2322

2423
import Database.Bolt.Extras.DSL.Internal.Executer (formQuery)
@@ -53,7 +52,7 @@ newtype CypherDSLParams (params :: [(Symbol, Type)]) (a :: Type)
5352
-- This should be considered an implementation detail.
5453
class QueryWithParams (params :: [(Symbol, Type)]) (m :: Type -> Type) fun | params m -> fun where
5554
-- | Internal function that accumulates parameters from type-level list.
56-
collectParams :: CypherDSL () -> [(Text, Value)] -> fun
55+
collectParams :: HasCallStack => CypherDSL () -> [(Text, Value)] -> fun
5756

5857
-- | Base case: if there are no parameters, perform query with 'queryP'.
5958
instance MonadIO m => QueryWithParams '[] m (BoltActionT m [Record]) where
@@ -95,6 +94,7 @@ queryWithParams
9594
:: forall params m fun
9695
. MonadIO m
9796
=> QueryWithParams params m fun
97+
=> HasCallStack
9898
=> CypherDSLParams params ()
9999
-> fun
100100
queryWithParams (CypherDSLParams dsl) = collectParams @params @m dsl []

0 commit comments

Comments
 (0)