h$FA      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Toshio Ito None z  greskell-core)Types that have an intrinsic type ID for gsonType field. greskell-core Type ID for gsonType. greskell-core greskell-core greskell-core greskell-core greskell-core greskell-coreMap to "g:Double". greskell-core greskell-core greskell-core2Map to "gx:Byte". Note that Java's Byte is signed. Toshio Ito None 8  greskell-coreWrapper for "typed JSON object" introduced in GraphSON version 2. See 9http://tinkerpop.apache.org/docs/current/dev/io/#graphson=This data type is useful for encoding/decoding GraphSON text.-Aeson.decode "1000" :: Maybe (GraphSON Int32)6Just (GraphSON {gsonType = Nothing, gsonValue = 1000})Aeson.decode "{\"@type\": \"g:Int32\", \"@value\": 1000}" :: Maybe (GraphSON Int32)=Just (GraphSON {gsonType = Just "g:Int32", gsonValue = 1000})Note that encoding of the "g:Map" type is inconsistent between GraphSON v1 and v2, v3. To handle the encoding, use Data.Greskell.GMap. greskell-coreType ID, corresponding to @type field. greskell-coreValue, correspoding to @value field. greskell-core Create a  without .nonTypedGraphSON (10 :: Int)-GraphSON {gsonType = Nothing, gsonValue = 10} greskell-core Create a  with its type ID.typedGraphSON (10 :: Int32)4GraphSON {gsonType = Just "g:Int32", gsonValue = 10}  greskell-core Create a  with the given type ID.$typedGraphSON' "g:Int32" (10 :: Int)4GraphSON {gsonType = Just "g:Int32", gsonValue = 10}  greskell-coreParse  GraphSON v, but it checks . If  is  or it's not equal to , the  fails. greskell-coreNote: this function is not exported because I don't need it for now. If you need this function, just open an issue.Like  8, but this handles parse errors in a finer granularity. If the given + is not a typed JSON object, it returns . If the given  is a typed JSON object but it fails to parse the "@value" field, the  fails. If the given  is a typed JSON object but the "@type" field is not equal to the  of type v, the  fails.Otherwise (if the given  is a typed JSON object with valid "@type" and "@value" fields,) it returns . greskell-core If the given  is a typed JSON object,  field of the result is . Otherwise, the given  is directly parsed into , and  is . greskell-coreIf  is , the ( is encoded as a typed JSON object. If  is , the  is directly encoded. greskell-core  "Aeson Value with GraphSON wrappers Toshio Ito None8]  greskell-core without the top-level  wrapper. greskell-core An Aeson  wrapped in  wrapper type. Basically this type is the Haskell representaiton of a GraphSON-encoded document.9This type is used to parse GraphSON documents. See also  class. greskell-core Create a  without "@type" field. greskell-core Create a  with the given "@type" field. greskell-core Remove all  wrappers recursively from . greskell-coreRemove the top-level  wrapper, but leave other wrappers as-is. The remaining wrappers are reconstructed by  to make them into . greskell-coreGet the   from . greskell-coreGet the  field from . greskell-core Reconstruct  from &. It preserves all GraphSON wrappers. greskell-coreParse  wrappers recursively in , making it into . greskell-core"@type" field.  data type for g:Map Toshio Ito None  567#& greskell-coreHaskell representation of  Map.Entry type."Basically GraphSON encodes Java's  Map.Entry type as if it were a Map with a single entry. Thus its encoded form is either a JSON object or a flattened key-values, as explained in +.Aeson.eitherDecode "{\"1\": \"one\"}" :: Either String (GMapEntry Int Text)Right (GMapEntry {gmapEntryFlat = False, gmapEntryKey = 1, gmapEntryValue = "one"})Aeson.eitherDecode "[1, \"one\"]" :: Either String (GMapEntry Int Text)Right (GMapEntry {gmapEntryFlat = True, gmapEntryKey = 1, gmapEntryValue = "one"}) greskell-coreUse 3.@ greskell-coreUse 5.A greskell-coreMap to "g:Map".2 greskell-core key parser greskell-core value parser greskell-core%input vector of flattened key-values.3 greskell-core key parser greskell-core value parser greskell-core object parser greskell-core%input object or flattened key-values.5 greskell-core key parser greskell-core value parser greskell-core$input object or flattened key-values&'()*+,-./012345678/012+,-.4783&'()*65Encoding and decoding GraphSON Toshio Ito None 8-S greskell-core#Types that can be constructed from . This is analogous to  class.Instances of basic types are implemented based on the following rule.Simple scalar types (e.g.  and ): use U.List-like types (e.g. [],  and  ): use V.Map-like types (e.g.  and ): parse into + first, then unwrap the + wrapper. That way, all versions of GraphSON formats are handled properly.Trivial wrapper types (e.g. ): just parse the item inside.7Other types: see the individual instance documentation. Note that  does not have S? instance. This is intentional. As stated in the document of  , using  in greskell is an error in most cases. To prevent you from using ,  (and thus  ) don't have S instances.U greskell-coreUnwrap the given  with ", and just parse the result with .Useful to implement S instances for scalar types.V greskell-coreExtract   from the given 4, parse the items in the array, and gather them by .Useful to implement S instances for  types.W greskell-coreParse  into S.X greskell-core Like Aeson's  , but for S.Y greskell-coreImplementation of  based on T . The input  is first converted to &, and it's parsed to the output type.Z greskell-coreFor any input , T returns (). For example, you can use it to ignore data you get from the Gremlin server.\ greskell-coreCall ! to remove all GraphSON wrappers.] greskell-core^ greskell-core_ greskell-coreTry , then .` greskell-coreParse  into .a greskell-coreFirst convert to  with  key, and convert to .e greskell-coreUse 5.f greskell-coreUse 3.g greskell-coreUse 2.h greskell-corei greskell-corej greskell-corek greskell-corel greskell-corem greskell-coren greskell-coreo greskell-corep greskell-coreq greskell-corer greskell-coreu greskell-corey greskell-coreFirst convert to , and convert to . STUVWXY  STWUVXY-Conversion from Object to Iterator in Gremlin Toshio Ito None2& greskell-core,Types that are converted to an iterator by org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils.asIterator method. In fact, that method can convert any type to an iterator, but greskell limits types to which the conversion is applicable.#Associated with this type-class is . % type family is association of type a% and the type of its item when type a is converted to an iterator. rule of thumb:Iterator and Iterable types like List, Stream and GraphTraversal& are converted to their element types.Map type is converted to its  Map.Entry. In greskell,  Map.Entry is expressed as &.(Other types are converted to themselves.Caveat:Because Haskell's  is [Char], IteratorItem String returns , which is incorrect. Use  if you want to deal with String s in Gremlin. greskell-core"Low-level Gremlin script data type Toshio Ito None @ greskell-coreSomething that can convert to . greskell-core!type of return value by Greskell. greskell-coreGremlin expression of type a. is essentially just a piece of Gremlin script with a phantom type. The type a represents the type of data that the script is supposed to evaluate to. and  instances compare Gremlin scripts, NOT the values they evaluate to. greskell-coreUnsafely create a ? of arbitrary type. The given Gremlin script is printed as-is.$toGremlin $ unsafeGreskell "x + 100" "x + 100" greskell-coreSame as , but it takes lazy . greskell-coreCreate a String literal in Gremlin script. The content is automatically escaped.toGremlin $ string "foo bar" "\"foo bar\""5toGremlin $ string "escape newline\n escape dollar $")"\"escape newline\\n escape dollar \\$\"" greskell-coreBoolean true literal.toGremlin true"true" greskell-coreBoolean false literal.toGremlin false"false" greskell-core List literal.4toGremlin $ list ([100, 200, 300] :: [Greskell Int])"[100,200,300]" greskell-coreMake a list with a single object. Useful to prevent the Gremlin Server from automatically iterating the result object.,toGremlin $ single ("hoge" :: Greskell Text) "[\"hoge\"]" greskell-core1Arbitrary precision number literal, like "123e8".toGremlin $ number 123e8 "1.23e10" greskell-coreAeson  literal.toGremlin $ value Aeson.Null"null":toGremlin $ value $ Aeson.toJSON $ ([10, 20, 30] :: [Int])"[10.0,20.0,30.0]"'toGremlin $ value $ Aeson.Object mempty"[:]" Note that  does not distinguish integers from floating-point numbers, so  function may format an integer as a floating-point number. To ensure formatting as integers, use . greskell-coreInteger literal as  type.!toGremlin $ valueInt (100 :: Int)"100" greskell-core literal as  type. greskell-coreInteger literal as  type."toGremlin $ gvalueInt (256 :: Int)"256" greskell-core&Create a readable Gremlin script from . greskell-coreSame as  except that this returns lazy . greskell-coreUnsafely create a 9 that calls the given function with the given arguments.,toGremlin $ unsafeFunCall "add" ["10", "20"] "add(10,20)" greskell-coreUnsafely create a  that calls the given object method call with the given target and arguments.toGremlin $ unsafeMethodCall ("foobar" :: Greskell Text) "length" []"(\"foobar\").length()" greskell-coreMonoidal operations on  assumes String operations in Gremlin.  is the empty String, and  is String concatenation. greskell-coreSemigroup operator  on  assumes String concatenation on Gremlin. greskell-core?Floating-point number literals and numeric operation in Gremlin greskell-core1Integer literals and numeric operation in Gremlin greskell-core"Unsafely convert the phantom type. greskell-coreSame as & except for the input and output type. greskell-core It's just . greskell-coreGremlin script greskell-coreGremlin script greskell-core function name greskell-core arguments greskell-core!return value of the function call greskell-core target object greskell-core method name greskell-core arguments greskell-corereturn value of the method call !!"#$%&'()*+,-./012344567889:;;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~   b,greskell-core-1.0.0.0-5piD4rGD0KD3ETiQVDTTjNData.Greskell.GraphSONData.Greskell.GraphSON.GValueData.Greskell.GMapData.Greskell.AsIteratorData.Greskell.Greskell$Data.Greskell.GraphSON.GraphSONTypedData.Greskell.GraphSON.Core FromGraphSONData.MapMapData.HashMap.StrictHashMap AsIterator$aeson-2.0.2.0-5fAHlM2c2ew55M7QiJurEHData.Aeson.Types.InternalParser GraphSONTyped gsonTypeForGraphSONgsonType gsonValuenonTypedGraphSON typedGraphSONtypedGraphSON'parseTypedGraphSON GValueBodyGObjectGArrayGStringGNumberGBoolGNullGValueunGValuenonTypedGValue typedGValue' unwrapAll unwrapOne gValueBody gValueType$fToJSONGValueBody$fToJSONGValue$fFromJSONGValue$fHashableGValueBody$fHashableGValue$fShowGValueBody$fEqGValueBody$fGenericGValueBody $fShowGValue $fEqGValue$fGenericGValue GMapEntry gmapEntryFlat gmapEntryKeygmapEntryValueGMapgmapFlat gmapValue FlattenedMapunFlattenedMapparseToFlattenedMap parseToGMapunGMapparseToGMapEntry unGMapEntry singletontoList$fGraphSONTypedFlattenedMap$fToJSONFlattenedMap$fFromJSONFlattenedMap$fGraphSONTypedGMap $fToJSONGMap$fFromJSONGMap$fToJSONGMapEntry$fFromJSONGMapEntry$fGraphSONTypedGMapEntry$fShowGMapEntry $fEqGMapEntry$fOrdGMapEntry$fFoldableGMapEntry$fTraversableGMapEntry$fFunctorGMapEntry $fShowGMap$fEqGMap$fFoldableGMap$fTraversableGMap $fFunctorGMap$fShowFlattenedMap$fEqFlattenedMap$fOrdFlattenedMap$fFoldableFlattenedMap$fTraversableFlattenedMap$fFunctorFlattenedMap parseGraphSONparseUnwrapAllparseUnwrapList parseEither.:parseJSONViaGValue$fFromGraphSON()$fFromGraphSONUUID$fFromGraphSONValue$fFromGraphSONLast$fFromGraphSONFirst$fFromGraphSONEither$fFromGraphSONMaybe$fFromGraphSONKeyMap$fFromGraphSONIntMap$fFromGraphSONMap$fFromGraphSONHashMap$fFromGraphSONGMapEntry$fFromGraphSONGMap$fFromGraphSONFlattenedMap$fFromGraphSONAny$fFromGraphSONAll$fFromGraphSONProduct$fFromGraphSONSum$fFromGraphSONDual$fFromGraphSONWrappedMonoid$fFromGraphSONLast0$fFromGraphSONFirst0$fFromGraphSONMax$fFromGraphSONMin$fFromGraphSONIdentity$fFromGraphSONHashSet$fFromGraphSONSet$fFromGraphSONNonEmpty$fFromGraphSONSeq$fFromGraphSONVector$fFromGraphSON[]$fFromGraphSONKey$fFromGraphSONIntSet$fFromGraphSONScientific$fFromGraphSONWord64$fFromGraphSONWord32$fFromGraphSONWord16$fFromGraphSONWord8$fFromGraphSONWord$fFromGraphSONRatio$fFromGraphSONNatural$fFromGraphSONInteger$fFromGraphSONInt64$fFromGraphSONInt32$fFromGraphSONInt16$fFromGraphSONInt8$fFromGraphSONFloat$fFromGraphSONDouble$fFromGraphSONBool$fFromGraphSONText$fFromGraphSONText0$fFromGraphSONInt$fFromGraphSONGValue IteratorItem$fAsIteratorMaybe$fAsIteratorIntMap$fAsIteratorMap$fAsIteratorHashMap$fAsIteratorGMapEntry$fAsIteratorGMap$fAsIteratorNonEmpty$fAsIteratorIntSet$fAsIteratorSet$fAsIteratorSeq$fAsIteratorHashSet$fAsIteratorVector$fAsIterator[]$fAsIteratorScientific$fAsIteratorWord64$fAsIteratorWord32$fAsIteratorWord16$fAsIteratorWord8$fAsIteratorWord$fAsIteratorRatio$fAsIteratorNatural$fAsIteratorInteger$fAsIteratorInt64$fAsIteratorInt32$fAsIteratorInt16$fAsIteratorInt8$fAsIteratorFloat$fAsIteratorDouble$fAsIteratorChar$fAsIteratorBool$fAsIteratorText$fAsIteratorText0$fAsIteratorInt$fAsIterator() ToGreskellGreskellReturn toGreskellGreskellunsafeGreskellunsafeGreskellLazystringtruefalselistsinglenumbervaluevalueIntgvalue gvalueInt toGremlin toGremlinLazy unsafeFunCallunsafeMethodCall$fMonoidGreskell$fSemigroupGreskell$fFractionalGreskell $fNumGreskell$fFunctorGreskell$fIsStringGreskell$fToGreskellGreskell$fShowGreskell $fEqGreskell $fOrdGreskell$fGraphSONTypedEither$fGraphSONTypedIntMap$fGraphSONTypedMap$fGraphSONTypedSet$fGraphSONTypedIntSet$fGraphSONTypedScientific$fGraphSONTypedSeq$fGraphSONTypedVector$fGraphSONTypedInt8base GHC.MaybeNothingparseTypedGraphSON'Value Data.EitherLeftRight$fFromJSONGraphSONJust$fToJSONGraphSON$fHashableGraphSONData.Aeson.Types.ToJSONtoJSONData.Aeson.Types.FromJSONFromJSONToJSONghc-prim GHC.TypesTrueFalseInt text-1.2.3.2Data.Text.InternalText&vector-0.12.3.1-BS9vrRx3ry325IASWLF2UH Data.VectorVectorcontainers-0.6.2.1Data.Set.InternalSet4unordered-containers-0.2.16.0-2pixVFqglZmEAv5G2qhIfjData.HashMap.InternalData.Map.InternalData.Functor.IdentityIdentityCharGHC.BaseString parseJSONGHC.ExtsfromListIsListData.Aeson.KeyMapKeyMapData.Aeson.KeyKey GHC.ClassesEqOrdData.Text.Internal.LazyNumbermemptymappend<>id