| Maintainer | Toshio Ito <debug.ito@gmail.com> |
|---|---|
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Greskell.Binder
Description
Types
A Monad that manages binding variables and labels to values.
>>>let binder = (,) <$> newBind (10 :: Int) <*> newBind "hoge">>>let ((var_int, var_str), binding) = runBinder binder>>>toGremlin var_int"__v0">>>toGremlin var_str"__v1">>>sortBy (comparing fst) $ HashMap.toList binding[("__v0",Number 10.0),("__v1",String "hoge")]
Actions
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 #