!       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     %Gremlin (Groovy/Java) utility classes Toshio Ito <debug.ito@gmail.com>NoneHV/greskell4org.apache.tinkerpop.gremlin.process.traversal.Order enum.greskellType for anonymous class of  Comparator interface.greskelljava.util.Comparator interface. compares two data of type  c.greskell.compare method.greskell.reverse method.greskell.thenComparing method. greskell0org.apache.tinkerpop.gremlin.process.traversal.P class.P a keeps data of type a# and compares it with data of type a" given as the Predicate argument. greskellType for anonymous class of  Predicate interface. greskelljava.util.function.Predicate interface.A   p is a function that takes  p and returns .greskell.and method.greskell.or method.greskell.test method.greskell.nagate method.greskellP.not static method."toGremlin $ pNot $ pEq $ number 10"P.not(P.eq(10.0))"greskellP.eq static method.toGremlin $ pEq $ string "hoge""P.eq(\"hoge\")"greskellP.neq static method.greskellP.lt static method.greskellP.lte static method.greskellP.gt static method.greskellP.gte static method.greskellP.inside static method.+toGremlin $ pInside (number 10) (number 20)"P.inside(10.0,20.0)"greskell P.outside static method.greskell P.between static method.greskellP.within static method.AtoGremlin $ pWithin (["foo", "bar", "hoge"] :: [Greskell String])$"P.within(\"foo\",\"bar\",\"hoge\")"greskell P.without static method.greskelldecr order.toGremlin oDecr "Order.decr" greskellincr order.!greskellshuffle order.'greskellOrder a compares the type a."  !"   !Class of non-empty containers Toshio Ito <debug.ito@gmail.com>Safe6+(greskell5Non-empty containers. Its cardinality is one or more.)greskell%Make a container with a single value.*greskellAppend two containers.+greskellConvert the container to  list.,greskell* is  from .-greskell* is  from ..greskell* is  from .()*+()*+:Property map, a map with Text keys and cardinality options Toshio Ito <debug.ito@gmail.com>None 456HMV_/greskellAn $ raised when looking up values from 7.0greskellThe 7 doesn't have the given key.1greskell1Failed to parse the value into the type that the 2 indicates. The  is the key, and the  is the error message.2greskellA typed key for 7.3greskell*Type of the value associated with the key.4greskell representation of the key.5greskell"The "one or more" cardinality for 7. 8- method prepends the new value at the head.  on 79 appends the right items to the tail of the left items. <0 preserves the order of the items for each key.6greskellThe single cardinality for 7. 8! method replaces the old value.  on 7" prefers the items from the left 7. <% prefers the first item for each key.7greskell(A property map, which has text keys and v values. cH specifies the cardinality of each item, and should be an instance of (.You can look up values from 7 using key types of 2 class.8greskellInsert a key-value pair to 7.. If it already has some items for that key, * method of the ( type c determines its behavior.9greskell/Delete a key and all values associated with it.:greskellnLookup all items for the key (low-level function). If there is no item for the key, it returns an empty list.;greskellList up all entries.<greskellMake a 7 from list of entries.=greskell(Lookup the first value for the key from 7.>greskell version of =/. If there is no value for the key, it throws 0.?greskell#Lookup the value and parse it into a.@greskell Similar to ?, but this function converts a null result into .A null result is either (1) the key kE is not found in the map, or (2) the key is found, but the value is null.Agreskell version of ?.BgreskellYLookup all items for the key. If there is no item for the key, it returns an empty list.Cgreskell'Look up the values and parse them into a.Dgreskell Similar to C, but this function accepts null results. If the key k@ is not found in the map, it returns an empty list. If the key k is found and null4s are included in the values, they are obtained as .Egreskell%Make a human-readable description on /.Fgreskell!Convert the lookup result into a  . It throws /.Ggreskell!Convert the lookup result into a -. It fails with the description returned by E.JgreskellMake a union of the two 7s. If the two 7/s share some keys, those values are merged by * method from (.Mgreskell For simple , the " is returned without being parsed./0123456789:;<=>?@ABCDEFG7=>?@ABCD89:;<65234/01EFG9Haskell counterpart of Gremlin graph structure data types Toshio Ito <debug.ito@gmail.com>None&'4567=?HMVD:`greskell<General vertex property type you can use for VertexProperty.#If you are not sure about the type v , just use .bgreskellID of this vertex property.cgreskell&Label and key of this vertex property.dgreskellValue of this vertex property.egreskell-General simple property type you can use for | class.#If you are not sure about the type v , just use .igreskell"General edge type you can use for  class.kgreskellID of this edge.lgreskellLabel of this edge.mgreskell$General vertex type you can use for  class.ogreskellID of this vertexpgreskellLabel of this vertexqgreskellHeterogeneous list of ws. It keeps the parent type a, but discards the value type b.rgreskellEmpty q.sgreskellAdd a w to q.tgreskellPair of wF and its value. Mainly used for writing properties into the database.Type a is the type of  that keeps the tw pair. It drops the type of the value, so that you can construct a heterogeneous list of key-value pairs for a given .ugreskell Key and valuevgreskellKey without valuewgreskellA property key accessing value b in an Element a'. In Gremlin, it's just a String type.$toGremlin ("age" :: Key AVertex Int) "\"age\"".toGremlin (key "created_at" :: Key AEdge Text)"\"created_at\""$keyText ("name" :: Key AVertex Text)"name"Since greskell-1.0.0.0, w is newtype of ". Before that, it was newtype of  .zgreskellAorg.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality enum.{greskell(org.apache.tinkerpop.gremlin.structure.T enum.{ is a token to get data b from an Element a.|greskell/org.apache.tinkerpop.gremlin.structure.Property! interface in a TinkerPop graph.}greskellGet key of this property.~greskellGet value of this property.greskell+org.apache.tinkerpop.gremlin.structure.Edge! interface in a TinkerPop graph.greskell-org.apache.tinkerpop.gremlin.structure.Vertex! interface in a TinkerPop graph.greskell.org.apache.tinkerpop.gremlin.structure.Element! interface in a TinkerPop graph.Since greskell-1.0.0.0,  is a super-class of .greskellProperty type of the . It should be of | class.greskell(Container type of the properties of the . It should be of ( class.greskell6Types that keep reference to TinkerPop graph Elements.greskellID of this Element.greskellLabel of this Element.greskellID of a graph element e$ (vertex, edge and vertex property).greskellIAlthough it's exposed, it is recommended NOT to rely on the internal of 5. That's because it depends on graph implementation.greskell"Unsafely cast the phantom type of .greskellT.id token.greskellT.key token.greskellT.label token.greskellT.value token.greskelllist Cardinality.toGremlin cList"list"greskellset Cardinality.greskellsingle Cardinality.greskell Create a w a text.greskell(Unsafely cast the type signature of the w.greskellConstructor operator of t.greskellq with a single w.greskell Prepend a w to q.greskell"Unsafely convert the element type.greskellgreskellReturn Gremlin String literal.greskell Unsafely convert the value type b.greskellgreskellgreskellParse Property of GraphSON 1.0.greskellParse Property of GraphSON 1.0.2In version 0.1.1.0 and before, the constraint was  FromJSON v. This has changed.greskellTraverse the property value.greskellMap the property value.greskellgreskell2In version 0.1.1.0 and before, the constraint was  FromJSON v. This has changed.7`abcdefghijklmnopqrstuvwxyz{|}~7|}~{zwxytuvqrsmnopijkl`abcdefgh5([Deprecated] PropertyMap class and types Toshio Ito <debug.ito@gmail.com>None456Mgreskell#This typeclass is for internal use.7GraphSON parser with a property key given from outside.greskellA , that can keep more than one values per key.; returns the first property associated with the given key.2 prepends the given property to the property list. returns the union of the two given property maps. If the two property maps share some same keys, those property lists are concatenated.greskellA ! that has a single value per key.1 replaces the old property by the given property. returns the union of the two given property maps. If the two property maps share some same keys, the value from the left map wins.greskellGeneric implementation of . t is the type of cardinality, p is the type of | class and v$ is the type of the property value.greskell8Common basic operations supported by maps of properties.greskell1Look up a property associated with the given key.greskell5Look up all properties associated with the given key.greskellPut a property into the map.greskell4Remove all properties associated with the given key.greskell!Return all properties in the map.greskellLookup a property value from a  by key.greskell(Lookup a list of property values from a  by key.greskellLookup a property  by the given key, and parse it.>In version 0.1.1.0 and before, this function took an argument m p (GraphSON Value)0. This has changed, because property types for AVertex etc have changed.greskell(Lookup a list of property values from a # by the given key, and parse them.>In version 0.1.1.0 and before, this function took an argument m p (GraphSON Value)0. This has changed, because property types for AVertex etc have changed.greskellLike , but this function 0s when there is no property with the given key.>In version 0.1.1.0 and before, this function took an argument m p (GraphSON Value)0. This has changed, because property types for AVertex etc have changed.greskell Create a  from list of |s.greskell2In version 0.1.1.0 and before, the constraint was  FromJSON v. This has changed.greskell2In version 0.1.1.0 and before, the constraint was  FromJSON v. This has changed.`abcdefghefgh`abcdLabel string used in .as step Toshio Ito <debug.ito@gmail.com>NoneHVxgreskellA map keyed with . Obtained from .select step, for example.greskell a# represents a label string used in .as$ step pointing to the data of type a.greskellgreskell"Unsafely convert the phantom type.greskell Returns the  as a Gremlin string.greskell /01=>?A =>?A/01Gremlin traversal/step types. Toshio Ito <debug.ito@gmail.com>None &'=>?@AHVgreskellVertex anchor for z. It corresponds to .from or .to step following an .addE step.Type s is the input Vertex for the .addE step. Type e, is the type of the anchor Vertex that the  yields. So, .addE step creates an edge between s and e.greskellA   associated with an . You can construct it by S.greskellComparison of type s used in .by step. You can also use P and Q to construct .greskellType s is projected to type e2, and compared by the natural comparator of type e. greskellType s is compared by the  comp. greskellType s is projected to type CompareArg comp, and compared by the  comp. greskellProjection from type s to type e used in .by step. You can also use O to construct  . greskell;Data types that mean a projection from one type to another.greskell!The start type of the projection.greskellThe end type of the projection.greskellGraphTraversalSource7 class object of TinkerPop. It is a factory object of s.greskell Relation of s where the child walk c is split from the parent walk p.kWhen splitting, transformation effect done in the child walk is rolled back (canceled) in the parent walk.greskell Relation of  s where one includes the other. from can be lifted to to , because to is more powerful than from.greskell.WalkType for steps that may have side-effects.A side-effect here means manipulation of the "sideEffect" in Gremlin context (i.e. the stash of data kept in a Traversal object), as well as interaction with the world outside the Traversal object.EFor example, the following steps (in Gremlin) all have side-effects. [.addE('label') .aggregate('x') .sideEffect(System.out.&println) .map { some_variable += 1 }greskellWalkType for steps without any side-effects. This includes transformations, reordring, injections and graph traversal actions.A  w is  type iff: gSideEffect w == gIdentityObviously, every  type  s are also  type.greskellWalkType for filtering steps.A filtering step is a step that does filtering only. It takes input and emits some of them without any modification, reordering, traversal actions, or side-effects. Filtering decision must be solely based on each element.A  w is  type iff: 1(gSideEffect w == gIdentity) AND (gFilter w == w)If s w1 and w2 are  type, then 'gAnd [w1, w2] == w1 >>> w2 == w2 >>> w1greskellMClass of phantom type markers to describe the effect of the walk/traversals.greskell+A chain of one or more Gremlin steps. Like , type s is the input, type e is the output, and type c# is a marker to describe the step.- represents a chain of method calls such as .has(x).outE()B. Because this is not a Gremlin (Groovy) expression, we use bare , not  . is a . You can use functions from Control.Category to compose Ds. This is equivalent to making a chain of method calls in Gremlin. is not an , because it's difficult to define true equality between Gremlin method calls. If we define it naively, it might have conflict with  law.greskellTypes that can convert to .greskellLift  from to to. Use this for type matching.greskellUnsafely cast the start type s1 into s2.It is recommended that s2 is coercible to s1 in terms of . That is, if s2 can parse a , s1$ should also be able to parse that .greskellUnsafely cast the end type e1 into e2. See .greskellPhantom type for GraphTraversal% class. In greskell, we usually use  instead of  .greskellGraphTraversal* class object of TinkerPop. It takes data s from upstream and emits data e to downstream. Type cJ is called "walk type", a marker to describe the effect of the traversal. is NOT a  . Because a GraphTraversal; object keeps some context data, the starting (left-most) GraphTraversale object controls most of the behavior of entire composition of traversals and steps. This violates  law.!greskellCreate  from a varible name in GremlintoGremlin $ source "g""g""greskell.V() method on .#greskellMonomorphic version of ".RtoGremlin (source "g" & sV' (map (fmap ElementID . gvalueInt) ([1,2,3] :: [Int]))) "g.V(1,2,3)"$greskell.E() method on .%greskellMonomorphic version of $.NtoGremlin (source "g" & sE' (map (fmap ElementID . gvalueInt) ([1] :: [Int])))"g.E(1)"&greskell.addV() method on .'greskellMonomorphic version of &.(toGremlin (source "g" & sAddV' "person")"g.addV(\"person\")"(greskellUnsafely create # from the given raw Gremlin script.,toGremlin $ unsafeGTraversal "g.V().count()""g.V().count()")greskell Apply the  to the M. In Gremlin, this means calling a chain of methods on the Traversal object.2toGremlin (source "g" & sV' [] &. gValues ["age"])"g.V().values(\"age\")"*greskellSame as ) with arguments flipped.2toGremlin (gValues ["age"] $. sV' [] $ source "g")"g.V().values(\"age\")"+greskell Similar to  , but for *.,greskell Similar to  , but for *.-greskellUnsafely create a , that represents a single method call on a GraphTraversal.KtoGremlin (source "g" & sV' [] &. unsafeWalk "valueMap" ["'foo'", "'bar'"])"g.V().valueMap('foo','bar')".greskellOptionally modulate the main  with some modulating s.~toGremlin (source "g" & sV' [] &. modulateWith (unsafeWalk "path" []) [unsafeWalk "by" ["'name'"], unsafeWalk "by" ["'age'"]])#"g.V().path().by('name').by('age')"/greskell .identity step.0greskellMonomorphic version of /.1greskell.filter step that takes a traversal.<toGremlin (source "g" & sV' [] &. gFilter (gOut' ["knows"]))!"g.V().filter(__.out(\"knows\"))"2greskell.has step with one argument..toGremlin (source "g" & sV' [] &. gHas1 "age")"g.V().has(\"age\")"3greskellMonomorphic version of 2.4greskell.has step with two arguments.CtoGremlin (source "g" & sV' [] &. gHas2 "age" (31 :: Greskell Int))"g.V().has(\"age\",31)"5greskellMonomorphic verson of 4.6greskell.has step with two arguments and   type.RtoGremlin (source "g" & sV' [] &. gHas2P "age" (pBetween (30 :: Greskell Int) 40))%"g.V().has(\"age\",P.between(30,40))"7greskellMonomorphic version of 6.8greskell .hasLabel step.5toGremlin (source "g" & sV' [] &. gHasLabel "person")"g.V().hasLabel(\"person\")"9greskellMonomorphic version of 8.:greskell .hasLabel step with  ' type. Supported since TinkerPop 3.2.7.<toGremlin (source "g" & sV' [] &. gHasLabelP (pEq "person"))""g.V().hasLabel(P.eq(\"person\"))";greskellMonomorphic version of :.<greskell.hasId step.StoGremlin (source "g" & sV' [] &. gHasId (fmap ElementID $ gvalueInt $ (7 :: Int)))"g.V().hasId(7)"=greskellMonomorphic version of <.>greskell.hasId step with  ' type. Supported since TinkerPop 3.2.7.[toGremlin (source "g" & sV' [] &. gHasIdP (pLte $ fmap ElementID $ gvalueInt (100 :: Int)))"g.V().hasId(P.lte(100))"?greskellMonomorphic version of >.@greskell.hasKey1 step. The input type should be a VertexProperty.BtoGremlin (source "g" & sV' [] &. gProperties [] &. gHasKey "age")$"g.V().properties().hasKey(\"age\")"AgreskellMonomorphic version of @.Bgreskell.hasKey step with  ' type. Supported since TinkerPop 3.2.7.CgreskellMonomorphic version of B.Dgreskell .hasValue1 step. The input type should be a VertexProperty.XtoGremlin (source "g" & sV' [] &. gProperties ["age"] &. gHasValue (32 :: Greskell Int))("g.V().properties(\"age\").hasValue(32)"EgreskellMonomorphic version of D.Fgreskell .hasValue step with  ' type. Supported since TinkerPop 3.2.7.gtoGremlin (source "g" & sV' [] &. gProperties ["age"] &. gHasValueP (pBetween (30 :: Greskell Int) 40))6"g.V().properties(\"age\").hasValue(P.between(30,40))"GgreskellMonomorphic version of F.Hgreskell.and step.FtoGremlin (source "g" & sV' [] &. gAnd [gOut' ["knows"], gHas1 "age"])."g.V().and(__.out(\"knows\"),__.has(\"age\"))"Igreskell.or step.EtoGremlin (source "g" & sV' [] &. gOr [gOut' ["knows"], gHas1 "age"])-"g.V().or(__.out(\"knows\"),__.has(\"age\"))"Jgreskell.not step.9toGremlin (source "g" & sV' [] &. gNot (gOut' ["knows"]))"g.V().not(__.out(\"knows\"))"Kgreskell.range step. This step is not a |, because the filtering decision by this step is based on position of each element, not the element itself. This violates  law./toGremlin (source "g" & sV' [] &. gRange 0 100)"g.V().range(0,100)"Lgreskell.limit step.Mgreskell.tail step.Ngreskell.skip step.Ogreskell.by+ step with 1 argument, used for projection.Pgreskell.by+ step with 1 argument, used for comparison.Qgreskell.by, step with 2 arguments, used for comparison.Rgreskell.order step.(let key_age = ("age" :: Key AVertex Int)8toGremlin (source "g" & sV' [] &. gOrder [gBy1 key_age])"g.V().order().by(\"age\")"HtoGremlin (source "g" & sV' [] &. gOrder [gBy2 key_age oDecr, gBy1 tId])/"g.V().order().by(\"age\",Order.decr).by(T.id)"ctoGremlin (source "g" & sV' [] &. gOrder [gBy2 (gOut' ["knows"] >>> gCount) oIncr, gBy2 tId oIncr])L"g.V().order().by(__.out(\"knows\").count(),Order.incr).by(T.id,Order.incr)" is an ', meaning projection by the given key.1toGremlin (source "g" & sV' [] &. gOrder ["age"])"g.V().order().by(\"age\")"Sgreskell.by step associated with an .Tgreskell.flatMap step..flatMap step is a ! step even if the child walk is  type. This is because .flatMap1 step always modifies the path of the Traverser.StoGremlin (source "g" & sV' [] &. gFlatMap (gOut' ["knows"] >>> gOut' ["created"]))3"g.V().flatMap(__.out(\"knows\").out(\"created\"))"Ugreskell.V step.For each input item, .V] step emits vertices selected by the argument (or all vertices if the empty list is passed.)VgreskellMonomorphic version of U.Wgreskell.as step..as step is - because it adds the label to the traverser.Xgreskell.values step.:toGremlin (source "g" & sV' [] &. gValues ["name", "age"]) "g.V().values(\"name\",\"age\")"Ygreskell .properties step.6toGremlin (source "g" & sV' [] &. gProperties ["age"])"g.V().properties(\"age\")"Zgreskell.id step.[greskell.label step.\greskell .valueMap step.4toGremlin (source "g" & sV' [] &. gValueMap KeysNil)"g.V().valueMap()"ItoGremlin (source "g" & sV' [] &. gValueMap ("name" -: "age" -: KeysNil))""g.V().valueMap(\"name\",\"age\")"]greskell.select step with one argument.^greskell.select# step with more than one arguments._greskell.select$ step with one argument followed by .by step.`greskell.select/ step with more than one arguments followed by .by step.agreskell.project step.&let name_label = ("a" :: AsLabel Text)+let name_key = ("name" :: Key AVertex Text)&let count_label = ("b" :: AsLabel Int)}toGremlin (source "g" & sV' [] &. gProject (gByL name_label name_key) [gByL count_label (gOut' [] >>> gCount), gByL "c" tId])M"g.V().project(\"a\",\"b\",\"c\").by(\"name\").by(__.out().count()).by(T.id)"bgreskell.fold step.cgreskell.count step.dgreskell.out stepegreskellMonomorphic version of d.WtoGremlin (source "g" & sV' [fmap ElementID $ gvalueInt (8 :: Int)] &. gOut' ["knows"])"g.V(8).out(\"knows\")"fgreskell.outE stepggreskellMonomorphic version of f.hgreskell.outV step.igreskellMonomorphic version of h.jgreskell.in stepkgreskellMonomorphic version of j.lgreskell.inE step.mgreskellMonomorphic version of l.ngreskell.inV step.ogreskellMonomorphic version of n.pgreskell .sideEffect step that takes a traversal.qgreskellMonomorphic version of p. The result walk is always  type.dtoGremlin (source "g" & sV' [] & liftWalk &. gHas2 "name" "marko" &. gSideEffect' (gAddV' "toshio"))?"g.V().has(\"name\",\"marko\").sideEffect(__.addV(\"toshio\"))"rgreskell.addV step with a label.sgreskellMonomorphic version of r.tgreskell.drop step on .KtoGremlin (source "g" & sV' [] &. gHas2 "name" "marko" & liftWalk &. gDrop)&"g.V().has(\"name\",\"marko\").drop()"ugreskell.drop step on |.NtoGremlin (source "g" & sE' [] &. gProperties ["weight"] & liftWalk &. gDropP)%"g.E().properties(\"weight\").drop()"vgreskellSimple  .property' step. It adds a value to the property.RtoGremlin (source "g" & sV' [] & liftWalk &. gProperty "age" (20 :: Greskell Int))"g.V().property(\"age\",20)"wgreskell .property step for .1let key_location = "location" :: Key AVertex Text:let key_since = "since" :: Key (AVertexProperty Text) Text9let key_score = "score" :: Key (AVertexProperty Text) InttoGremlin (source "g" & sV' [] & liftWalk &. gPropertyV (Just cList) key_location "New York" [key_since =: "2012-09-23", key_score =: 8])U"g.V().property(list,\"location\",\"New York\",\"since\",\"2012-09-23\",\"score\",8)"xgreskell.from step with a traversal.ygreskell.to step with a traversal.zgreskell.addE' step. Supported since TinkerPop 3.1.0.)let key_name = "name" :: Key AVertex TexthtoGremlin (source "g" & sV' [] & liftWalk &. gAddE' "knows" (gFrom $ gV' [] >>> gHas2 key_name "marko"))<"g.V().addE(\"knows\").from(__.V().has(\"name\",\"marko\"))"etoGremlin (source "g" & sV' [] &. gHas2 key_name "marko" & liftWalk &. gAddE' "knows" (gTo $ gV' [])):"g.V().has(\"name\",\"marko\").addE(\"knows\").to(__.V())"{greskellMonomorphic version of z.|greskell(Unsafely convert input and output types.}greskellUnsafely convert output type.~greskell is an Iterator.greskellUnwrap  data constructor.greskell(Unsafely convert input and output types.greskellUnsafely convert output type.greskell(Unsafely convert input and output types.greskellUnsafely convert output typegreskell Based on  and .  is .greskell Based on .  is .greskell is /.greskellThe  is first converted to , and it's converted to .greskell To convert a  to ), it calls its static method version on __ class.greskell. in the child walk remains in the parent walk.greskell= effect in the child walk is rolled back in the parent walk.greskell#Projection by literal property key.greskell by literal property key.!greskellvariable name of "greskell vertex IDs#greskell vertex IDs$greskelledge IDs%greskelledge IDs&greskell vertex labelgreskell method namegreskellargs-greskellstep method name (e.g. "outE")greskellstep method arguments.greskell the main greskellthe modulating s2greskell property key6greskell property keygreskellpredicate on the property value:greskellpredicate on Element label.Bgreskell&predicate on the VertexProperty's key.Fgreskell'predicate on the VertexProperty's valuegreskell method nameKgreskellmingreskellmaxRgreskell following .by steps.Xgreskell property keysdgreskell edge labelsegreskell edge labelsfgreskell edge labelsjgreskell edge labelslgreskell edge labelsmgreskell edge labelsvgreskellkey of the propertygreskellvalue of the propertywgreskell,optional cardinality of the vertex property.greskellkey of the vertex propertygreskellvalue of the vertex propertygreskell1optional meta-properties for the vertex property.x      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{x !"#$%&')*+,(-./0123456789:;<=>?@ABCDEFGHIJRKLMNTUVWXYZ[\]^_`abcdefghijklmnopqrsz{xytuvw     OPQS)1*0+0,0FBinder monad to make binding between Gremlin variables and JSON values Toshio Ito <debug.ito@gmail.com>NoneMς greskell#This type is only for internal use.greskell7Binding between Gremlin variable names and JSON values.greskell<A Monad that manages binding variables and labels to values.;let binder = (,) <$> newBind (10 :: Int) <*> newBind "hoge"4let ((var_int, var_str), binding) = runBinder bindertoGremlin var_int"__v0"toGremlin var_str"__v1"/sortBy (comparing fst) $ HashMap.toList binding-[("__v0",Number 10.0),("__v1",String "hoge")]greskell State in the .greskell7Create a new Gremlin variable bound to the given value. The value v/ is kept in the monadic context. The returned ' is a Gremlin variable pointing to the vR. The Gremlin variable is guaranteed to be unique in the current monadic context.greskellExecute the given  monad to obtain .greskell'This function is only for internal use.OUnsafely create a placeholder variable of arbitrary type with the given index.greskell'This function is only for internal use.2Create placeholder variable string from the index.greskell Create a new . The returned < is guaranteed to be unique in the current monadic context.greskell bound valuegreskellvariable /Extra utility functions implemented by Greskell Toshio Ito <debug.ito@gmail.com>NonegreskellMake a series of  .property9 steps to write the given key-value pairs as properties.hlet binder = (writePropertyKeyValues [("age", (21 :: Int))] :: Binder (Walk SideEffect AVertex AVertex))&let (walk, binding) = runBinder bindertoGremlin walk&"__.property(\"age\",__v0).identity()"/sortBy (comparing fst) $ HashMap.toList binding[("__v0",Number 21.0)]greskellMake a series of  .property> steps to write the given key-value pairs as properties. Use  and  to make a t within .'let keyAge = ("age" :: Key AVertex Int)*let keyName = ("name" :: Key AVertex Text)clet (walk, binding) = runBinder $ writeKeyValues <$> sequence [keyAge <=:> 21, keyName <=:> "Josh"]toGremlin walk>"__.property(\"age\",__v0).property(\"name\",__v1).identity()"/sortBy (comparing fst) $ HashMap.toList binding-[("__v0",Number 21.0),("__v1",String "Josh")]greskellMake a series of  .property- steps to write all properties in the given 7.greskellLike 4, but this one takes a real value, binds it into a Greskell value and returns t.greskellLike =, but this one is for an optional property. If the value is , it's equivalent to . If the value is  , it returns v.7let keyNName = ("nickname" :: Key AVertex (Maybe Text))8let keyCompany = ("company" :: Key AVertex (Maybe Text))xlet (walk, binding) = runBinder $ writeKeyValues <$> sequence [keyNName <=?> Nothing, keyCompany <=?> Just "foobar.com"]toGremlin walk*"__.property(\"company\",__v0).identity()"/sortBy (comparing fst) $ HashMap.toList binding[("__v0",String "foobar.com")] ?@CDG ?@CDG 0Haskell binding for Gremlin graph query language Toshio Ito <debug.ito@gmail.com>None8       !/0123456789:;<=>?@ABCDEFG`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiijklmmnoppqrsstuvwxyyz{{|}~K       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     2        !"!#$'greskell-1.0.0.0-9Z4jKMqRW8u6uspGVNDnfBData.Greskell.GremlinData.Greskell.NonEmptyLikeData.Greskell.PMapData.Greskell.GraphData.Greskell.Graph.PropertyMapData.Greskell.AsLabelData.Greskell.GTraversalData.Greskell.BinderData.Greskell.Extra Data.GreskellOrder ComparatorA unComparatorA Comparator CompareArgcCompare cReversedcThenComparingP PredicateA unPredicateA Predicate PredicateArgpAndpOrpTestpNegatepNotpEqpNeqpLtpLtepGtpGtepInsidepOutsidepBetweenpWithinpWithoutoDecroIncroShuffle$fPredicatePredicateA$fGraphSONTypedP $fPredicateP$fComparatorComparatorA$fGraphSONTypedOrder$fComparatorOrder NonEmptyLike singletonappend toNonEmpty$fNonEmptyLikeLast$fNonEmptyLikeFirst$fNonEmptyLikeNonEmptyPMapLookupException PMapNoSuchKeyPMapParseErrorPMapKey PMapValuekeyTextMultiSinglePMap pMapInsert pMapDelete pMapLookup pMapToList pMapFromListlookuplookupMlookupAs lookupAs' lookupAsM lookupList lookupListAs lookupListAs'pMapDecribeError pMapToThrow pMapToFail$fAsIteratorPMap $fMonoidPMap$fSemigroupPMap$fFromGraphSONPMap$fGraphSONTypedPMap $fPMapKeyText$fExceptionPMapLookupException $fShowPMap$fEqPMap $fFunctorPMap$fFoldablePMap$fTraversablePMap $fShowMulti $fEqMulti $fOrdMulti$fFunctorMulti$fSemigroupMulti$fFoldableMulti$fTraversableMulti$fNonEmptyLikeMulti$fFromGraphSONMulti$fShowPMapLookupException$fEqPMapLookupException$fOrdPMapLookupExceptionAVertexPropertyavpIdavpLabelavpValue APropertyapKeyapValueAEdgeaeIdaeLabelAVertexavIdavLabelKeysKeysNilKeysConsKeyValue KeyNoValueKeyunKey CardinalityTProperty propertyKey propertyValueEdgeVertexElementElementPropertyElementPropertyContainer ElementData elementId elementLabel ElementID unElementIDunsafeCastElementIDtIdtKeytLabeltValuecListcSetcSinglekey unsafeCastKey=: singletonKeys-:$fFunctorElementID$fGraphSONTypedT $fPMapKeyKey$fToGreskellKey $fIsStringKey $fFunctorKey $fMonoidKeys$fSemigroupKeys$fFromGraphSONAVertex$fFromJSONAVertex$fGraphSONTypedAVertex$fVertexAVertex$fElementDataAVertex$fFromGraphSONAEdge$fFromJSONAEdge$fGraphSONTypedAEdge $fEdgeAEdge$fElementDataAEdge$fTraversableAProperty$fFoldableAProperty$fFunctorAProperty$fGraphSONTypedAProperty$fPropertyAProperty$fFromGraphSONAProperty$fFromJSONAProperty$fElementAEdge$fTraversableAVertexProperty$fFoldableAVertexProperty$fFunctorAVertexProperty$fPropertyAVertexProperty$fElementAVertexProperty$fElementDataAVertexProperty$fGraphSONTypedAVertexProperty$fFromGraphSONAVertexProperty$fFromJSONAVertexProperty$fElementAVertex$fShowElementID $fEqElementID$fGenericElementID$fToJSONElementID$fFromJSONElementID$fFromGraphSONElementID$fHashableElementID $fShowKey$fEqKey $fShowAVertex $fEqAVertex $fShowAEdge $fEqAEdge$fShowAProperty $fEqAProperty$fOrdAProperty$fShowAVertexProperty$fEqAVertexPropertyFromGraphSONWithKeyPropertyMapListPropertyMapSingle PropertyMap lookupOne putPropertyremoveProperty allPropertieslookupOneValuelookupListValues parseOneValueparseListValuesparseNonEmptyValuesfromProperties$fTraversablePropertyMapGeneric$fFoldablePropertyMapGeneric$fFunctorPropertyMapGeneric$fMonoidPropertyMapGeneric$fSemigroupPropertyMapGeneric$fPropertyMapPropertyMapSingle$fPropertyMapPropertyMapList$$fFromGraphSONWithKeyAVertexProperty$fFromGraphSONWithKeyAProperty$fFromGraphSONPropertyMapList$fFromJSONPropertyMapList$fFromGraphSONPropertyMapSingle$fFromJSONPropertyMapSingle$fShowPropertyMapGeneric$fEqPropertyMapGeneric$fShowPropertyMapSingle$fEqPropertyMapSingle$fSemigroupPropertyMapSingle$fMonoidPropertyMapSingle$fFunctorPropertyMapSingle$fFoldablePropertyMapSingle$fTraversablePropertyMapSingle$fShowPropertyMapList$fEqPropertyMapList$fSemigroupPropertyMapList$fMonoidPropertyMapList$fFunctorPropertyMapList$fFoldablePropertyMapList$fTraversablePropertyMapList SelectedMapAsLabel unAsLabel$fPMapKeyAsLabel$fFunctorAsLabel$fToGreskellAsLabel$fIsStringAsLabel $fShowAsLabel $fEqAsLabel $fOrdAsLabel AddAnchorLabeledByProjection ByComparatorByComparatorProjByComparatorCompByComparatorProjComp ByProjectionProjectionLikeProjectionLikeStartProjectionLikeEndGraphTraversalSourceSplitLift SideEffect TransformFilterWalkTypeWalk ToGTraversal toGTraversalliftWalkunsafeCastStart unsafeCastEndGraphTraversal GTraversal unGTraversalsourcesVsV'sEsE'sAddVsAddV'unsafeGTraversal&.$.<$.><*.> unsafeWalk modulateWith gIdentity gIdentity'gFiltergHas1gHas1'gHas2gHas2'gHas2PgHas2P' gHasLabel gHasLabel' gHasLabelP gHasLabelP'gHasIdgHasId'gHasIdPgHasIdP'gHasKeygHasKey'gHasKeyP gHasKeyP' gHasValue gHasValue' gHasValueP gHasValueP'gAndgOrgNotgRangegLimitgTailgSkipgBygBy1gBy2gOrdergByLgFlatMapgVgV'gAsgValues gPropertiesgIdgLabel gValueMapgSelect1gSelectN gSelectBy1 gSelectByNgProjectgFoldgCountgOutgOut'gOutEgOutE'gOutVgOutV'gIngIn'gInEgInE'gInVgInV' gSideEffect gSideEffect'gAddVgAddV'gDropgDropP gProperty gPropertyVgFromgTogAddEgAddE'$fBifunctorGraphTraversal$fFunctorGraphTraversal$fAsIteratorGraphTraversal$fToGreskellGTraversal$fBifunctorGTraversal$fFunctorGTraversal$fBifunctorWalk $fFunctorWalk $fMonoidWalk$fSemigroupWalk$fCategoryTYPEWalk$fWalkTypeFilter$fWalkTypeTransform$fWalkTypeSideEffect$fLiftSideEffectSideEffect$fLiftTransformSideEffect$fLiftTransformTransform $fLiftFilterc$fToGreskellWalk$fToGTraversalWalk$fToGTraversalGTraversal$fSplitSideEffectSideEffect$fSplitTransformp$fSplitFilterp$fProjectionLikeGreskell$fProjectionLikeGreskell0$fProjectionLikeKey$fProjectionLikeGreskell1$fProjectionLikeGTraversal$fProjectionLikeWalk$fProjectionLikeGreskell2$fProjectionLikeGTraversal0$fProjectionLikeWalk0$fIsStringByProjection$fProjectionLikeByProjection$fIsStringByComparator$fShowGraphTraversal$fShowGTraversal $fShowWalk$fShowGraphTraversalSourceBindingBindernewBind runBinder newAsLabel $fShowBinderS $fEqBinderS$fFunctorBinder$fApplicativeBinder $fMonadBinderwritePropertyKeyValueswriteKeyValueswritePMapProperties<=:><=?>ghc-prim GHC.TypesBoolbaseGHC.BaseNonEmpty<> SemigroupGHC.Exception.Type Exception text-1.2.3.1Data.Text.InternalTextString(exceptions-0.10.3-JCVBmzxJmVzJ5RaoaWAPCEControl.Monad.Catch MonadThrow GHC.MaybeNothingControl.Monad.Fail MonadFail,greskell-core-0.1.3.0-9FlODauem48C9zdZRrtQL1Data.Greskell.GraphSON.GValueGValueData.Greskell.GreskellGreskellPropertyMapGenericfailControl.CategoryCategory GHC.ClassesEqData.Greskell.GraphSON FromGraphSON Data.Functor<$><*> Data.StringIsStringmemptyid>>>methodCallText multiLogicPlaceHolderIndexBinderSunsafePlaceHoldertoPlaceHolderVariableJust$aeson-1.4.6.0-1XnxcetEtfUG8O3EDchcasData.Aeson.Types.InternalParserunsafeMethodCall unsafeFunCall toGremlinLazy toGremlin gvalueIntgvaluevalueIntvaluenumbersinglelistfalsetruestringunsafeGreskellLazyunsafeGreskell ToGreskellGreskellReturn toGreskellData.Greskell.AsIterator AsIterator IteratorItemparseJSONViaGValue.: parseEitherparseUnwrapListparseUnwrapAll parseGraphSONData.Greskell.GMaptoList unGMapEntryparseToGMapEntryunGMap parseToGMapparseToFlattenedMap FlattenedMapunFlattenedMapGMapgmapFlat gmapValue GMapEntry gmapEntryFlat gmapEntryKeygmapEntryValue typedGValue'nonTypedGValue GValueBodyGObjectGArrayGStringGNumberGBoolGNullData.Greskell.GraphSON.CoreparseTypedGraphSONtypedGraphSON' typedGraphSONnonTypedGraphSONGraphSONgsonType gsonValue$Data.Greskell.GraphSON.GraphSONTyped GraphSONTyped gsonTypeFor