greskell-2.0.2.0: Haskell binding for Gremlin graph query language
MaintainerToshio Ito <debug.ito@gmail.com>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Greskell.Binder

Description

 
Synopsis

Types

data Binder a Source #

A Monad that manages binding variables and labels to values.

Instances

Instances details
Applicative Binder Source # 
Instance details

Defined in Data.Greskell.Binder

Methods

pure :: a -> Binder a #

(<*>) :: Binder (a -> b) -> Binder a -> Binder b #

liftA2 :: (a -> b -> c) -> Binder a -> Binder b -> Binder c #

(*>) :: Binder a -> Binder b -> Binder b #

(<*) :: Binder a -> Binder b -> Binder a #

Functor Binder Source # 
Instance details

Defined in Data.Greskell.Binder

Methods

fmap :: (a -> b) -> Binder a -> Binder b #

(<$) :: a -> Binder b -> Binder a #

Monad Binder Source # 
Instance details

Defined in Data.Greskell.Binder

Methods

(>>=) :: Binder a -> (a -> Binder b) -> Binder b #

(>>) :: Binder a -> Binder b -> Binder b #

return :: a -> Binder a #

type Binding = Object Source #

Binding between Gremlin variable names and JSON values.

Actions

newBind Source #

Arguments

:: ToJSON v 
=> v

bound value

-> Binder (Greskell v)

variable

Create a new Gremlin variable bound to the given value.

The value v is kept in the monadic context. The returned Greskell is a Gremlin variable pointing to the v. The Gremlin variable is guaranteed to be unique in the current monadic context.

newAsLabel :: Binder (AsLabel a) Source #

Create a new AsLabel.

The returned AsLabel is guaranteed to be unique in the current monadic context.

Since: 0.2.2.0

Runners

runBinder :: Binder a -> (a, Binding) Source #

Execute the given Binder monad to obtain Binding.