-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Haskell binding for Gremlin graph query language
--   
--   Haskell binding for <a>Gremlin graph query language</a>. See
--   <a>README.md</a> for detail.
--   
--   This package is the main entry point of greskell family. It re-exports
--   <a>greskell-core</a> package, and adds some useful functions to it.
@package greskell
@version 0.2.0.2


module Data.Greskell.Binder

-- | A Monad that manages binding variables to values.
--   
--   <pre>
--   &gt;&gt;&gt; let binder = (,) &lt;$&gt; newBind (10 :: Int) &lt;*&gt; newBind "hoge"
--   
--   &gt;&gt;&gt; let ((var_int, var_str), binding) = runBinder binder
--   
--   &gt;&gt;&gt; toGremlin var_int
--   "__v0"
--   
--   &gt;&gt;&gt; toGremlin var_str
--   "__v1"
--   
--   &gt;&gt;&gt; sortBy (comparing fst) $ HashMap.toList binding
--   [("__v0",Number 10.0),("__v1",String "hoge")]
--   </pre>
data Binder a

-- | Binding between Gremlin variable names and JSON values.
type Binding = Object

-- | Create a new Gremlin variable bound to the given value.
--   
--   The value <tt>v</tt> is kept in the monadic context. The returned
--   <a>Greskell</a> is a Gremlin variable pointing to the <tt>v</tt>. The
--   Gremlin variable is guaranteed to be unique in the current monadic
--   context.
newBind :: ToJSON v => v -> Binder (Greskell v)

-- | Execute the given <a>Binder</a> monad to obtain <a>Binding</a>.
runBinder :: Binder a -> (a, Binding)
instance GHC.Base.Monad Data.Greskell.Binder.Binder
instance GHC.Base.Applicative Data.Greskell.Binder.Binder
instance GHC.Base.Functor Data.Greskell.Binder.Binder


-- | This module defines types and functions about TinkerPop graph
--   structure API.
module Data.Greskell.Graph

-- | <tt>org.apache.tinkerpop.gremlin.structure.Element</tt> interface in a
--   TinkerPop graph.
class Element e where {
    type family ElementID e;
    type family ElementProperty e :: * -> *;
}

-- | <tt>org.apache.tinkerpop.gremlin.structure.Vertex</tt> interface in a
--   TinkerPop graph.
class (Element v) => Vertex v

-- | <tt>org.apache.tinkerpop.gremlin.structure.Edge</tt> interface in a
--   TinkerPop graph.
class (Element e) => Edge e where {
    type family EdgeVertexID e;
}

-- | <tt>org.apache.tinkerpop.gremlin.structure.Property</tt> interface in
--   a TinkerPop graph.
class Property p

-- | Get key of this property.
propertyKey :: Property p => p v -> Text

-- | Get value of this property.
propertyValue :: Property p => p v -> v

-- | <tt>org.apache.tinkerpop.gremlin.structure.T</tt> enum.
--   
--   <a>T</a> is a token to get data <tt>b</tt> from an Element <tt>a</tt>.
data T a b

-- | <tt>T.id</tt> token.
tId :: Element a => Greskell (T a (ElementID a))

-- | <tt>T.key</tt> token.
tKey :: (Element (p v), Property p) => Greskell (T (p v) Text)

-- | <tt>T.label</tt> token.
tLabel :: Element a => Greskell (T a Text)

-- | <tt>T.value</tt> token.
tValue :: (Element (p v), Property p) => Greskell (T (p v) v)

-- | 
--   <tt>org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality</tt>
--   enum.
data Cardinality

-- | <tt>list</tt> Cardinality.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin cList
--   "list"
--   </pre>
cList :: Greskell Cardinality

-- | <tt>set</tt> Cardinality.
cSet :: Greskell Cardinality

-- | <tt>single</tt> Cardinality.
cSingle :: Greskell Cardinality

-- | A property key accessing value <tt>b</tt> in an Element <tt>a</tt>. In
--   Gremlin, it's just a String type.
newtype Key a b
Key :: Greskell Text -> Key a b
[unKey] :: Key a b -> Greskell Text

-- | Create a <a>Key</a> from a literal string.
key :: Text -> Key a b

-- | Pair of <a>Key</a> and its value.
--   
--   Type <tt>a</tt> is the type of <a>Element</a> that keeps the
--   <a>KeyValue</a> pair. It drops the type of the value, so that you can
--   construct a heterogeneous list of key-value pairs for a given
--   <a>Element</a>.
data KeyValue a
[KeyValue] :: Key a b -> Greskell b -> KeyValue a

-- | Constructor operator of <a>KeyValue</a>.
(=:) :: Key a b -> Greskell b -> KeyValue a

-- | General vertex type you can use for <a>Vertex</a> class, based on
--   Aeson data types.
data AVertex
AVertex :: GValue -> Text -> PropertyMapList AVertexProperty GValue -> AVertex

-- | ID of this vertex
[avId] :: AVertex -> GValue

-- | Label of this vertex
[avLabel] :: AVertex -> Text

-- | Properties of this vertex.
[avProperties] :: AVertex -> PropertyMapList AVertexProperty GValue

-- | General edge type you can use for <a>Edge</a> class, based on Aeson
--   data types.
data AEdge
AEdge :: GValue -> Text -> Text -> Text -> GValue -> GValue -> PropertyMapSingle AProperty GValue -> AEdge

-- | ID of this edge.
[aeId] :: AEdge -> GValue

-- | Label of this edge.
[aeLabel] :: AEdge -> Text

-- | Label of this edge's destination vertex.
[aeInVLabel] :: AEdge -> Text

-- | Label of this edge's source vertex.
[aeOutVLabel] :: AEdge -> Text

-- | ID of this edge's destination vertex.
[aeInV] :: AEdge -> GValue

-- | ID of this edge's source vertex.
[aeOutV] :: AEdge -> GValue

-- | Properties of this edge.
[aeProperties] :: AEdge -> PropertyMapSingle AProperty GValue

-- | General vertex property type you can use for VertexProperty, based on
--   Aeson data types.
--   
--   If you are not sure about the type <tt>v</tt>, just use <a>GValue</a>.
data AVertexProperty v
AVertexProperty :: GValue -> Text -> v -> PropertyMapSingle AProperty GValue -> AVertexProperty v

-- | ID of this vertex property.
[avpId] :: AVertexProperty v -> GValue

-- | Label and key of this vertex property.
[avpLabel] :: AVertexProperty v -> Text

-- | Value of this vertex property.
[avpValue] :: AVertexProperty v -> v

-- | (meta)properties of this vertex property.
[avpProperties] :: AVertexProperty v -> PropertyMapSingle AProperty GValue

-- | General simple property type you can use for <a>Property</a> class.
--   
--   If you are not sure about the type <tt>v</tt>, just use <a>GValue</a>.
data AProperty v
AProperty :: Text -> v -> AProperty v
[apKey] :: AProperty v -> Text
[apValue] :: AProperty v -> v

-- | Common basic operations supported by maps of properties.
class PropertyMap m

-- | Look up a property associated with the given key.
lookupOne :: PropertyMap m => Text -> m p v -> Maybe (p v)

-- | Look up all properties associated with the given key.
lookupList :: PropertyMap m => Text -> m p v -> [p v]

-- | Put a property into the map.
putProperty :: (PropertyMap m, Property p) => p v -> m p v -> m p v

-- | Remove all properties associated with the given key.
removeProperty :: PropertyMap m => Text -> m p v -> m p v

-- | Return all properties in the map.
allProperties :: PropertyMap m => m p v -> [p v]

-- | A <a>PropertyMap</a> that has a single value per key.
--   
--   <a>putProperty</a> replaces the old property by the given property.
--   
--   <a>&lt;&gt;</a> 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.
data PropertyMapSingle p v

-- | A <a>PropertyMap</a> that can keep more than one values per key.
--   
--   <a>lookupOne</a> returns the first property associated with the given
--   key.
--   
--   <a>putProperty</a> prepends the given property to the property list.
--   
--   <a>&lt;&gt;</a> returns the union of the two given property maps. If
--   the two property maps share some same keys, those property lists are
--   concatenated.
data PropertyMapList p v

-- | Lookup a property value from a <a>PropertyMap</a> by key.
lookupOneValue :: (PropertyMap m, Property p) => Text -> m p v -> Maybe v

-- | Lookup a list of property values from a <a>PropertyMap</a> by key.
lookupListValues :: (PropertyMap m, Property p) => Text -> m p v -> [v]

-- | Lookup a property <a>GValue</a> by the given key, and parse it.
--   
--   In version 0.1.1.0 and before, this function took an argument <tt>m p
--   (GraphSON Value)</tt>. This has changed, because property types for
--   <a>AVertex</a> etc have changed.
parseOneValue :: (PropertyMap m, Property p, FromGraphSON v) => Text -> m p GValue -> Parser v

-- | Lookup a list of property values from a <a>PropertyMap</a> by the
--   given key, and parse them.
--   
--   In version 0.1.1.0 and before, this function took an argument <tt>m p
--   (GraphSON Value)</tt>. This has changed, because property types for
--   <a>AVertex</a> etc have changed.
parseListValues :: (PropertyMap m, Property p, FromGraphSON v) => Text -> m p GValue -> Parser [v]

-- | Like <a>parseListValues</a>, but this function <a>fail</a>s when there
--   is no property with the given key.
--   
--   In version 0.1.1.0 and before, this function took an argument <tt>m p
--   (GraphSON Value)</tt>. This has changed, because property types for
--   <a>AVertex</a> etc have changed.
parseNonEmptyValues :: (PropertyMap m, Property p, FromGraphSON v) => Text -> m p GValue -> Parser (NonEmpty v)

-- | Create a <a>PropertyMap</a> from list of <a>Property</a>s.
fromProperties :: (PropertyMap m, Property p, Monoid (m p v)) => [p v] -> m p v

-- | <b>This typeclass is for internal use.</b>
--   
--   GraphSON parser with a property key given from outside.
class FromGraphSONWithKey a
instance GHC.Classes.Eq Data.Greskell.Graph.AVertex
instance GHC.Show.Show Data.Greskell.Graph.AVertex
instance Data.Traversable.Traversable p => Data.Traversable.Traversable (Data.Greskell.Graph.PropertyMapList p)
instance Data.Foldable.Foldable p => Data.Foldable.Foldable (Data.Greskell.Graph.PropertyMapList p)
instance GHC.Base.Functor p => GHC.Base.Functor (Data.Greskell.Graph.PropertyMapList p)
instance GHC.Base.Monoid (Data.Greskell.Graph.PropertyMapList p v)
instance GHC.Base.Semigroup (Data.Greskell.Graph.PropertyMapList p v)
instance GHC.Classes.Eq (p v) => GHC.Classes.Eq (Data.Greskell.Graph.PropertyMapList p v)
instance GHC.Show.Show (p v) => GHC.Show.Show (Data.Greskell.Graph.PropertyMapList p v)
instance GHC.Classes.Eq Data.Greskell.Graph.AEdge
instance GHC.Show.Show Data.Greskell.Graph.AEdge
instance GHC.Classes.Eq v => GHC.Classes.Eq (Data.Greskell.Graph.AVertexProperty v)
instance GHC.Show.Show v => GHC.Show.Show (Data.Greskell.Graph.AVertexProperty v)
instance Data.Traversable.Traversable p => Data.Traversable.Traversable (Data.Greskell.Graph.PropertyMapSingle p)
instance Data.Foldable.Foldable p => Data.Foldable.Foldable (Data.Greskell.Graph.PropertyMapSingle p)
instance GHC.Base.Functor p => GHC.Base.Functor (Data.Greskell.Graph.PropertyMapSingle p)
instance GHC.Base.Monoid (Data.Greskell.Graph.PropertyMapSingle p v)
instance GHC.Base.Semigroup (Data.Greskell.Graph.PropertyMapSingle p v)
instance GHC.Classes.Eq (p v) => GHC.Classes.Eq (Data.Greskell.Graph.PropertyMapSingle p v)
instance GHC.Show.Show (p v) => GHC.Show.Show (Data.Greskell.Graph.PropertyMapSingle p v)
instance GHC.Classes.Eq (t (p v)) => GHC.Classes.Eq (Data.Greskell.Graph.PropertyMapGeneric t p v)
instance GHC.Show.Show (t (p v)) => GHC.Show.Show (Data.Greskell.Graph.PropertyMapGeneric t p v)
instance GHC.Classes.Ord v => GHC.Classes.Ord (Data.Greskell.Graph.AProperty v)
instance GHC.Classes.Eq v => GHC.Classes.Eq (Data.Greskell.Graph.AProperty v)
instance GHC.Show.Show v => GHC.Show.Show (Data.Greskell.Graph.AProperty v)
instance GHC.Classes.Eq (Data.Greskell.Graph.Key a b)
instance GHC.Show.Show (Data.Greskell.Graph.Key a b)
instance Data.Greskell.Graph.Element Data.Greskell.Graph.AVertex
instance Data.Greskell.Graph.Vertex Data.Greskell.Graph.AVertex
instance Data.Greskell.GraphSON.GraphSONTyped.GraphSONTyped Data.Greskell.Graph.AVertex
instance Data.Aeson.Types.FromJSON.FromJSON Data.Greskell.Graph.AVertex
instance Data.Greskell.GraphSON.FromGraphSON Data.Greskell.Graph.AVertex
instance Data.Greskell.Graph.PropertyMap Data.Greskell.Graph.PropertyMapList
instance (Data.Greskell.Graph.Property p, Data.Greskell.GraphSON.GraphSONTyped.GraphSONTyped (p v), Data.Greskell.GraphSON.FromGraphSON (p v), Data.Greskell.Graph.FromGraphSONWithKey (p v)) => Data.Aeson.Types.FromJSON.FromJSON (Data.Greskell.Graph.PropertyMapList p v)
instance (Data.Greskell.Graph.Property p, Data.Greskell.GraphSON.GraphSONTyped.GraphSONTyped (p v), Data.Greskell.GraphSON.FromGraphSON (p v), Data.Greskell.Graph.FromGraphSONWithKey (p v)) => Data.Greskell.GraphSON.FromGraphSON (Data.Greskell.Graph.PropertyMapList p v)
instance Data.Greskell.Graph.Element Data.Greskell.Graph.AEdge
instance Data.Greskell.Graph.Edge Data.Greskell.Graph.AEdge
instance Data.Greskell.GraphSON.GraphSONTyped.GraphSONTyped Data.Greskell.Graph.AEdge
instance Data.Aeson.Types.FromJSON.FromJSON Data.Greskell.Graph.AEdge
instance Data.Greskell.GraphSON.FromGraphSON Data.Greskell.Graph.AEdge
instance Data.Greskell.GraphSON.FromGraphSON v => Data.Aeson.Types.FromJSON.FromJSON (Data.Greskell.Graph.AVertexProperty v)
instance Data.Greskell.GraphSON.FromGraphSON v => Data.Greskell.GraphSON.FromGraphSON (Data.Greskell.Graph.AVertexProperty v)
instance Data.Greskell.GraphSON.FromGraphSON v => Data.Greskell.Graph.FromGraphSONWithKey (Data.Greskell.Graph.AVertexProperty v)
instance Data.Greskell.GraphSON.GraphSONTyped.GraphSONTyped (Data.Greskell.Graph.AVertexProperty v)
instance Data.Greskell.Graph.Element (Data.Greskell.Graph.AVertexProperty v)
instance Data.Greskell.Graph.Property Data.Greskell.Graph.AVertexProperty
instance GHC.Base.Functor Data.Greskell.Graph.AVertexProperty
instance Data.Foldable.Foldable Data.Greskell.Graph.AVertexProperty
instance Data.Traversable.Traversable Data.Greskell.Graph.AVertexProperty
instance Data.Greskell.Graph.PropertyMap Data.Greskell.Graph.PropertyMapSingle
instance (Data.Greskell.Graph.Property p, Data.Greskell.GraphSON.GraphSONTyped.GraphSONTyped (p v), Data.Greskell.GraphSON.FromGraphSON (p v), Data.Greskell.Graph.FromGraphSONWithKey (p v)) => Data.Aeson.Types.FromJSON.FromJSON (Data.Greskell.Graph.PropertyMapSingle p v)
instance (Data.Greskell.Graph.Property p, Data.Greskell.GraphSON.GraphSONTyped.GraphSONTyped (p v), Data.Greskell.GraphSON.FromGraphSON (p v), Data.Greskell.Graph.FromGraphSONWithKey (p v)) => Data.Greskell.GraphSON.FromGraphSON (Data.Greskell.Graph.PropertyMapSingle p v)
instance GHC.Base.Semigroup (t (p v)) => GHC.Base.Semigroup (Data.Greskell.Graph.PropertyMapGeneric t p v)
instance GHC.Base.Semigroup (t (p v)) => GHC.Base.Monoid (Data.Greskell.Graph.PropertyMapGeneric t p v)
instance (GHC.Base.Functor t, GHC.Base.Functor p) => GHC.Base.Functor (Data.Greskell.Graph.PropertyMapGeneric t p)
instance (Data.Foldable.Foldable t, Data.Foldable.Foldable p) => Data.Foldable.Foldable (Data.Greskell.Graph.PropertyMapGeneric t p)
instance (Data.Traversable.Traversable t, Data.Traversable.Traversable p) => Data.Traversable.Traversable (Data.Greskell.Graph.PropertyMapGeneric t p)
instance Data.Greskell.GraphSON.FromGraphSON v => Data.Aeson.Types.FromJSON.FromJSON (Data.Greskell.Graph.AProperty v)
instance Data.Greskell.GraphSON.FromGraphSON v => Data.Greskell.GraphSON.FromGraphSON (Data.Greskell.Graph.AProperty v)
instance Data.Greskell.GraphSON.FromGraphSON v => Data.Greskell.Graph.FromGraphSONWithKey (Data.Greskell.Graph.AProperty v)
instance Data.Greskell.Graph.Property Data.Greskell.Graph.AProperty
instance Data.Greskell.GraphSON.GraphSONTyped.GraphSONTyped (Data.Greskell.Graph.AProperty v)
instance GHC.Base.Functor Data.Greskell.Graph.AProperty
instance Data.Foldable.Foldable Data.Greskell.Graph.AProperty
instance Data.Traversable.Traversable Data.Greskell.Graph.AProperty
instance GHC.Base.Functor (Data.Greskell.Graph.Key a)
instance Data.String.IsString (Data.Greskell.Graph.Key a b)
instance Data.Greskell.Greskell.ToGreskell (Data.Greskell.Graph.Key a b)
instance Data.Greskell.GraphSON.GraphSONTyped.GraphSONTyped (Data.Greskell.Graph.T a b)


-- | This modules defines types and functions for utility classes in
--   Gremlin.
module Data.Greskell.Gremlin

-- | <tt>java.util.function.Predicate</tt> interface.
--   
--   A <a>Predicate</a> <tt>p</tt> is a function that takes
--   <a>PredicateArg</a> <tt>p</tt> and returns <a>Bool</a>.
class Predicate p where {
    type family PredicateArg p;
}

-- | <tt>.and</tt> method.
pAnd :: Predicate p => Greskell p -> Greskell p -> Greskell p

-- | <tt>.or</tt> method.
pOr :: Predicate p => Greskell p -> Greskell p -> Greskell p

-- | <tt>.test</tt> method.
pTest :: Predicate p => Greskell p -> Greskell (PredicateArg p) -> Greskell Bool

-- | <tt>.nagate</tt> method.
pNegate :: Predicate p => Greskell p -> Greskell p

-- | Type for anonymous class of <tt>Predicate</tt> interface.
newtype PredicateA a
PredicateA :: a -> Bool -> PredicateA a
[unPredicateA] :: PredicateA a -> a -> Bool

-- | <tt>org.apache.tinkerpop.gremlin.process.traversal.P</tt> class.
--   
--   <tt>P a</tt> keeps data of type <tt>a</tt> and compares it with data
--   of type <tt>a</tt> given as the Predicate argument.
data P a

-- | <tt>P.not</tt> static method.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin $ pNot $ pEq $ number 10
--   "P.not(P.eq(10.0))"
--   </pre>
pNot :: Greskell (P a) -> Greskell (P a)

-- | <tt>P.eq</tt> static method.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin $ pEq $ string "hoge"
--   "P.eq(\"hoge\")"
--   </pre>
pEq :: Greskell a -> Greskell (P a)

-- | <tt>P.neq</tt> static method.
pNeq :: Greskell a -> Greskell (P a)

-- | <tt>P.lt</tt> static method.
pLt :: Greskell a -> Greskell (P a)

-- | <tt>P.lte</tt> static method.
pLte :: Greskell a -> Greskell (P a)

-- | <tt>P.gt</tt> static method.
pGt :: Greskell a -> Greskell (P a)

-- | <tt>P.gte</tt> static method.
pGte :: Greskell a -> Greskell (P a)

-- | <tt>P.inside</tt> static method.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin $ pInside (number 10) (number 20)
--   "P.inside(10.0,20.0)"
--   </pre>
pInside :: Greskell a -> Greskell a -> Greskell (P a)

-- | <tt>P.outside</tt> static method.
pOutside :: Greskell a -> Greskell a -> Greskell (P a)

-- | <tt>P.between</tt> static method.
pBetween :: Greskell a -> Greskell a -> Greskell (P a)

-- | <tt>P.within</tt> static method.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin $ pWithin (["foo", "bar", "hoge"] :: [Greskell String])
--   "P.within(\"foo\",\"bar\",\"hoge\")"
--   </pre>
pWithin :: [Greskell a] -> Greskell (P a)

-- | <tt>P.without</tt> static method.
pWithout :: [Greskell a] -> Greskell (P a)

-- | <tt>java.util.Comparator</tt> interface.
--   
--   <a>Comparator</a> compares two data of type <a>CompareArg</a>
--   <tt>c</tt>.
class Comparator c where {
    type family CompareArg c;
}

-- | <tt>.compare</tt> method.
cCompare :: Comparator c => Greskell c -> Greskell (CompareArg c) -> Greskell (CompareArg c) -> Greskell Int

-- | <tt>.reverse</tt> method.
cReversed :: Comparator c => Greskell c -> Greskell c

-- | <tt>.thenComparing</tt> method.
cThenComparing :: Comparator c => Greskell c -> Greskell c -> Greskell c

-- | Type for anonymous class of <tt>Comparator</tt> interface.
newtype ComparatorA a
ComparatorA :: a -> a -> Int -> ComparatorA a
[unComparatorA] :: ComparatorA a -> a -> a -> Int

-- | <tt>org.apache.tinkerpop.gremlin.process.traversal.Order</tt> enum.
data Order a

-- | <tt>decr</tt> order.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin oDecr
--   "Order.decr"
--   </pre>
oDecr :: Greskell (Order a)

-- | <tt>incr</tt> order.
oIncr :: Greskell (Order a)

-- | <tt>shuffle</tt> order.
oShuffle :: Greskell (Order a)
instance Data.Greskell.Gremlin.Comparator (Data.Greskell.Gremlin.Order a)
instance Data.Greskell.GraphSON.GraphSONTyped.GraphSONTyped (Data.Greskell.Gremlin.Order a)
instance Data.Greskell.Gremlin.Comparator (Data.Greskell.Gremlin.ComparatorA a)
instance Data.Greskell.Gremlin.Predicate (Data.Greskell.Gremlin.P a)
instance Data.Greskell.GraphSON.GraphSONTyped.GraphSONTyped (Data.Greskell.Gremlin.P a)
instance Data.Greskell.Gremlin.Predicate (Data.Greskell.Gremlin.PredicateA a)


-- | This module defines <a>GTraversal</a>, greskell counterpart of
--   <tt>GraphTraversal</tt> class object, and a DSL of composing graph
--   traversal steps.
module Data.Greskell.GTraversal

-- | <tt>GraphTraversal</tt> class object of TinkerPop. It takes data
--   <tt>s</tt> from upstream and emits data <tt>e</tt> to downstream. Type
--   <tt>c</tt> is called "walk type", a marker to describe the effect of
--   the traversal.
--   
--   <a>GTraversal</a> is NOT a <a>Category</a>. Because a
--   <tt>GraphTraversal</tt> object keeps some context data, the starting
--   (left-most) <tt>GraphTraversal</tt> object controls most of the
--   behavior of entire composition of traversals and steps. This violates
--   <a>Category</a> law.
newtype GTraversal c s e
GTraversal :: Greskell (GraphTraversal c s e) -> GTraversal c s e
[unGTraversal] :: GTraversal c s e -> Greskell (GraphTraversal c s e)

-- | Phantom type for <tt>GraphTraversal</tt> class. In greskell, we
--   usually use <a>GTraversal</a> instead of <a>Greskell</a>
--   <a>GraphTraversal</a>.
data GraphTraversal c s e

-- | Types that can convert to <a>GTraversal</a>.
class ToGTraversal g
toGTraversal :: (ToGTraversal g, WalkType c) => g c s e -> GTraversal c s e

-- | Lift <a>WalkType</a> <tt>from</tt> to <tt>to</tt>. Use this for type
--   matching.
liftWalk :: (ToGTraversal g, WalkType from, WalkType to, Lift from to) => g from s e -> g to s e

-- | A chain of one or more Gremlin steps. Like <a>GTraversal</a>, type
--   <tt>s</tt> is the input, type <tt>e</tt> is the output, and type
--   <tt>c</tt> is a marker to describe the step.
--   
--   <a>Walk</a> represents a chain of method calls such as
--   <tt>.has(x).outE()</tt>. Because this is not a Gremlin (Groovy)
--   expression, we use bare <a>Walk</a>, not <a>Greskell</a> <a>Walk</a>.
--   
--   <a>Walk</a> is a <a>Category</a>. You can use functions from
--   <a>Control.Category</a> to compose <a>Walk</a>s. This is equivalent to
--   making a chain of method calls in Gremlin.
--   
--   <a>Walk</a> is not an <a>Eq</a>, because it's difficult to define true
--   equality between Gremlin method calls. If we define it naively, it
--   might have conflict with <a>Category</a> law.
data Walk c s e

-- | <tt>GraphTraversalSource</tt> class object of TinkerPop. It is a
--   factory object of <a>GraphTraversal</a>s.
data GraphTraversalSource

-- | Class of phantom type markers to describe the effect of the
--   walk/traversals.
class WalkType t

-- | WalkType 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 <a>Walk</a> <tt>w</tt> is <a>Filter</a> type iff:
--   
--   <pre>
--   (gSideEffect w == gIdentity) AND (gFilter w == w)
--   </pre>
--   
--   If <a>Walk</a>s <tt>w1</tt> and <tt>w2</tt> are <a>Filter</a> type,
--   then
--   
--   <pre>
--   gAnd [w1, w2] == w1 &gt;&gt;&gt; w2 == w2 &gt;&gt;&gt; w1
--   </pre>
data Filter

-- | WalkType for steps without any side-effects. This includes
--   transformations, reordring, injections and graph traversal actions.
--   
--   A <a>Walk</a> <tt>w</tt> is <a>Transform</a> type iff:
--   
--   <pre>
--   gSideEffect w == gIdentity
--   </pre>
--   
--   Obviously, every <a>Filter</a> type <a>Walk</a>s are also
--   <a>Transform</a> type.
data Transform

-- | 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.
--   
--   For example, the following steps (in Gremlin) all have side-effects.
--   
--   <pre>
--   .addE('label')
--   .aggregate('x')
--   .sideEffect(System.out.&amp;println)
--   .map { some_variable += 1 }
--   </pre>
data SideEffect

-- | Relation of <a>WalkType</a>s where one includes the other.
--   <tt>from</tt> can be lifted to <tt>to</tt>, because <tt>to</tt> is
--   more powerful than <tt>from</tt>.
class Lift from to

-- | Relation of <a>WalkType</a>s where the child walk <tt>c</tt> is split
--   from the parent walk <tt>p</tt>.
--   
--   When splitting, transformation effect done in the child walk is rolled
--   back (canceled) in the parent walk.
class Split c p

-- | Create <a>GraphTraversalSource</a> from a varible name in Gremlin
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin $ source "g"
--   "g"
--   </pre>
source :: Text -> Greskell GraphTraversalSource

-- | <tt>.V()</tt> method on <a>GraphTraversalSource</a>.
sV :: Vertex v => [Greskell (ElementID v)] -> Greskell GraphTraversalSource -> GTraversal Transform () v

-- | Monomorphic version of <a>sV</a>.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' (map gvalueInt ([1,2,3] :: [Int])))
--   "g.V(1,2,3)"
--   </pre>
sV' :: [Greskell GValue] -> Greskell GraphTraversalSource -> GTraversal Transform () AVertex

-- | <tt>.E()</tt> method on <a>GraphTraversalSource</a>.
sE :: Edge e => [Greskell (ElementID e)] -> Greskell GraphTraversalSource -> GTraversal Transform () e

-- | Monomorphic version of <a>sE</a>.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sE' (map gvalueInt ([1] :: [Int])))
--   "g.E(1)"
--   </pre>
sE' :: [Greskell GValue] -> Greskell GraphTraversalSource -> GTraversal Transform () AEdge

-- | <tt>.addV()</tt> method on <a>GraphTraversalSource</a>.
sAddV :: Vertex v => Greskell Text -> Greskell GraphTraversalSource -> GTraversal SideEffect () v

-- | Monomorphic version of <a>sAddV</a>.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sAddV' "person")
--   "g.addV(\"person\")"
--   </pre>
sAddV' :: Greskell Text -> Greskell GraphTraversalSource -> GTraversal SideEffect () AVertex

-- | Apply the <a>Walk</a> to the <a>GTraversal</a>. In Gremlin, this means
--   calling a chain of methods on the Traversal object.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gValues ["age"])
--   "g.V().values(\"age\")"
--   </pre>
(&.) :: GTraversal c a b -> Walk c b d -> GTraversal c a d
infixl 1 &.

-- | Same as <a>&amp;.</a> with arguments flipped.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (gValues ["age"] $. sV' [] $ source "g")
--   "g.V().values(\"age\")"
--   </pre>
($.) :: Walk c b d -> GTraversal c a b -> GTraversal c a d
infixr 0 $.

-- | Unsafely create <a>GTraversal</a> from the given raw Gremlin script.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin $ unsafeGTraversal "g.V().count()"
--   "g.V().count()"
--   </pre>
unsafeGTraversal :: Text -> GTraversal c s e

-- | Unsafely create a <a>Walk</a> that represents a single method call on
--   a <tt>GraphTraversal</tt>.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. unsafeWalk "valueMap" ["'foo'", "'bar'"])
--   "g.V().valueMap('foo','bar')"
--   </pre>
unsafeWalk :: WalkType c => Text -> [Text] -> Walk c s e

-- | Optionally modulate the main <a>Walk</a> with some modulating
--   <a>Walk</a>s.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. modulateWith (unsafeWalk "path" []) [unsafeWalk "by" ["'name'"], unsafeWalk "by" ["'age'"]])
--   "g.V().path().by('name').by('age')"
--   </pre>
modulateWith :: (WalkType c) => Walk c s e -> [Walk c e e] -> Walk c s e

-- | <tt>.identity</tt> step.
gIdentity :: WalkType c => Walk c s s

-- | Monomorphic version of <a>gIdentity</a>.
gIdentity' :: Walk Filter s s

-- | <tt>.filter</tt> step that takes a traversal.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gFilter (gOut' ["knows"]))
--   "g.V().filter(__.out(\"knows\"))"
--   </pre>
gFilter :: (ToGTraversal g, WalkType c, WalkType p, Split c p) => g c s e -> Walk p s s

-- | <tt>.has</tt> step with one argument.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gHas1 "age")
--   "g.V().has(\"age\")"
--   </pre>
gHas1 :: (WalkType c, Element s) => Key s v -> Walk c s s

-- | Monomorphic version of <a>gHas1</a>.
gHas1' :: (Element s) => Key s v -> Walk Filter s s

-- | <tt>.has</tt> step with two arguments.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gHas2 "age" (31 :: Greskell Int))
--   "g.V().has(\"age\",31)"
--   </pre>
gHas2 :: (WalkType c, Element s) => Key s v -> Greskell v -> Walk c s s

-- | Monomorphic verson of <a>gHas2</a>.
gHas2' :: (Element s) => Key s v -> Greskell v -> Walk Filter s s

-- | <tt>.has</tt> step with two arguments and <a>P</a> type.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gHas2P "age" (pBetween (30 :: Greskell Int) 40))
--   "g.V().has(\"age\",P.between(30,40))"
--   </pre>
gHas2P :: (WalkType c, Element s) => Key s v -> Greskell (P v) -> Walk c s s

-- | Monomorphic version of <a>gHas2P</a>.
gHas2P' :: (Element s) => Key s v -> Greskell (P v) -> Walk Filter s s

-- | <tt>.hasLabel</tt> step.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gHasLabel "person")
--   "g.V().hasLabel(\"person\")"
--   </pre>
gHasLabel :: (Element s, WalkType c) => Greskell Text -> Walk c s s

-- | Monomorphic version of <a>gHasLabel</a>.
gHasLabel' :: (Element s) => Greskell Text -> Walk Filter s s

-- | <tt>.hasLabel</tt> step with <a>P</a> type. Supported since TinkerPop
--   3.2.7.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gHasLabelP (pEq "person"))
--   "g.V().hasLabel(P.eq(\"person\"))"
--   </pre>
gHasLabelP :: (Element s, WalkType c) => Greskell (P Text) -> Walk c s s

-- | Monomorphic version of <a>gHasLabelP</a>.
gHasLabelP' :: Element s => Greskell (P Text) -> Walk Filter s s

-- | <tt>.hasId</tt> step.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gHasId (gvalueInt $ (7 :: Int)))
--   "g.V().hasId(7)"
--   </pre>
gHasId :: (Element s, WalkType c) => Greskell (ElementID s) -> Walk c s s

-- | Monomorphic version of <a>gHasId</a>.
gHasId' :: Element s => Greskell (ElementID s) -> Walk Filter s s

-- | <tt>.hasId</tt> step with <a>P</a> type. Supported since TinkerPop
--   3.2.7.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gHasIdP (pLte $ gvalueInt (100 :: Int)))
--   "g.V().hasId(P.lte(100))"
--   </pre>
gHasIdP :: (Element s, WalkType c) => Greskell (P (ElementID s)) -> Walk c s s

-- | Monomorphic version of <a>gHasIdP</a>.
gHasIdP' :: Element s => Greskell (P (ElementID s)) -> Walk Filter s s

-- | <tt>.hasKey</tt> step. The input type should be a VertexProperty.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gProperties [] &amp;. gHasKey "age")
--   "g.V().properties().hasKey(\"age\")"
--   </pre>
gHasKey :: (Element (p v), Property p, WalkType c) => Greskell Text -> Walk c (p v) (p v)

-- | Monomorphic version of <a>gHasKey</a>.
gHasKey' :: (Element (p v), Property p) => Greskell Text -> Walk Filter (p v) (p v)

-- | <tt>.hasKey</tt> step with <a>P</a> type. Supported since TinkerPop
--   3.2.7.
gHasKeyP :: (Element (p v), Property p, WalkType c) => Greskell (P Text) -> Walk c (p v) (p v)

-- | Monomorphic version of <a>gHasKeyP</a>.
gHasKeyP' :: (Element (p v), Property p) => Greskell (P Text) -> Walk Filter (p v) (p v)

-- | <tt>.hasValue</tt> step. The input type should be a VertexProperty.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gProperties ["age"] &amp;. gHasValue (32 :: Greskell Int))
--   "g.V().properties(\"age\").hasValue(32)"
--   </pre>
gHasValue :: (Element (p v), Property p, WalkType c) => Greskell v -> Walk c (p v) (p v)

-- | Monomorphic version of <a>gHasValue</a>.
gHasValue' :: (Element (p v), Property p) => Greskell v -> Walk Filter (p v) (p v)

-- | <tt>.hasValue</tt> step with <a>P</a> type. Supported since TinkerPop
--   3.2.7.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gProperties ["age"] &amp;. gHasValueP (pBetween (30 :: Greskell Int) 40))
--   "g.V().properties(\"age\").hasValue(P.between(30,40))"
--   </pre>
gHasValueP :: (Element (p v), Property p, WalkType c) => Greskell (P v) -> Walk c (p v) (p v)

-- | Monomorphic version of <a>gHasValueP</a>.
gHasValueP' :: (Element (p v), Property p) => Greskell (P v) -> Walk Filter (p v) (p v)

-- | <tt>.and</tt> step.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gAnd [gOut' ["knows"], gHas1 "age"])
--   "g.V().and(__.out(\"knows\"),__.has(\"age\"))"
--   </pre>
gAnd :: (ToGTraversal g, WalkType c, WalkType p, Split c p) => [g c s e] -> Walk p s s

-- | <tt>.or</tt> step.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gOr [gOut' ["knows"], gHas1 "age"])
--   "g.V().or(__.out(\"knows\"),__.has(\"age\"))"
--   </pre>
gOr :: (ToGTraversal g, WalkType c, WalkType p, Split c p) => [g c s e] -> Walk p s s

-- | <tt>.not</tt> step.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gNot (gOut' ["knows"]))
--   "g.V().not(__.out(\"knows\"))"
--   </pre>
gNot :: (ToGTraversal g, WalkType c, WalkType p, Split c p) => g c s e -> Walk p s s

-- | <tt>.order</tt> step.
--   
--   <pre>
--   &gt;&gt;&gt; let key_age = ("age" :: Key AVertex Int)
--   
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gOrder [gBy1 key_age])
--   "g.V().order().by(\"age\")"
--   
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gOrder [gBy2 key_age oDecr, gBy1 tId])
--   "g.V().order().by(\"age\",Order.decr).by(T.id)"
--   
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gOrder [gBy2 (gOut' ["knows"] &gt;&gt;&gt; gCount) oIncr, gBy2 tId oIncr])
--   "g.V().order().by(__.out(\"knows\").count(),Order.incr).by(T.id,Order.incr)"
--   </pre>
--   
--   <a>ByComparator</a> is an <a>IsString</a>, meaning projection by the
--   given key.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gOrder ["age"])
--   "g.V().order().by(\"age\")"
--   </pre>
gOrder :: [ByComparator s] -> Walk Transform s s

-- | <tt>.range</tt> step. This step is not a <a>Filter</a>, because the
--   filtering decision by this step is based on position of each element,
--   not the element itself. This violates <a>Filter</a> law.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gRange 0 100)
--   "g.V().range(0,100)"
--   </pre>
gRange :: Greskell Int -> Greskell Int -> Walk Transform s s

-- | <tt>.flatMap</tt> step.
--   
--   <tt>.flatMap</tt> step is a <a>Transform</a> step even if the child
--   walk is <a>Filter</a> type. This is because <tt>.flatMap</tt> step
--   always modifies the path of the Traverser.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gFlatMap (gOut' ["knows"] &gt;&gt;&gt; gOut' ["created"]))
--   "g.V().flatMap(__.out(\"knows\").out(\"created\"))"
--   </pre>
gFlatMap :: (ToGTraversal g) => g Transform s e -> Walk Transform s e

-- | <tt>.V</tt> step.
--   
--   For each input item, <tt>.V</tt> step emits vertices selected by the
--   argument (or all vertices if the empty list is passed.)
gV :: Vertex v => [Greskell (ElementID v)] -> Walk Transform s v

-- | Monomorphic version of <a>gV</a>.
gV' :: [Greskell GValue] -> Walk Transform s AVertex

-- | <tt>.values</tt> step.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gValues ["name", "age"])
--   "g.V().values(\"name\",\"age\")"
--   </pre>
gValues :: Element s => [Key s e] -> Walk Transform s e

-- | <tt>.properties</tt> step.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gProperties ["age"])
--   "g.V().properties(\"age\")"
--   </pre>
gProperties :: (Element s, Property p, ElementProperty s ~ p) => [Key s v] -> Walk Transform s (p v)

-- | <tt>.fold</tt> step.
gFold :: Walk Transform a [a]

-- | <tt>.count</tt> step.
gCount :: Walk Transform a Int

-- | <tt>.out</tt> step
gOut :: (Vertex v1, Vertex v2) => [Greskell Text] -> Walk Transform v1 v2

-- | Monomorphic version of <a>gOut</a>.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [gvalueInt (8 :: Int)] &amp;. gOut' ["knows"])
--   "g.V(8).out(\"knows\")"
--   </pre>
gOut' :: (Vertex v) => [Greskell Text] -> Walk Transform v AVertex

-- | <tt>.outE</tt> step
gOutE :: (Vertex v, Edge e) => [Greskell Text] -> Walk Transform v e

-- | Monomorphic version of <a>gOutE</a>
gOutE' :: (Vertex v) => [Greskell Text] -> Walk Transform v AEdge

-- | <tt>.in</tt> step
gIn :: (Vertex v1, Vertex v2) => [Greskell Text] -> Walk Transform v1 v2

-- | Monomorphic version of <a>gIn</a>.
gIn' :: (Vertex v) => [Greskell Text] -> Walk Transform v AVertex

-- | <tt>.inE</tt> step.
gInE :: (Vertex v, Edge e) => [Greskell Text] -> Walk Transform v e

-- | Monomorphic version of <a>gInE</a>.
gInE' :: (Vertex v) => [Greskell Text] -> Walk Transform v AEdge

-- | <tt>.sideEffect</tt> step that takes a traversal.
gSideEffect :: (ToGTraversal g, WalkType c, WalkType p, Split c p) => g c s e -> Walk p s s

-- | Monomorphic version of <a>gSideEffect</a>. The result walk is always
--   <a>SideEffect</a> type.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp; liftWalk &amp;. gHas2 "name" "marko" &amp;. gSideEffect' (gAddV' "toshio"))
--   "g.V().has(\"name\",\"marko\").sideEffect(__.addV(\"toshio\"))"
--   </pre>
gSideEffect' :: (ToGTraversal g, WalkType c, Split c SideEffect) => g c s e -> Walk SideEffect s s

-- | <tt>.addV</tt> step with a label.
gAddV :: Vertex v => Greskell Text -> Walk SideEffect a v

-- | Monomorphic version of <a>gAddV</a>.
gAddV' :: Greskell Text -> Walk SideEffect a AVertex

-- | <tt>.addE</tt> step. Supported since TinkerPop 3.1.0.
--   
--   <pre>
--   &gt;&gt;&gt; let key_name = "name" :: Key AVertex Text
--   
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp; liftWalk &amp;. gAddE' "knows" (gFrom $ gV' [] &gt;&gt;&gt; gHas2 key_name "marko"))
--   "g.V().addE(\"knows\").from(__.V().has(\"name\",\"marko\"))"
--   
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gHas2 key_name "marko" &amp; liftWalk &amp;. gAddE' "knows" (gTo $ gV' []))
--   "g.V().has(\"name\",\"marko\").addE(\"knows\").to(__.V())"
--   </pre>
gAddE :: (Vertex vs, Vertex ve, Edge e) => Greskell Text -> AddAnchor vs ve -> Walk SideEffect vs e

-- | Monomorphic version of <a>gAddE</a>
gAddE' :: Greskell Text -> AddAnchor AVertex AVertex -> Walk SideEffect AVertex AEdge

-- | Vertex anchor for <a>gAddE</a>. It corresponds to <tt>.from</tt> or
--   <tt>.to</tt> step following an <tt>.addE</tt> step.
--   
--   Type <tt>s</tt> is the input Vertex for the <tt>.addE</tt> step. Type
--   <tt>e</tt> is the type of the anchor Vertex that the <a>AddAnchor</a>
--   yields. So, <tt>.addE</tt> step creates an edge between <tt>s</tt> and
--   <tt>e</tt>.
data AddAnchor s e

-- | <tt>.from</tt> step with a traversal.
gFrom :: (ToGTraversal g) => g Transform s e -> AddAnchor s e

-- | <tt>.to</tt> step with a traversal.
gTo :: (ToGTraversal g) => g Transform s e -> AddAnchor s e

-- | <tt>.drop</tt> step on <a>Element</a>.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp;. gHas2 "name" "marko" &amp; liftWalk &amp;. gDrop)
--   "g.V().has(\"name\",\"marko\").drop()"
--   </pre>
gDrop :: Element e => Walk SideEffect e e

-- | <tt>.drop</tt> step on <a>Property</a>.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sE' [] &amp;. gProperties ["weight"] &amp; liftWalk &amp;. gDropP)
--   "g.E().properties(\"weight\").drop()"
--   </pre>
gDropP :: Property p => Walk SideEffect (p a) (p a)

-- | simple <tt>.property</tt> step. It adds a value to the property.
--   
--   <pre>
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp; liftWalk &amp;. gProperty "age" (20 :: Greskell Int))
--   "g.V().property(\"age\",20)"
--   </pre>
gProperty :: Element e => Key e v -> Greskell v -> Walk SideEffect e e

-- | <tt>.property</tt> step for <a>Vertex</a>.
--   
--   <pre>
--   &gt;&gt;&gt; let key_location = "location" :: Key AVertex Text
--   
--   &gt;&gt;&gt; let key_since = "since" :: Key (AVertexProperty Text) Text
--   
--   &gt;&gt;&gt; let key_score = "score" :: Key (AVertexProperty Text) Int
--   
--   &gt;&gt;&gt; toGremlin (source "g" &amp; sV' [] &amp; liftWalk &amp;. gPropertyV (Just cList) key_location "New York" [key_since =: "2012-09-23", key_score =: 8])
--   "g.V().property(list,\"location\",\"New York\",\"since\",\"2012-09-23\",\"score\",8)"
--   </pre>
gPropertyV :: (Vertex e, vp ~ ElementProperty e, Property vp, Element (vp v)) => Maybe (Greskell Cardinality) -> Key e v -> Greskell v -> [KeyValue (vp v)] -> Walk SideEffect e e

-- | Projection from type <tt>s</tt> to type <tt>e</tt> used in
--   <tt>.by</tt> step. You can also use <a>gBy</a> to construct
--   <a>ByProjection</a>.
data ByProjection s e
[ByProjection] :: (ProjectionLike p, ToGreskell p) => p -> ByProjection (ProjectionLikeStart p) (ProjectionLikeEnd p)

-- | Data types that mean a projection from one type to another.
class ProjectionLike p where {
    type family ProjectionLikeStart p;
    type family ProjectionLikeEnd p;
}

-- | Comparison of type <tt>s</tt> used in <tt>.by</tt> step. You can also
--   use <a>gBy1</a> and <a>gBy2</a> to construct <a>ByComparator</a>.
data ByComparator s

-- | Type <tt>s</tt> is projected to type <tt>e</tt>, and compared by the
--   natural comparator of type <tt>e</tt>.
[ByComparatorProj] :: ByProjection s e -> ByComparator s

-- | Type <tt>s</tt> is compared by the <a>Comparator</a> <tt>comp</tt>.
[ByComparatorComp] :: Comparator comp => Greskell comp -> ByComparator (CompareArg comp)

-- | Type <tt>s</tt> is projected to type <tt>CompareArg comp</tt>, and
--   compared by the <a>Comparator</a> <tt>comp</tt>.
[ByComparatorProjComp] :: Comparator comp => ByProjection s (CompareArg comp) -> Greskell comp -> ByComparator s

-- | <tt>.by</tt> step with 1 argument, used for projection.
gBy :: (ProjectionLike p, ToGreskell p) => p -> ByProjection (ProjectionLikeStart p) (ProjectionLikeEnd p)

-- | <tt>.by</tt> step with 1 argument, used for comparison.
gBy1 :: (ProjectionLike p, ToGreskell p) => p -> ByComparator (ProjectionLikeStart p)

-- | <tt>.by</tt> step with 2 arguments, used for comparison.
gBy2 :: (ProjectionLike p, ToGreskell p, Comparator comp, ProjectionLikeEnd p ~ CompareArg comp) => p -> Greskell comp -> ByComparator (ProjectionLikeStart p)
instance GHC.Show.Show Data.Greskell.GTraversal.GraphTraversalSource
instance GHC.Show.Show (Data.Greskell.GTraversal.Walk c s e)
instance GHC.Show.Show (Data.Greskell.GTraversal.GTraversal c s e)
instance GHC.Show.Show (Data.Greskell.GTraversal.GraphTraversal c s e)
instance Data.String.IsString (Data.Greskell.GTraversal.ByComparator s)
instance Data.Greskell.GTraversal.ProjectionLike (Data.Greskell.GTraversal.ByProjection s e)
instance Data.String.IsString (Data.Greskell.GTraversal.ByProjection s e)
instance Data.Greskell.GTraversal.ProjectionLike (Data.Greskell.GTraversal.Walk Data.Greskell.GTraversal.Filter s e)
instance Data.Greskell.GTraversal.ProjectionLike (Data.Greskell.GTraversal.GTraversal Data.Greskell.GTraversal.Filter s e)
instance Data.Greskell.GTraversal.ProjectionLike (Data.Greskell.Greskell.Greskell (Data.Greskell.GTraversal.GraphTraversal Data.Greskell.GTraversal.Filter s e))
instance Data.Greskell.GTraversal.ProjectionLike (Data.Greskell.GTraversal.Walk Data.Greskell.GTraversal.Transform s e)
instance Data.Greskell.GTraversal.ProjectionLike (Data.Greskell.GTraversal.GTraversal Data.Greskell.GTraversal.Transform s e)
instance Data.Greskell.GTraversal.ProjectionLike (Data.Greskell.Greskell.Greskell (Data.Greskell.GTraversal.GraphTraversal Data.Greskell.GTraversal.Transform s e))
instance Data.Greskell.GTraversal.ProjectionLike (Data.Greskell.Graph.Key s e)
instance Data.Greskell.GTraversal.ProjectionLike (Data.Greskell.Greskell.Greskell (Data.Greskell.Graph.T s e))
instance Data.Greskell.GTraversal.ProjectionLike (Data.Greskell.Greskell.Greskell (s -> e))
instance Data.Greskell.GTraversal.WalkType p => Data.Greskell.GTraversal.Split Data.Greskell.GTraversal.Filter p
instance Data.Greskell.GTraversal.WalkType p => Data.Greskell.GTraversal.Split Data.Greskell.GTraversal.Transform p
instance Data.Greskell.GTraversal.Split Data.Greskell.GTraversal.SideEffect Data.Greskell.GTraversal.SideEffect
instance Data.Greskell.GTraversal.ToGTraversal Data.Greskell.GTraversal.GTraversal
instance Data.Greskell.GTraversal.ToGTraversal Data.Greskell.GTraversal.Walk
instance Data.Greskell.GTraversal.WalkType c => Data.Greskell.Greskell.ToGreskell (Data.Greskell.GTraversal.Walk c s e)
instance Data.Greskell.GTraversal.WalkType c => Data.Greskell.GTraversal.Lift Data.Greskell.GTraversal.Filter c
instance Data.Greskell.GTraversal.Lift Data.Greskell.GTraversal.Transform Data.Greskell.GTraversal.Transform
instance Data.Greskell.GTraversal.Lift Data.Greskell.GTraversal.Transform Data.Greskell.GTraversal.SideEffect
instance Data.Greskell.GTraversal.Lift Data.Greskell.GTraversal.SideEffect Data.Greskell.GTraversal.SideEffect
instance Data.Greskell.GTraversal.WalkType Data.Greskell.GTraversal.SideEffect
instance Data.Greskell.GTraversal.WalkType Data.Greskell.GTraversal.Transform
instance Data.Greskell.GTraversal.WalkType Data.Greskell.GTraversal.Filter
instance Data.Greskell.GTraversal.WalkType c => Control.Category.Category (Data.Greskell.GTraversal.Walk c)
instance Data.Greskell.GTraversal.WalkType c => GHC.Base.Semigroup (Data.Greskell.GTraversal.Walk c s s)
instance Data.Greskell.GTraversal.WalkType c => GHC.Base.Monoid (Data.Greskell.GTraversal.Walk c s s)
instance GHC.Base.Functor (Data.Greskell.GTraversal.Walk c s)
instance Data.Bifunctor.Bifunctor (Data.Greskell.GTraversal.Walk c)
instance GHC.Base.Functor (Data.Greskell.GTraversal.GTraversal c s)
instance Data.Bifunctor.Bifunctor (Data.Greskell.GTraversal.GTraversal c)
instance Data.Greskell.Greskell.ToGreskell (Data.Greskell.GTraversal.GTraversal c s e)
instance Data.Greskell.AsIterator.AsIterator (Data.Greskell.GTraversal.GraphTraversal c s e)
instance GHC.Base.Functor (Data.Greskell.GTraversal.GraphTraversal c s)
instance Data.Bifunctor.Bifunctor (Data.Greskell.GTraversal.GraphTraversal c)


-- | Data.Greskell is a Haskell support to use the Gremlin graph query
--   language. For more information, see <a>project README</a>.
module Data.Greskell
