Skip to content

Problem with official example #33

Description

@danascaza

Hi! I want to use Hasbolt, and I'm trying to run the simple example shown on the post in the Neo4J blog.

main :: IO ()
main = do pipe <- connect myConfiguration
          records <- run pipe $ query "MATCH (n:Person) WHERE n.name CONTAINS \"Tom\" RETURN n"
          let first = head records
          cruise <- first `at` "n" >>= exact :: IO Node
          print cruise
          close pipe

Everything works fine, and I do get the results, but I get an error when I try to use exact that I can't even begin to understand...

Couldn't match type ‘BoltError’ with ‘UnpackError’ arising from a functional dependency between:
          constraint ‘MonadError UnpackError (BoltActionT m0)’
            arising from a use of ‘exact’
          instance ‘MonadError BoltError (BoltActionT m)’
            at <no location info>
In the second argument of ‘(>>=)’, namely ‘exact’
      In a stmt of a 'do' block:
        cruise <- first `at` "n" >>= exact :: IO Node
      In the expression:
        do pipe <- connect myConfiguration
           records <- run pipe
                        $ query "MATCH (n:Person) WHERE n.root CONTAINS \"Tom\" RETURN n"
           let first = head records
           cruise <- first `at` "n" >>= exact :: IO Node

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions