diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,1372 @@
+# Hydra changelog
+
+All notable changes to the Hydra project are documented in this file.
+
+This changelog tracks changes across all Hydra implementations
+(Haskell, Java, Python, Scala, TypeScript, Clojure, Common Lisp, Emacs Lisp, Scheme)
+and supporting infrastructure.
+
+The format is inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
+and [Apache TinkerPop](https://github.com/apache/tinkerpop/blob/master/CHANGELOG.asciidoc).
+
+Pre-1.0 versions are listed below.
+Untagged versions correspond to in-repository version bumps that were not pushed as Git tags or Hackage releases;
+they are documented here for completeness.
+
+---
+
+## [0.17.0] - 2026-07-01
+
+Major themes: first-class support for effects and I/O in the kernel, TypeScript and
+Scala reaching publishable parity with the other hosts, and continued maturation of
+the published-host build model.
+
+### Highlights
+
+- **Effects and I/O** ([#286](https://github.com/CategoricalData/hydra/issues/286),
+  [#288](https://github.com/CategoricalData/hydra/issues/288),
+  [#494](https://github.com/CategoricalData/hydra/issues/494)): a new `effect` variant
+  on `hydra.core.Type` for representing effectful computations; new kernel modules
+  `hydra.file` (`FilePath`, `FileType`, `FileStatus`, `FileExtension`), `hydra.time`
+  (`Timespec`), and `hydra.error.file`; new primitive libraries `hydra.lib.effects`,
+  `hydra.lib.files`, and `hydra.lib.text` with byte-level I/O; and a new
+  `EffectfulTestCase` mechanism so the common test suite can exercise effectful
+  primitives across hosts.
+- **TypeScript is a complete implementation**
+  ([#462](https://github.com/CategoricalData/hydra/issues/462)): self-hosts and passes
+  the common test suite, with a per-package npm publish pipeline
+  ([#492](https://github.com/CategoricalData/hydra/issues/492)).
+- **Scala publishing**: per-package Maven Central publish infrastructure
+  ([#491](https://github.com/CategoricalData/hydra/issues/491)).
+- **Published-host build model**: published mode now compiles the kernel from the
+  co-generated `dist/haskell` rather than Hackage, removing the need for a
+  `haskell=local` shim ([#500](https://github.com/CategoricalData/hydra/issues/500));
+  the oil-and-water principle and cold-build workflow for `dist/haskell` are documented
+  ([#376](https://github.com/CategoricalData/hydra/issues/376)).
+- **Kernel hygiene**: `uniqueLabel` (apostrophe suffixes) replaced by `chooseUniqueLabel`
+  (numeric suffixes) in `hydra.names`
+  ([#436](https://github.com/CategoricalData/hydra/issues/436)).
+
+### Implementations
+
+Eight hosts self-host and pass the common test suite across five families: Haskell,
+Java, Python, Scala, and the four Lisp dialects (Clojure, Common Lisp, Scheme, Emacs
+Lisp), with TypeScript now joining as a complete host/target. Go remains a "head bud"
+(the coder still has emission bugs and the head's runtime is largely placeholder; it
+does not yet host the test suite).
+
+### New Features
+
+- Translingual cross-reference convention for `doc` strings: doc-escape tags render to
+  each host's native doc syntax (Javadoc, Haddock, Sphinx, TSDoc)
+  ([#433](https://github.com/CategoricalData/hydra/issues/433)).
+- Neo4j JSON-artifact validation demo, exercised across Java, Python, Haskell, and
+  TypeScript ([#510](https://github.com/CategoricalData/hydra/issues/510)).
+
+### Improvements
+
+- The Java/Maven publish set now covers every official Hydra target language, one coder
+  package per implementation family
+  ([#468](https://github.com/CategoricalData/hydra/issues/468)).
+- JVM Maven artifact groups are bifurcated to `net.fortytwo.hydra.java` and
+  `net.fortytwo.hydra.scala`, so the Java and Scala (and future Clojure) publish sets
+  never collide on coordinates
+  ([#519](https://github.com/CategoricalData/hydra/issues/519)).
+- Host-specific third-party integrations (the former `bindings/` tree) are folded into
+  `overlay/`, unifying hand-written host-native source under one tree
+  ([#511](https://github.com/CategoricalData/hydra/issues/511)).
+- The coder de-parameterizes context and error types, simplifying generated coder
+  signatures ([#518](https://github.com/CategoricalData/hydra/issues/518)).
+- TypeScript-to-Java generation now emits the `hydra.lib.*` aggregate namespace
+  interfaces (`Maps`, `Strings`, etc.)
+  ([#499](https://github.com/CategoricalData/hydra/issues/499)).
+
+---
+
+## [0.16.1] - 2026-06-16
+
+Major themes: the first release built by bootstrapping from previously published
+packages, the first full 9 × 9 cross-implementation bootstrapping sweep, and
+published-package self-containment fixes for the artifacts that bootstrap rests on.
+
+### Highlights
+
+- **Bootstrap from published packages**: the build links the published 0.16.0 hosts
+  (Hackage / Maven Central / PyPI) and uses them to build the next version of Hydra,
+  resting on 0.16.0's forward-compatibility guarantees — the published-host consume
+  model with a `--local-host` shim, used for the first time in a release
+  ([#370](https://github.com/CategoricalData/hydra/issues/370)). 0.16.1 still builds
+  against **local** Haskell and Python hosts (`hostOverrides`), because the published
+  0.16.0 artifacts it would otherwise consume are the very ones being repaired below.
+- **First full 9 × 9 bootstrapping sweep** — every implementation generating every
+  other; dozens of cross-host issues surfaced and fixed
+  ([#409](https://github.com/CategoricalData/hydra/issues/409), ongoing).
+- **Published-package self-containment**: relocate each host's hand-written runtime
+  into `overlay/<lang>/hydra-kernel/` so it ships inside the published `hydra-kernel`
+  artifact — Python `hydra.python.util` into the wheel
+  ([#461](https://github.com/CategoricalData/hydra/issues/461),
+  [#472](https://github.com/CategoricalData/hydra/issues/472)) and the Haskell
+  authoring DSL + `Libraries`/`Terms` into the sdist
+  ([#473](https://github.com/CategoricalData/hydra/issues/473)). Generalized to a
+  uniform `overlay/ = transform(packages) + copy(overlay)` model across all hosts
+  ([#434](https://github.com/CategoricalData/hydra/issues/434)).
+- **Kernel self-containment via generated `hydra.lib.*` registries**: primitive
+  names are derived from generated `PrimitiveDefinition` def-modules rather than
+  hand-written name strings, in every host
+  ([#473](https://github.com/CategoricalData/hydra/issues/473)).
+- **In-memory encode/decode synthesis**: derived `hydra.{encode,decode}.*` modules
+  are synthesized at build time and excluded from `dist/`, with the synthesizer (not
+  inference) as the authority for their annotations
+  ([#448](https://github.com/CategoricalData/hydra/issues/448),
+  [#476](https://github.com/CategoricalData/hydra/issues/476)).
+- **Release hardening**: Apache source-release compliance (signed source archive,
+  LICENSE/NOTICE bundling, KEYS) ([#441](https://github.com/CategoricalData/hydra/issues/441)),
+  per-package publish orchestrators ([#449](https://github.com/CategoricalData/hydra/issues/449)),
+  and packaging-boundary verification gated in CI and at publish time
+  ([#472](https://github.com/CategoricalData/hydra/issues/472)).
+
+### New features
+
+- Published-host consume model wired through `bin/sync.sh` for all three hosts
+  (`--published-host` default, `--local-host` shim), with the version basis keyed
+  off `hydra.json` and the `VERSION` file retired
+  ([#370](https://github.com/CategoricalData/hydra/issues/370),
+  [#347](https://github.com/CategoricalData/hydra/issues/347)).
+- Java and Python coder DSL sources made the sole source of truth; the legacy
+  Haskell DSL copies were deleted and cross-package references resolve by name
+  ([#346](https://github.com/CategoricalData/hydra/issues/346)).
+- Per-host `verify-distribution.sh` self-containment gates (Haskell stages the
+  per-package trio and `stack build`s it; Python installs the wheels into an
+  isolated venv and imports the kernel modules; Java resolves the published jars
+  from an offline consumer), run in CI and as a hard gate in `bin/prepare-release.sh`
+  ([#472](https://github.com/CategoricalData/hydra/issues/472)).
+- Apache-compliant canonical source archive: signed + checksummed `git archive`
+  tarball as the release of record, root `NOTICE`, `KEYS`, and a release-verify CI
+  workflow ([#441](https://github.com/CategoricalData/hydra/issues/441)).
+- Per-package publish orchestrators `publish-maven.sh` / `publish-pypi.sh` with
+  dependency-closure and leaves-first ordering checks
+  ([#449](https://github.com/CategoricalData/hydra/issues/449)).
+- `hydra-typescript` published as a target Java/Maven + PyPI artifact
+  ([#468](https://github.com/CategoricalData/hydra/issues/468)).
+- Java coder emits a fluent builder for every generated record type
+  ([#465](https://github.com/CategoricalData/hydra/issues/465)); Python coder emits
+  per-field `with_<field>` copy-update methods and a fluent builder
+  ([#466](https://github.com/CategoricalData/hydra/issues/466)).
+
+### Improvements
+
+- Drop the vestigial `InferenceContext` parameter from the `Primitive.implementation`
+  carrier across all hosts; add a graph-free `funT` coder and six `lists` default
+  implementations ([#446](https://github.com/CategoricalData/hydra/issues/446)).
+- Derive package routing from declared modules; split derived generation into broad
+  `mainDslModules` and scoped `mainEncodingModules`
+  ([#474](https://github.com/CategoricalData/hydra/issues/474),
+  [#475](https://github.com/CategoricalData/hydra/issues/475)).
+- Hash JSON content into the per-package input digest; add `digest-check
+  refresh-input` and a CI guard that force-regenerates and diffs
+  `dist/haskell/hydra-{java,python}` ([#469](https://github.com/CategoricalData/hydra/issues/469)).
+- Per-package inference seeds downstream packages from each package's full universe
+  while inferring only write targets, fixing `hydra-scala` inference within the CI
+  heap budget; declare the `hydra-java` dependency in `hydra-scala` for cold
+  ordering ([#470](https://github.com/CategoricalData/hydra/issues/470)).
+- Remove the vestigial `Lib/Defaults` registry and empty `defaultLibModules`
+  manifest field from all hosts ([#437](https://github.com/CategoricalData/hydra/issues/437)).
+- Bundle LICENSE + NOTICE into Java jars (`META-INF`) and Python wheels
+  (`dist-info`); declare Apache-2.0 in the Scala build
+  ([#441](https://github.com/CategoricalData/hydra/issues/441)).
+- Mark lazy parameters on the Scala and Common Lisp primitive registries so eager
+  coders thunk correctly ([#453](https://github.com/CategoricalData/hydra/issues/453),
+  [#477](https://github.com/CategoricalData/hydra/issues/477),
+  [#425](https://github.com/CategoricalData/hydra/issues/425)).
+- Staging-loop WIP-commit gate to keep `WIP:` commits off `origin/main`
+  ([#466](https://github.com/CategoricalData/hydra/issues/466)).
+
+### Bug fixes
+
+- **Python wheel self-containment**: the `hydra-kernel` wheel now ships
+  `hydra.python.util`; gated by a packaging-boundary smoke test in CI and
+  `publish-pypi.sh` ([#472](https://github.com/CategoricalData/hydra/issues/472),
+  [#461](https://github.com/CategoricalData/hydra/issues/461)).
+- **Haskell sdist self-containment**: track the generated `Hydra/Dsl/Terms.hs`
+  (was gitignored) so the committed dist exports `ToPrimName`, fixing the cold
+  build of the published `hydra-kernel`
+  ([#473](https://github.com/CategoricalData/hydra/issues/473)).
+- Decode synthesizer threads the fully-applied result type into wrap/record/union
+  decoder bodies, so derived decoders emit `DataRow<v>` rather than raw `DataRow`,
+  fixing Java and Scala generic decode compilation
+  ([#476](https://github.com/CategoricalData/hydra/issues/476)).
+- Scala coder emits explicit type arguments for polymorphic non-primitive
+  references under a type application (e.g. `requireField`), fixing `Any`-inference
+  of curried decoder lambda parameters in `decode/typed`
+  ([#434](https://github.com/CategoricalData/hydra/issues/434)).
+- Common Lisp and Emacs Lisp: move the hand-written runtime to a dialect-tier path
+  so it no longer collides with the generated `hydra.lib.*` def-modules
+  ([#434](https://github.com/CategoricalData/hydra/issues/434)).
+- Python coder uses the binding `TypeScheme` as the authoritative source for
+  parameter and return types ([#488](https://github.com/CategoricalData/hydra/issues/488));
+  fixes a duplicate `self` parameter in builders
+  ([#478](https://github.com/CategoricalData/hydra/issues/478)).
+- Sort term definitions by name in source-file generation so non-Haskell hosts emit
+  deterministic alphabetical Haskell output (host-independent of `Maps.elems`
+  iteration order) ([#489](https://github.com/CategoricalData/hydra/issues/489)).
+- Java coder serializes the `static` method modifier (previously a non-exhaustive
+  case) ([#465](https://github.com/CategoricalData/hydra/issues/465)); JavaDoc
+  `@link`/`@param` sanitization for strict doclint
+  ([#449](https://github.com/CategoricalData/hydra/issues/449)).
+- Scala host writer appends a trailing newline when missing, fixing a Lisp-target
+  byte mismatch ([#463](https://github.com/CategoricalData/hydra/issues/463)).
+- Clojure host: silent wrapping `bigint_to_int{8,16,32,64}` casts per the kernel
+  contract ([#483](https://github.com/CategoricalData/hydra/issues/483)); load-order
+  and `--kernel-only` filter fixes after kernel renames
+  ([#425](https://github.com/CategoricalData/hydra/issues/425)); load the
+  `hydra-haskell` baseline for Clojure→Haskell rebuilds
+  ([#487](https://github.com/CategoricalData/hydra/issues/487),
+  [#460](https://github.com/CategoricalData/hydra/issues/460)).
+- Lisp-dialect bootstrap fixes: emit JSON object entries as 2-element `Pair` lists
+  rather than dotted cons ([#452](https://github.com/CategoricalData/hydra/issues/452),
+  also fixing [#16](https://github.com/CategoricalData/hydra/issues/16)); read
+  module names via the correct struct accessor
+  ([#471](https://github.com/CategoricalData/hydra/issues/471)); drop stale
+  surplus flag arguments from `generate-source-files` calls
+  ([#457](https://github.com/CategoricalData/hydra/issues/457),
+  [#458](https://github.com/CategoricalData/hydra/issues/458),
+  [#464](https://github.com/CategoricalData/hydra/issues/464)); rename eta-wrapped
+  projection/unwrap parameters to avoid kernel shadowing
+  ([#428](https://github.com/CategoricalData/hydra/issues/428)); propagate a
+  non-zero exit from the Scheme test runner on failures and fix Scheme float
+  scientific-notation formatting for `|x| >= 1e7`
+  ([#447](https://github.com/CategoricalData/hydra/issues/447)).
+- Cross-host target dispatch: Common Lisp and Clojure hosts dispatch Scala and
+  TypeScript targets ([#482](https://github.com/CategoricalData/hydra/issues/482),
+  [#483](https://github.com/CategoricalData/hydra/issues/483)); Scala/Java host
+  target-dispatch completions ([#5](https://github.com/CategoricalData/hydra/issues/5),
+  [#7](https://github.com/CategoricalData/hydra/issues/7),
+  [#17](https://github.com/CategoricalData/hydra/issues/17)).
+- TypeScript test runtime reads the kernel JSON field names `body`/`signature`
+  (not legacy `term`/`typeScheme`); `lists.nub` dedups by canonical JSON
+  ([#485](https://github.com/CategoricalData/hydra/issues/485)).
+- Sync robustness: always reassemble `dist/python` under `HYDRA_IN_SYNC` to heal
+  partial-dist state ([#480](https://github.com/CategoricalData/hydra/issues/480));
+  persist the run dir on bootstrap prep-phase failures
+  ([#481](https://github.com/CategoricalData/hydra/issues/481)); complete per-host
+  static deps so the bootstrap demo finds fresh dist
+  ([#445](https://github.com/CategoricalData/hydra/issues/445)).
+- Pin the Python target test interpreter to Python ≥ 3.12
+  ([#486](https://github.com/CategoricalData/hydra/issues/486)); Emacs Lisp / Scheme
+  target test-runner re-copy robustness
+  ([#456](https://github.com/CategoricalData/hydra/issues/456)).
+- JavaDoc Pages publish rewritten to build a combined site from the CI-generated
+  `dist/java/` artifact, fixing the failure mode where `pages.yml` ran against a
+  bare checkout with no `dist/java/` present
+  ([#450](https://github.com/CategoricalData/hydra/issues/450)).
+
+### Documentation
+
+- Document the `overlay/` self-containment model, the published-host consume model
+  for all three hosts, the `hydra.json` version / host-version basis, and a
+  migration-shims recipe ([#434](https://github.com/CategoricalData/hydra/issues/434),
+  [#370](https://github.com/CategoricalData/hydra/issues/370),
+  [#347](https://github.com/CategoricalData/hydra/issues/347)).
+- Document the kernel self-containment / `hydra.lib.*` def-module model and the
+  derived-module no-inference invariant
+  ([#473](https://github.com/CategoricalData/hydra/issues/473),
+  [#466](https://github.com/CategoricalData/hydra/issues/466)); generated Java and
+  Python record builders documented in the DSL guides
+  ([#465](https://github.com/CategoricalData/hydra/issues/465),
+  [#466](https://github.com/CategoricalData/hydra/issues/466)).
+- Use absolute GitHub URLs in package READMEs so links resolve when published
+  standalone ([#454](https://github.com/CategoricalData/hydra/issues/454)); bundle a
+  README into each Python package dir for sdist metadata
+  ([#418](https://github.com/CategoricalData/hydra/issues/418)).
+
+---
+
+## [0.16.0] - 2026-06-09
+
+Major themes: primitive-metadata reification, self-hosting coder DSLs with all
+eight hosts passing the common test suite, finalized `hydra.packaging`, and a
+deep kernel-vocabulary cleanup.
+
+### Highlights
+
+- **`PrimitiveDefinition` and per-namespace registry modules** with host-independent
+  specs for every standard-library primitive ([#156](https://github.com/CategoricalData/hydra/issues/156), [#319](https://github.com/CategoricalData/hydra/issues/319)).
+- **Self-hosting coder DSLs; all eight hosts pass the common test suite**, including
+  the completed TypeScript head ([#344](https://github.com/CategoricalData/hydra/issues/344), [#126](https://github.com/CategoricalData/hydra/issues/126)).
+- **Finalized `hydra.packaging`** and a unified `Module.dependencies` field ([#369](https://github.com/CategoricalData/hydra/issues/369), [#354](https://github.com/CategoricalData/hydra/issues/354)).
+- **Kernel-vocabulary cleanup**: `maybe`→`optional` across kernel and hosts, plus
+  order-preserving JSON objects ([#401](https://github.com/CategoricalData/hydra/issues/401), [#398](https://github.com/CategoricalData/hydra/issues/398)).
+
+### New features
+
+- Reify `PrimitiveDefinition` in `hydra.packaging` with per-namespace `hydra.lib.<sub>` registries ([#156](https://github.com/CategoricalData/hydra/issues/156)).
+- Host-independent `comments` specifications for all standard-library primitives ([#319](https://github.com/CategoricalData/hydra/issues/319)).
+- Kernel-oriented style checks in `hydra.validate.*` ([#321](https://github.com/CategoricalData/hydra/issues/321), [#351](https://github.com/CategoricalData/hydra/issues/351), [#352](https://github.com/CategoricalData/hydra/issues/352)), on a reshaped validation API ([#320](https://github.com/CategoricalData/hydra/issues/320)).
+- Promote the JSON Schema coder to a full DSL coder ([#350](https://github.com/CategoricalData/hydra/issues/350)).
+- Transpose coder sources into host-native DSLs for self-hosting ([#344](https://github.com/CategoricalData/hydra/issues/344), [#358](https://github.com/CategoricalData/hydra/issues/358)).
+- `Term`-typed annotations replacing `Map<Name, Term>` ([#386](https://github.com/CategoricalData/hydra/issues/386)).
+- Language-specific EDSL features on the kernel `Language` ([#233](https://github.com/CategoricalData/hydra/issues/233)).
+- Primitive-metadata-driven laziness in eager coders ([#391](https://github.com/CategoricalData/hydra/issues/391)).
+- `/test` skill and `bin/test.sh` for target-language test validation ([#387](https://github.com/CategoricalData/hydra/issues/387)).
+- Automatic differentiation: a `grad` transform ([#324](https://github.com/CategoricalData/hydra/issues/324)).
+- `hydra.show.error.pg` for `InvalidGraphError` ([#374](https://github.com/CategoricalData/hydra/issues/374)).
+
+### Improvements
+
+- Finalize `hydra.packaging`: `Binding`→`TypeDefinition`, `Module`/`Package` `comments`, `moduleName` cleanup ([#369](https://github.com/CategoricalData/hydra/issues/369), [#396](https://github.com/CategoricalData/hydra/issues/396), [#402](https://github.com/CategoricalData/hydra/issues/402), [#404](https://github.com/CategoricalData/hydra/issues/404)).
+- Merge `Module.termDependencies`/`typeDependencies` into one `dependencies` field ([#354](https://github.com/CategoricalData/hydra/issues/354)).
+- Resolve the `maybe`/`optional` ambiguity across kernel and all hosts ([#401](https://github.com/CategoricalData/hydra/issues/401)).
+- Order-preserving JSON objects; order-sensitive `Value` equality ([#398](https://github.com/CategoricalData/hydra/issues/398)).
+- Rename `Namespace`→`ModuleName` ([#316](https://github.com/CategoricalData/hydra/issues/316)) and the phantom DSL types to `Typed*` ([#397](https://github.com/CategoricalData/hydra/issues/397)).
+- Move from a type-class enum to type-class names ([#275](https://github.com/CategoricalData/hydra/issues/275)).
+- Repackage "eval lib" modules as kernel lib modules; promote remaining sources ([#260](https://github.com/CategoricalData/hydra/issues/260), [#355](https://github.com/CategoricalData/hydra/issues/355), [#356](https://github.com/CategoricalData/hydra/issues/356)).
+- Reshape `hydra.context` into `InferenceContext` ([#368](https://github.com/CategoricalData/hydra/issues/368)).
+- Streamline the Haskell, Java, Python, and Scala syntax models, re-pinning Java to SE 21 and Python to the 3.14 PEG grammar ([#297](https://github.com/CategoricalData/hydra/issues/297)).
+- Adopt persistent immutable collections across hosts ([#359](https://github.com/CategoricalData/hydra/issues/359), [#360](https://github.com/CategoricalData/hydra/issues/360), [#361](https://github.com/CategoricalData/hydra/issues/361), [#362](https://github.com/CategoricalData/hydra/issues/362)).
+- Migrate underscored kernel definition names to camelCase ([#348](https://github.com/CategoricalData/hydra/issues/348)).
+- Tidy qualified/unqualified imports in the Haskell DSL sources ([#308](https://github.com/CategoricalData/hydra/issues/308)).
+- Eliminate the `Hydra.Module.Compat` shim ([#315](https://github.com/CategoricalData/hydra/issues/315)).
+- Homogenize writer conventions across target languages ([#339](https://github.com/CategoricalData/hydra/issues/339)).
+- Disambiguate format-version field naming across JSON metadata ([#412](https://github.com/CategoricalData/hydra/issues/412)).
+- Per-package DSL→JSON build with per-package incremental inference ([#381](https://github.com/CategoricalData/hydra/issues/381), [#395](https://github.com/CategoricalData/hydra/issues/395)).
+- Prune stale `dist/` outputs; self-heal digests; exclude digests from VCS; reconcile drift; fail loud ([#357](https://github.com/CategoricalData/hydra/issues/357), [#393](https://github.com/CategoricalData/hydra/issues/393), [#405](https://github.com/CategoricalData/hydra/issues/405), [#378](https://github.com/CategoricalData/hydra/issues/378), [#379](https://github.com/CategoricalData/hydra/issues/379), [#392](https://github.com/CategoricalData/hydra/issues/392), [#414](https://github.com/CategoricalData/hydra/issues/414)).
+- Accept all valid (host, target) pairs in the generation drivers ([#421](https://github.com/CategoricalData/hydra/issues/421)).
+- Move Gradle build infrastructure into `heads/java/`; remove top-level `pixi.toml` ([#384](https://github.com/CategoricalData/hydra/issues/384), [#385](https://github.com/CategoricalData/hydra/issues/385)).
+- Eliminate post-generation test patches; fix loader/runner kludges; re-enable test timing ([#307](https://github.com/CategoricalData/hydra/issues/307), [#309](https://github.com/CategoricalData/hydra/issues/309), [#311](https://github.com/CategoricalData/hydra/issues/311)).
+- Performance/benchmarks and usability assessments ([#277](https://github.com/CategoricalData/hydra/issues/277), [#283](https://github.com/CategoricalData/hydra/issues/283)).
+- Split the Hackage distribution into per-package distributions ([#418](https://github.com/CategoricalData/hydra/issues/418)).
+
+### Bug fixes
+
+- Encode `uint32` JSON literals as numbers, not strings ([#431](https://github.com/CategoricalData/hydra/issues/431)).
+- Satisfy or suppress warnings in generated Java ([#349](https://github.com/CategoricalData/hydra/issues/349)).
+- Restore JSON parser test cases (polymorphic case handling, ordering fallback) ([#336](https://github.com/CategoricalData/hydra/issues/336)).
+- Keep annotations through `termAlternatives`/`typeAlternatives` adaptation ([#353](https://github.com/CategoricalData/hydra/issues/353)).
+- Scala host decodes module JSON containing term definitions ([#342](https://github.com/CategoricalData/hydra/issues/342)).
+- Java coder: fix exponential `let`-bound `cases` cost ([#372](https://github.com/CategoricalData/hydra/issues/372)) and explicit type args on `PersistentMap.ofEntries` ([#394](https://github.com/CategoricalData/hydra/issues/394)).
+- Python-host codegen: drop extra `pyStringToPyStrings` wrapping ([#367](https://github.com/CategoricalData/hydra/issues/367)).
+- `escape_literal_char` no longer mangles RDF triples ([#363](https://github.com/CategoricalData/hydra/issues/363)).
+- Sync robustness: stale coder JSON, omitted native modules, dead helper, bad source dirs ([#406](https://github.com/CategoricalData/hydra/issues/406), [#400](https://github.com/CategoricalData/hydra/issues/400), [#411](https://github.com/CategoricalData/hydra/issues/411), [#408](https://github.com/CategoricalData/hydra/issues/408)).
+- Cross-host self-hosting fixes (Scala, TypeScript, and the four Lisp dialects) ([#422](https://github.com/CategoricalData/hydra/issues/422), [#423](https://github.com/CategoricalData/hydra/issues/423), [#424](https://github.com/CategoricalData/hydra/issues/424), [#429](https://github.com/CategoricalData/hydra/issues/429), [#444](https://github.com/CategoricalData/hydra/issues/444), [#366](https://github.com/CategoricalData/hydra/issues/366), [#389](https://github.com/CategoricalData/hydra/issues/389), [#407](https://github.com/CategoricalData/hydra/issues/407), [#425](https://github.com/CategoricalData/hydra/issues/425), [#426](https://github.com/CategoricalData/hydra/issues/426), [#427](https://github.com/CategoricalData/hydra/issues/427), [#432](https://github.com/CategoricalData/hydra/issues/432), [#438](https://github.com/CategoricalData/hydra/issues/438), [#439](https://github.com/CategoricalData/hydra/issues/439), [#443](https://github.com/CategoricalData/hydra/issues/443)).
+
+### Removed
+
+- Removed the `bigfloat` literal type from `FloatType` and `FloatValue` ([#330](https://github.com/CategoricalData/hydra/issues/330)).
+  Arbitrary-precision floating-point values were inconsistently supported
+  across host languages (Java/Scala in particular lacked a true IEEE 754
+  arbitrary-precision implementation), and nothing in the codebase relied on
+  them. `FloatType` and `FloatValue` now have only `float32` and `float64`
+  variants. Removed library primitives: `bigfloatToBigint`, `bigfloatToFloat32`,
+  `bigfloatToFloat64`, `bigintToBigfloat`, `float32ToBigfloat`,
+  `float64ToBigfloat`, `readBigfloat`, `showBigfloat`, `roundBigfloat`. New
+  primitives `float32ToFloat64` and `float64ToFloat32` (the latter lossy)
+  replace the removed bigfloat-routed conversions.
+- Removed `heads/haskell/bin/assemble-hackage-sdist.sh` ([#418](https://github.com/CategoricalData/hydra/issues/418)), the 0.15-era
+  bridge that flattened the multi-source-dir Haskell head into one self-contained
+  `hydra` sdist. Superseded by the per-package assembler (see Improvements).
+
+### Documentation
+
+- Comprehensive documentation refresh for 0.16 ([#383](https://github.com/CategoricalData/hydra/issues/383))
+  spanning nine tracks across READMEs, `docs/`, the wiki, CLAUDE.md, and
+  in-source kernel comments.
+- New `docs/json-format.md` reference describing the canonical JSON wire format
+  (tagged-union duality, optional-field rules, IEEE 754 sentinels, integer
+  threshold).
+- New wiki pages: `Design` (rationale behind each major choice) and `Inference`
+  (HM type inference with class constraints).
+- Cross-checked every prose doc against current code; corrected drift in
+  primitive-checking sections of `docs/recipes/maintenance.md`, the `Primitive`
+  shape in `docs/implementation.md` and `docs/recipes/adding-primitives.md`,
+  and the build-system narrative.
+- Wove motivation ("the why") through the existing doc surface rather than
+  collecting it into separately-titled sidebars; landed an inference-overview
+  centerpiece on the wiki ([#377](https://github.com/CategoricalData/hydra/issues/377)).
+- Aligned doc vocabulary with the LambdaGraph paper and the literature review
+  for the design space Hydra inhabits.
+- Net-new READMEs for `packages/hydra-kernel`, `packages/hydra-ext`,
+  `packages/hydra-coq`, and `packages/hydra-wasm`; top-level `README.md`
+  now carries a canonical packages table.
+- Audited and refreshed the Claude surface: CLAUDE.md "Where to look up X"
+  table extended with rows for `docs/getting-started.md`, `docs/json-format.md`,
+  and the `Design` / `Inference` wiki pages; hard-rules block reordered by
+  violation frequency; `claude/pitfalls.md` superseded entries folded into
+  `docs/troubleshooting.md` / recipes.
+- Project-descriptor strings reviewed and aligned across 24 build / packaging
+  files (Hackage synopsis, Maven Central description, PyPI / conda-forge
+  classifiers, Hydra-format `package.json` files).
+- `docs/index.html` (the GitHub Pages landing page) refreshed with audience
+  hops into wiki Concepts / Design, `docs/getting-started.md`, and the GitHub
+  repo, plus the full published-artifact list across Hackage, Maven Central,
+  PyPI, and conda-forge.
+- In-source kernel-code rationale comments added at key Sources sites covering
+  injection / pair / either / unit-void duality, error taxonomy, variant
+  records, inference-context threading, validation profiles, reduction state,
+  lexical filters, name mangling, scoping, variable handling, defaults
+  integration, and Tarjan SCC choice rationale. JSON encode/decode modules
+  cross-reference `docs/json-format.md`.
+- Filed `Primitive.implementation` carrier-simplification follow-up
+  ([#446](https://github.com/CategoricalData/hydra/issues/446))
+  to drop the unused `InferenceContext` and `Graph` parameters once the
+  `Lib/Defaults/` integration ([#437](https://github.com/CategoricalData/hydra/issues/437))
+  lands.
+
+---
+
+## [0.15.0] - 2026-04-29
+
+A structural-cleanup release.
+The repository is reorganized into a three-tree
+`packages/` (DSL sources) / `heads/` (per-host runtime) / `dist/` (generated output)
+layout ([#290](https://github.com/CategoricalData/hydra/issues/290)), the kernel is simplified ([#251](https://github.com/CategoricalData/hydra/issues/251), [#292](https://github.com/CategoricalData/hydra/issues/292), [#332](https://github.com/CategoricalData/hydra/issues/332)), and Java + Python now
+ship as per-package publishable artifacts on Maven Central / PyPI / conda-forge
+([#305](https://github.com/CategoricalData/hydra/issues/305)).
+Incremental, content-hash-based caches accelerate the sync pipeline ([#247](https://github.com/CategoricalData/hydra/issues/247)).
+Three new generation-only targets — Coq ([#326](https://github.com/CategoricalData/hydra/issues/326)), WebAssembly ([#325](https://github.com/CategoricalData/hydra/issues/325)), and an
+automatic-differentiation demo ([#324](https://github.com/CategoricalData/hydra/issues/324)) — are in progress as Claude collaborations.
+
+### Highlights
+
+- **Three-tree repository layout**: `packages/` (DSL), `heads/` (host runtime),
+  `dist/` (generated) ([#290](https://github.com/CategoricalData/hydra/issues/290)).
+- **Per-package distributions** for Java (4 Maven artifacts) and Python (5 wheels):
+  `hydra-kernel`, `hydra-pg`, `hydra-rdf`, `hydra-{java,python}`, plus `hydra-ext`
+  on PyPI ([#305](https://github.com/CategoricalData/hydra/issues/305)).
+- **Kernel simplifications**: `Function`/`Elimination` removed ([#332](https://github.com/CategoricalData/hydra/issues/332)),
+  `FunctionPrimitive` removed ([#251](https://github.com/CategoricalData/hydra/issues/251)), `Hydra.Ext.*` prefix retired ([#331](https://github.com/CategoricalData/hydra/issues/331)),
+  `Context` error wrapper gone ([#292](https://github.com/CategoricalData/hydra/issues/292)).
+- **Incremental caches** across the sync pipeline; ~70x speedup on no-op resync ([#247](https://github.com/CategoricalData/hydra/issues/247)).
+- **JSON kernel format v1** with formal wire-format spec and four-field rename ([#343](https://github.com/CategoricalData/hydra/issues/343)).
+- **Three new generation-only targets** (in progress): Coq ([#326](https://github.com/CategoricalData/hydra/issues/326)), WebAssembly ([#325](https://github.com/CategoricalData/hydra/issues/325)),
+  automatic-differentiation demo ([#324](https://github.com/CategoricalData/hydra/issues/324)).
+
+### New features
+
+- Per-package distributions ([#305](https://github.com/CategoricalData/hydra/issues/305)): standalone Maven / PyPI / conda-forge builds,
+  generated `build.gradle` / `pyproject.toml` per package, transitive dep resolution.
+- JSON kernel format v1 ([#343](https://github.com/CategoricalData/hydra/issues/343)): formal spec at `docs/json-format.md`,
+  four-field rename to `typeScheme`, `Module` field reorder, `formatVersion` stamp.
+- `decimal` literal type in the kernel ([#338](https://github.com/CategoricalData/hydra/issues/338)) across all hosts.
+- Type-directed JSON encoder with idiomatic optional encoding ([#314](https://github.com/CategoricalData/hydra/issues/314), [#318](https://github.com/CategoricalData/hydra/issues/318)).
+- Incremental type inference plus content-hash caches ([#247](https://github.com/CategoricalData/hydra/issues/247)).
+- Coq generation target ([#326](https://github.com/CategoricalData/hydra/issues/326), in progress): `hydra-coq` package, 131/131 `.v` files pass `coqc`.
+- WebAssembly target ([#325](https://github.com/CategoricalData/hydra/issues/325), in progress): `hydra-wasm` package, M4 closure mechanism.
+- Automatic-differentiation demo ([#324](https://github.com/CategoricalData/hydra/issues/324), in progress): symbolic source-to-source.
+- `hydra.show.error` module ([#265](https://github.com/CategoricalData/hydra/issues/265)): consolidated error-message builders.
+- `hydra.lib.maybes.toList` primitive ([#257](https://github.com/CategoricalData/hydra/issues/257)).
+- NaN / Inf round-tripping through JSON and per-language serdes ([#312](https://github.com/CategoricalData/hydra/issues/312), [#318](https://github.com/CategoricalData/hydra/issues/318), [#330](https://github.com/CategoricalData/hydra/issues/330)).
+- Typeclass inference test group ([#274](https://github.com/CategoricalData/hydra/issues/274)).
+- Term and type linters ([#232](https://github.com/CategoricalData/hydra/issues/232)).
+- Validation for modules and graphs ([#155](https://github.com/CategoricalData/hydra/issues/155)).
+- User-defined-function (UDF) support and DSL-vs-primitive overrides
+  ([#62](https://github.com/CategoricalData/hydra/issues/62), [#63](https://github.com/CategoricalData/hydra/issues/63), [#102](https://github.com/CategoricalData/hydra/issues/102), [#158](https://github.com/CategoricalData/hydra/issues/158)).
+- Stale-source detection across sync entrypoints ([#228](https://github.com/CategoricalData/hydra/issues/228)).
+
+### Improvements
+
+- Sync infrastructure: matrix tool, per-package orchestrator, per-language wrappers ([#290](https://github.com/CategoricalData/hydra/issues/290)).
+- TestGraph post-generation patches eliminated; DSL emits `TestEnv` refs directly.
+- Minimized standard imports in generated Haskell ([#161](https://github.com/CategoricalData/hydra/issues/161)); improved auto-aliases ([#322](https://github.com/CategoricalData/hydra/issues/322)).
+- Removed kernel term dependencies from the interpreter ([#257](https://github.com/CategoricalData/hydra/issues/257)).
+- Removed `Graph` and `Context` arguments from primitive implementations ([#266](https://github.com/CategoricalData/hydra/issues/266)).
+- Refactored kernel term modules: split rewriting/schemas, renamed show.meta → codegen,
+  moved `Coder` to `coders`, merged `extract.helpers` ([#221](https://github.com/CategoricalData/hydra/issues/221)).
+- Removed Aeson and HsYAML dependencies; YAML coder moved to `hydra-ext` ([#261](https://github.com/CategoricalData/hydra/issues/261)).
+- Lisp recursive let bindings via SCC ([#341](https://github.com/CategoricalData/hydra/issues/341)); parenthesis cleanup ([#84](https://github.com/CategoricalData/hydra/issues/84)).
+- Everything-to-everything bootstrapping demo ([#254](https://github.com/CategoricalData/hydra/issues/254)).
+- Re-enabled skipped Python tests; `disabledForPython` retired ([#263](https://github.com/CategoricalData/hydra/issues/263)).
+- Promoted host-specific code in `packages/` into per-head locations ([#337](https://github.com/CategoricalData/hydra/issues/337)).
+- Migrated `hydra.common` Java module out ([#10](https://github.com/CategoricalData/hydra/issues/10)).
+- Test infrastructure unification under `UniversalTestCase` ([#246](https://github.com/CategoricalData/hydra/issues/246)).
+- Default property graph → RDF mapping ([#296](https://github.com/CategoricalData/hydra/issues/296)).
+- 13 unsafe partial primitives replaced with `Maybe`-returning alternatives ([#201](https://github.com/CategoricalData/hydra/issues/201)).
+- Java generated code uses standard `java.util` collection interfaces ([#313](https://github.com/CategoricalData/hydra/issues/313)).
+- `Term.union` renamed to `Term.inject` ([#334](https://github.com/CategoricalData/hydra/issues/334)).
+- Inconsistencies in domain DSLs cleaned up ([#219](https://github.com/CategoricalData/hydra/issues/219)).
+- Coder packages moved out of hydra-haskell ([#182](https://github.com/CategoricalData/hydra/issues/182)).
+- Java package-naming scheme revised ([#223](https://github.com/CategoricalData/hydra/issues/223)).
+- Decimal used (instead of bigfloat) for JSON numbers ([#340](https://github.com/CategoricalData/hydra/issues/340)).
+- Hydra kernel moved out of hydra-haskell ([#282](https://github.com/CategoricalData/hydra/issues/282)).
+
+### Bug fixes
+
+- `substInTypeScheme` capture-unsafe substitution under nested forall binders.
+- Java `Float64` arithmetic primitives corrected for current `PrimitiveFunction` API.
+- Clojure decimal handling: value-based equality, `BigInteger` return from `decimal_to_bigint`.
+- Scheme runtime R7RS imports for `sets.scm` / `maps.scm` / `eithers.map_set`.
+- Python coder defaults corrected from `Py.Name` to `Py.Expression`.
+- Scala host JSON-decode failure on modules containing term definitions ([#342](https://github.com/CategoricalData/hydra/issues/342)).
+- Lisp coder mutually-recursive let bindings for Clojure ([#341](https://github.com/CategoricalData/hydra/issues/341)).
+
+### Documentation
+
+- Documentation refresh for the 0.15 packaging restructure ([#290](https://github.com/CategoricalData/hydra/issues/290), [#331](https://github.com/CategoricalData/hydra/issues/331)); CLAUDE.md,
+  READMEs, recipes, demos, and seven wiki pages updated.
+- Code-generation recipe rewritten for the per-package dist layout ([#282](https://github.com/CategoricalData/hydra/issues/282)).
+- New `maintenance.md` recipe consolidates non-source-file scans, stale generated
+  detection, design-violation checks, and freshness checks.
+- Documentation style guide added at `docs/documentation-style-guide.md`.
+- Cross-worktree messaging protocol documented in CLAUDE.md.
+- Decimal type documented in the lexicon and per-language READMEs ([#338](https://github.com/CategoricalData/hydra/issues/338)).
+- JSON encoding format docs updated for idiomatic optional encoding ([#314](https://github.com/CategoricalData/hydra/issues/314)).
+
+---
+
+## [0.14.1] - 2026-03-30
+
+Patch release.
+Regenerates all implementations after a fix to the group eval primitive ([#281](https://github.com/CategoricalData/hydra/issues/281)),
+and relocates the property-graph and RDF/SHACL "ext" modules into hydra-java and hydra-python.
+
+### Improvements
+
+- Moved PG, RDF, and SHACL ext modules from hydra-ext into hydra-java and hydra-python.
+
+### Bug fixes
+
+- Group eval primitive fix; all targets regenerated ([#281](https://github.com/CategoricalData/hydra/issues/281)).
+- JavaDoc HTML-entity escaping in generated `DestructuringPattern.java`.
+
+---
+
+## [0.14.0] - 2026-03-29
+
+Major release adding four new complete Hydra implementations — Scala ([#273](https://github.com/CategoricalData/hydra/issues/273)),
+Clojure ([#278](https://github.com/CategoricalData/hydra/issues/278)), Common Lisp, and Scheme — bringing the total to seven bootstrapping hosts
+(plus Emacs Lisp, which passes the test suite but does not yet participate in bootstrapping).
+Also includes kernel simplifications, an Avro bidirectional coder ([#301](https://github.com/CategoricalData/hydra/issues/301)),
+eval primitives ([#281](https://github.com/CategoricalData/hydra/issues/281)), new demos, and significant performance work on the Scheme host.
+
+### Highlights
+
+- **Four new complete implementations**: Hydra-Scala ([#273](https://github.com/CategoricalData/hydra/issues/273)), Hydra-Clojure ([#278](https://github.com/CategoricalData/hydra/issues/278)),
+  Hydra-Common Lisp, and Hydra-Scheme pass the common test suite and can serve as
+  bootstrapping hosts.
+  The four Lisp dialects share a single coder and serializer.
+- **Kernel simplifications**: removed `RowType`/`WrappedType` ([#82](https://github.com/CategoricalData/hydra/issues/82)),
+  unified `Graph`/`TypeContext`/`InferenceContext` ([#192](https://github.com/CategoricalData/hydra/issues/192)),
+  replaced `Module.elements` with `Module.definitions` ([#214](https://github.com/CategoricalData/hydra/issues/214)),
+  consolidated error types ([#268](https://github.com/CategoricalData/hydra/issues/268)), and promoted all staging modules to DSL sources ([#267](https://github.com/CategoricalData/hydra/issues/267)).
+- **Avro bidirectional coder** ([#301](https://github.com/CategoricalData/hydra/issues/301)) with property graph pipeline demo.
+- **Scheme bootstrap performance**: 58 minutes → 5.7 minutes via O(1) vhash data structures
+  and IEEE 754 float precision fixes.
+
+### Breaking changes
+
+- Removed legacy adapter framework; replaced by the staging-promoted variant ([#236](https://github.com/CategoricalData/hydra/issues/236), [#295](https://github.com/CategoricalData/hydra/issues/295)).
+- Replaced legacy Flow monad with Either ([#245](https://github.com/CategoricalData/hydra/issues/245)).
+- Removed `Module.elements`; use `Module.definitions` ([#214](https://github.com/CategoricalData/hydra/issues/214)).
+- Removed `RowType` and `WrappedType` ([#82](https://github.com/CategoricalData/hydra/issues/82)).
+- Renamed `hydra.accessors` to `hydra.paths` ([#271](https://github.com/CategoricalData/hydra/issues/271)).
+- Renamed `hydra.tarjan` and merged into `hydra.sorting` ([#220](https://github.com/CategoricalData/hydra/issues/220)).
+- Merged `hydra.constraints` into `hydra.query` ([#272](https://github.com/CategoricalData/hydra/issues/272)).
+- Moved `hydra.workflow` to hydra-ext ([#270](https://github.com/CategoricalData/hydra/issues/270)).
+- Consolidated `hydra.compute` into `hydra.util` ([#269](https://github.com/CategoricalData/hydra/issues/269)).
+- Removed `hydra.describe` ([#216](https://github.com/CategoricalData/hydra/issues/216)) and types from `hydra.mantle` ([#217](https://github.com/CategoricalData/hydra/issues/217)).
+- Replaced `OtherError` with task-specific error types ([#268](https://github.com/CategoricalData/hydra/issues/268)).
+- Java: lowered minimum Java version to 11 ([#249](https://github.com/CategoricalData/hydra/issues/249)).
+- Java: `Pair` replaces `Tuple2` ([#252](https://github.com/CategoricalData/hydra/issues/252)); `Comparable` implemented for generated classes ([#131](https://github.com/CategoricalData/hydra/issues/131)).
+
+### New features
+
+- Hydra-Scala ([#273](https://github.com/CategoricalData/hydra/issues/273)): complete implementation, sbt/Scala 3, 3043 tests.
+- Hydra-Lisp: Clojure ([#278](https://github.com/CategoricalData/hydra/issues/278)), Common Lisp, Emacs Lisp, Scheme — four dialects,
+  one coder. CI workflows for Clojure, Common Lisp, and Scheme.
+- Avro bidirectional coder ([#301](https://github.com/CategoricalData/hydra/issues/301)) with demo.
+- Eval primitives ([#281](https://github.com/CategoricalData/hydra/issues/281)): Logic, Equality, Math, collections, and Groups.
+- Generated DSL modules ([#180](https://github.com/CategoricalData/hydra/issues/180)): `hydra.dsls` generates DSL helpers from type modules.
+- New demos: GraphQL+JSON ([#279](https://github.com/CategoricalData/hydra/issues/279)), PG validation ([#284](https://github.com/CategoricalData/hydra/issues/284)), SHACL ([#294](https://github.com/CategoricalData/hydra/issues/294)), Avro+PG.
+- Packaging module ([#290](https://github.com/CategoricalData/hydra/issues/290)): `hydra.packaging` with `Package` type and validation.
+- New primitives: `lists.foldr` ([#280](https://github.com/CategoricalData/hydra/issues/280)), `maybes.toList`, float rounding ([#264](https://github.com/CategoricalData/hydra/issues/264), [#285](https://github.com/CategoricalData/hydra/issues/285)).
+- Cross-language benchmarking suite ([#234](https://github.com/CategoricalData/hydra/issues/234)).
+- Limited typeclass inference ([#164](https://github.com/CategoricalData/hydra/issues/164)).
+- Standardized validation patterns across modules ([#291](https://github.com/CategoricalData/hydra/issues/291)).
+
+### Improvements
+
+- Promoted all staging modules to DSL sources ([#267](https://github.com/CategoricalData/hydra/issues/267)).
+- Removed legacy adapters, JSON/YAML coders, grammar framework ([#236](https://github.com/CategoricalData/hydra/issues/236), [#295](https://github.com/CategoricalData/hydra/issues/295)).
+- Java: efficient immutable data structures ([#193](https://github.com/CategoricalData/hydra/issues/193)); flattened term naming.
+- Java: hidden specialized collection classes in type-level files ([#313](https://github.com/CategoricalData/hydra/issues/313)).
+- Inference error messages improved ([#231](https://github.com/CategoricalData/hydra/issues/231)).
+- Combined nested let bindings in the Haskell coder ([#248](https://github.com/CategoricalData/hydra/issues/248)).
+- Simplified `hydra.adapt.simple` ([#255](https://github.com/CategoricalData/hydra/issues/255)).
+- Removed Haskell operators dependency from tests ([#288](https://github.com/CategoricalData/hydra/issues/288)).
+- Regression tests for non-Haskell/Java coders ([#85](https://github.com/CategoricalData/hydra/issues/85)).
+- Regex support added ([#293](https://github.com/CategoricalData/hydra/issues/293)).
+- `hydra.annotations.isNativeType` revisited ([#214](https://github.com/CategoricalData/hydra/issues/214)).
+- Migrated grammar-generated models ([#295](https://github.com/CategoricalData/hydra/issues/295)).
+- `<<= -shouldBe-> <<~` operator change ([#276](https://github.com/CategoricalData/hydra/issues/276)).
+- Minimize Generation.hs ([#225](https://github.com/CategoricalData/hydra/issues/225)).
+- Implemented missing Flows primitives ([#183](https://github.com/CategoricalData/hydra/issues/183)).
+- Removed JavaDocs from the repository ([#262](https://github.com/CategoricalData/hydra/issues/262)).
+- Floating-point test portability fixes for Linux CI ([#264](https://github.com/CategoricalData/hydra/issues/264), [#285](https://github.com/CategoricalData/hydra/issues/285)).
+- Moved YAML coder to hydra-ext ([#224](https://github.com/CategoricalData/hydra/issues/224)).
+- Minimized native Python and Java primitives in favor of DSL implementations ([#244](https://github.com/CategoricalData/hydra/issues/244)).
+- Removed the `disabledForPython` test tag ([#250](https://github.com/CategoricalData/hydra/issues/250)).
+
+### Release tooling
+
+- 0.14 release tracking ([#304](https://github.com/CategoricalData/hydra/issues/304)).
+
+### Documentation
+
+- Thorough cleanup of user documentation ([#302](https://github.com/CategoricalData/hydra/issues/302), [#303](https://github.com/CategoricalData/hydra/issues/303)).
+- Coding style guide added to wiki.
+- Updated 'new implementation' recipe with learnings from Clojure head ([#278](https://github.com/CategoricalData/hydra/issues/278)).
+
+---
+
+## [0.13.0] - 2026-02-27
+
+Major release completing Hydra-Python ([#66](https://github.com/CategoricalData/hydra/issues/66)) and Hydra-Java ([#166](https://github.com/CategoricalData/hydra/issues/166)) as self-hosting Hydra implementations
+and demonstrating mutual self-hosting across all three languages.
+Significant improvements to type inference, type checking, rewriting, and adaptation.
+New language features include first-class Either types, typeclass inference, binary data support,
+and a native JSON parser/writer.
+Comprehensive tooling for cross-implementation bootstrapping
+and provisional support for Go, Rust, and JavaScript targets.
+
+### Highlights
+
+- **Mutual self-hosting across three implementations**: Hydra is now fully self-hosting
+  in Haskell ([#179](https://github.com/CategoricalData/hydra/issues/179)), Java, and Python, and can cross-generate between every combination
+  of host and target language (9 paths total).
+- **Hydra-Java is complete** ([#166](https://github.com/CategoricalData/hydra/issues/166)): all kernel and generation tests pass.
+- **Hydra-Python is complete** ([#66](https://github.com/CategoricalData/hydra/issues/66)): 100% test parity with Haskell.
+- **Language coders promoted into the Hydra kernel** ([#176](https://github.com/CategoricalData/hydra/issues/176)): Haskell, Java, and Python
+  coders are now defined as Hydra DSL modules, making them self-hosting.
+- **Either type support** ([#210](https://github.com/CategoricalData/hydra/issues/210)) with full inference, checking, and library support.
+- **Native JSON parser and writer** ([#188](https://github.com/CategoricalData/hydra/issues/188), [#243](https://github.com/CategoricalData/hydra/issues/243), [#253](https://github.com/CategoricalData/hydra/issues/253)): Hydra's own JSON parser and writer
+  replace the Aeson dependency; bootstrap-from-JSON architecture for cross-implementation
+  code generation.
+
+### Breaking changes
+
+- Renamed `Optional` to `Maybe` throughout the codebase ([#204](https://github.com/CategoricalData/hydra/issues/204)):
+  `hydra.lib.optionals` → `hydra.lib.maybes`; all `optional` variants renamed to `maybe`.
+- Removed unlabeled product and sum types; replaced with pair types ([#212](https://github.com/CategoricalData/hydra/issues/212)).
+- Renamed `hydra.core.TypedTerm` to `hydra.core.TypeApplicationTerm`.
+- Renamed `hydra.json` to `hydra.json.model`.
+- Renamed `hydra.lib.maps.remove` to `hydra.lib.maps.delete`.
+- Removed deprecated `hydra.decoding` module.
+- Removed old `hydra.mantle.Either` type (replaced by core `Either`).
+- Removed `hydra.lib.tuples` library.
+- Removed C# coder stub (C# syntax model remains).
+- DSL syntax migration: removed `OverloadedStrings` for term expressions ([#238](https://github.com/CategoricalData/hydra/issues/238)).
+- Removed `Hydra.Dsl.ShorthandTypes` ([#222](https://github.com/CategoricalData/hydra/issues/222)).
+
+### New features
+
+- Self-hosting in Haskell ([#179](https://github.com/CategoricalData/hydra/issues/179)) and full mutual cross-generation (Haskell ↔ Java ↔ Python).
+- New bootstrapping demo validating all 9 paths across 249 modules.
+- Promoted Haskell, Java, and Python coders from staging code into Hydra DSL sources ([#176](https://github.com/CategoricalData/hydra/issues/176)).
+- JSON-as-source-of-truth bootstrapping architecture ([#243](https://github.com/CategoricalData/hydra/issues/243), [#253](https://github.com/CategoricalData/hydra/issues/253)):
+  new executables and scripts enabling `bootstrap-from-json` for cross-implementation
+  code generation.
+- Generated term encoders and decoders replace legacy hand-coded modules ([#47](https://github.com/CategoricalData/hydra/issues/47)).
+- Hydra-Python completion ([#66](https://github.com/CategoricalData/hydra/issues/66)): restructured project layout with `src/main` and
+  `src/gen-main` ([#191](https://github.com/CategoricalData/hydra/issues/191)); full library implementations including `hydra.lib.flows`;
+  `@lru_cache` optimization for nullary bindings; PyPy compatibility.
+- Hydra-Java completion ([#166](https://github.com/CategoricalData/hydra/issues/166)): all kernel and generation tests pass; deep changes
+  to Java coder; `Lazy` utility class for delayed evaluation; array-type support
+  in Java serde; tail-call optimization in the Java coder; `Tuple` implements `Comparable`.
+- Either type ([#210](https://github.com/CategoricalData/hydra/issues/210)): `EitherType`, `either` term constructor, `hydra.lib.eithers` library
+  with `either`, `map`, `mapList`, `mapMaybe`, `bimap`, `bind`, `fromLeft`, `fromRight`,
+  `isLeft`, `isRight`, `lefts`, `rights`, `partitionEithers`.
+- Pair type as a core construct ([#211](https://github.com/CategoricalData/hydra/issues/211)).
+- Void type ([#237](https://github.com/CategoricalData/hydra/issues/237)): uninhabited `void` type as the dual of `unit`; type-level only.
+- Native JSON parser and writer ([#188](https://github.com/CategoricalData/hydra/issues/188), [#242](https://github.com/CategoricalData/hydra/issues/242)):
+  bidirectional JSON encoder/decoder; replaces the Aeson dependency;
+  cross-checked via a special test runner.
+- Typeclass inference ([#164](https://github.com/CategoricalData/hydra/issues/164)):
+  type schemes with typeclass constraints via `TypeVariableMetadata`;
+  typeclass metadata on primitive definitions; Haskell coder uses typeclass info.
+- Binary/`ByteString` support ([#172](https://github.com/CategoricalData/hydra/issues/172)): binary data via `ByteString` instead of `String`;
+  Haskell coder uses `Data.ByteString`; new `binaryToBytes` primitive.
+- Parser combinators: new `hydra.parsing` module with combinator types and DSL.
+- Higher-order primitive interpreter ([#198](https://github.com/CategoricalData/hydra/issues/198)): all primitives are fully interpretable
+  across all three implementations; legacy `requiresInterp` tag removed.
+- Let hoisting and flattening: hoisting polymorphic let terms;
+  refined hoisting for monomorphic bindings inside polymorphic ones;
+  more efficient `liftLambdaAboveLet` ([#202](https://github.com/CategoricalData/hydra/issues/202));
+  case-statement hoisting ([#241](https://github.com/CategoricalData/hydra/issues/241)); subterm hoisting helpers.
+- Provisional language targets: Go ([#65](https://github.com/CategoricalData/hydra/issues/65)), Rust (with experimental type-level coder),
+  JavaScript (syntax model, serde, DSL, generated sources), and Java/Python syntax DSLs.
+- New adapter framework ([#236](https://github.com/CategoricalData/hydra/issues/236)): all external coders refactored
+  (Haskell, YAML, Scala, JSON Schema, C++, PDL, Protobuf, GraphQL).
+- Compact labeled records and variants ([#122](https://github.com/CategoricalData/hydra/issues/122)).
+- New primitives:
+  `hydra.lib.lists.find`, `hydra.lib.lists.partition`,
+  `hydra.lib.flows.withDefault`, `hydra.lib.flows.foldl`,
+  `hydra.lib.math.{max,min,abs,pred,signum,succ,even,odd}`,
+  `hydra.lib.pairs.bimap`, `hydra.lib.eithers.bind`,
+  `hydra.lib.literals.binaryToBytes`, complete `readXxx`/`showXxx` families,
+  `hydra.lexical.chooseUniqueName`, `neg` renamed to `negate`,
+  full floating-point math primitives in Python ([#208](https://github.com/CategoricalData/hydra/issues/208)).
+- DeepCore DSL: a layer one level deeper than the Meta DSLs,
+  for programs that construct programs that construct terms.
+- `typeOf` implementation ([#168](https://github.com/CategoricalData/hydra/issues/168)).
+- Implement `Comparable` for generated Java classes ([#131](https://github.com/CategoricalData/hydra/issues/131)); update of Hydra-Java ([#166](https://github.com/CategoricalData/hydra/issues/166)).
+- Compact labeled records exploration ([#122](https://github.com/CategoricalData/hydra/issues/122)).
+- Comparison primitives without typeclasses ([#187](https://github.com/CategoricalData/hydra/issues/187)).
+- Investigated core support for Either and Flow monads ([#200](https://github.com/CategoricalData/hydra/issues/200)).
+
+### Improvements
+
+- Type system:
+  - Refactored `hydra.inference` to create new module `hydra.checking`.
+  - Inference checks after unification to prevent schema names from being unified
+    with inferred type variables.
+  - Type application terms preserved when preparing application terms for Python.
+  - Sanity-check tuple projection index against arity during inference.
+  - Bind lost type variables in term annotations.
+  - Made `extendTypeContextForLet` tolerant of untyped bindings.
+- Code generation:
+  - Python: support for deeply-nested match statements; more complete `let` support;
+    Pythonic syntax for polymorphic function definitions; refinements for complex
+    case-hoisting scenarios; performance improvements ([#209](https://github.com/CategoricalData/hydra/issues/209), [#239](https://github.com/CategoricalData/hydra/issues/239), [#240](https://github.com/CategoricalData/hydra/issues/240)); inline
+    let/case rewriting for Python targets ([#203](https://github.com/CategoricalData/hydra/issues/203)).
+  - Java: method declaration style consistent with calling style.
+  - Haskell: standardized typeclass names.
+  - Increased maximum trace depth to support more complex sources.
+- Common test suite promotion: all tests promoted into a shared, implementation-independent
+  test kernel ([#213](https://github.com/CategoricalData/hydra/issues/213)).
+- Statically-compiled test suite in Haskell ([#207](https://github.com/CategoricalData/hydra/issues/207)).
+- Included all Hydra kernel types in test schema ([#205](https://github.com/CategoricalData/hydra/issues/205)).
+- Reorganized Haskell DSL definitions; standardized imports.
+- Added TODO comments to all unsafe primitives ([#201](https://github.com/CategoricalData/hydra/issues/201)).
+- New `rewriteAndFoldTerm` utility for simultaneous rewriting and folding.
+- Lexical helper for dereferencing schema types through aliases.
+- Made JSON parser lazy with new `lazy` parser combinator.
+- More efficient substitution helpers for empty substitutions.
+- Precomputed type/inference context in kernel test runner for performance.
+- Property graph encoding and decoding modules promoted into DSL.
+- `hydra.tabular` and `hydra.pg.graphson` modules promoted into DSL.
+- `hydra.show.*` modules generated into Java and Python.
+- Aligned epsilon encoding with the LambdaGraph spec ([#89](https://github.com/CategoricalData/hydra/issues/89)).
+- Fixed asymmetry of introductions and eliminations ([#86](https://github.com/CategoricalData/hydra/issues/86), [#134](https://github.com/CategoricalData/hydra/issues/134)).
+- Minimized inferred type annotations ([#114](https://github.com/CategoricalData/hydra/issues/114)).
+- Investigated combining products with records, sums with unions ([#196](https://github.com/CategoricalData/hydra/issues/196), [#212](https://github.com/CategoricalData/hydra/issues/212)).
+- Refined type reduction in adapters ([#144](https://github.com/CategoricalData/hydra/issues/144)).
+- Investigation of unification issues ([#163](https://github.com/CategoricalData/hydra/issues/163)).
+- Refactored RowType ([#82](https://github.com/CategoricalData/hydra/issues/82)).
+- LLM-assisted PG schemas and mappings ([#171](https://github.com/CategoricalData/hydra/issues/171)).
+- Simplified unit-valued variants in Python ([#206](https://github.com/CategoricalData/hydra/issues/206)).
+- Checked for inconsistencies between Term/TTerm and Type/TType DSLs ([#218](https://github.com/CategoricalData/hydra/issues/218)).
+- GenPG demo: refactored to support Haskell, Python, and Java; Python runner;
+  Java generation; finalized output format.
+- Testing: extended test runners for let hoisting (Haskell, Python, Java);
+  floating-point precision tests; ordering tests for `hydra.lib.maps`/`hydra.lib.sets`;
+  inference tests for inferred System F terms; case-hoisting test cases; new JSON coder tests;
+  thorough test cases for all primitives ([#199](https://github.com/CategoricalData/hydra/issues/199)).
+
+### Bug fixes
+
+- Fixed interpreter bugs causing test failures ([#235](https://github.com/CategoricalData/hydra/issues/235)).
+- Fixed bug in type checking in connection with dead code.
+- Fixed bug in `removeTypesFromTerm`.
+- Fixed bug in `typeOfMap`.
+- Fixed 32-bit max int value in `hydra.constants`.
+- Fixed numeric precision in Python.
+- Added `BigDecimal` support and fixed `uint8` (short) support in Java.
+- Fixed Haskell coder with respect to imports for binary literals.
+- Excluded `Prelude.encodeFloat` and `Prelude.decodeFloat` from generated Haskell
+  due to name collisions.
+- Fixed consistency issues in Python primitives:
+  `hydra.lib.sets.toList`, `hydra.lib.maps.union` (precedence),
+  `hydra.lib.strings.lines`, `hydra.lib.strings.readString` (dequoting),
+  `hydra.lib.lists.apply`, `hydra.lib.maps.toList`.
+- Fixed Haskell type signature of `hydra.lists.span`.
+- Fixed issue with eta expansion of typed terms.
+- Fixed shadowing issue in generated encoding modules.
+- Added missing alternatives in `hydra.rewriting.rewriteTermM`.
+
+### Documentation
+
+- Updated main README with complete implementation status.
+- Added Documentation sections to all implementation READMEs.
+- Fixed outdated Code-organization.md (Python now uses `src/gen-main`).
+- Fixed incorrect code paths in Implementation.md.
+- Added Java section to Testing wiki.
+- Comprehensive developer recipes in `docs/recipes/`.
+- Documentation for tail-call optimization implementation.
+- Added Haddock comments to Haskell primitives.
+- Created wiki page on the release process ([#194](https://github.com/CategoricalData/hydra/issues/194)).
+
+### Community
+
+- Accepted babeloff's `isTrivialTerm` changes.
+
+---
+
+## [0.12.0] - 2025-08-28
+
+A consolidation release: significant Python progress, kernel-level cleanup,
+and a wave of bookkeeping closures for Hydra-Java module ports.
+
+### Breaking changes
+
+- Removed `hydra.decoding` module ([#190](https://github.com/CategoricalData/hydra/issues/190)).
+- Flattened dependency tiers; eliminated tier-1, tier-2, tier-3 organization ([#184](https://github.com/CategoricalData/hydra/issues/184)).
+- Removed `typed` term variant ([#173](https://github.com/CategoricalData/hydra/issues/173), [#162](https://github.com/CategoricalData/hydra/issues/162)).
+- Module naming changes: moved tabular and relational modules into kernel ([#152](https://github.com/CategoricalData/hydra/issues/152)).
+- Standardized on uncurried helper functions in term-level DSLs ([#174](https://github.com/CategoricalData/hydra/issues/174)).
+- Renamed `hydra.lib.flows.traverseOptional` to `hydra.lib.flows.mapOptional`.
+- Eliminated camel-cased namespace parts from the kernel ([#152](https://github.com/CategoricalData/hydra/issues/152)).
+- Replaced list and optional eliminations with primitive functions ([#150](https://github.com/CategoricalData/hydra/issues/150)).
+- Moved `Hydra.Ext` to hydra-ext ([#178](https://github.com/CategoricalData/hydra/issues/178)); moved 'ext' sources into hydra-ext ([#189](https://github.com/CategoricalData/hydra/issues/189)).
+
+### New features
+
+- Significant progress toward Hydra-Python completion:
+  generated all kernel types and terms into Python;
+  added `Decimal` support for bigfloat values;
+  environment tracking for variable scoping;
+  generated `hydra.languages` into Python;
+  `__hash__` and `__eq__` on serializable generated classes ([#160](https://github.com/CategoricalData/hydra/issues/160)).
+- Designated `unit` term and type variants ([#186](https://github.com/CategoricalData/hydra/issues/186)).
+- `hydra.lib.flows.mapElems` and `hydra.lib.flows.mapKeys` utilities.
+- Promoted JSON coder into the DSL ([#181](https://github.com/CategoricalData/hydra/issues/181)).
+- Promoted JSON utilities into the DSL ([#181](https://github.com/CategoricalData/hydra/issues/181)).
+- C# coder ([#139](https://github.com/CategoricalData/hydra/issues/139)).
+- GQL model and parser ([#140](https://github.com/CategoricalData/hydra/issues/140)).
+- Tabular adapters ([#142](https://github.com/CategoricalData/hydra/issues/142)).
+- Type-level C++ coder ([#170](https://github.com/CategoricalData/hydra/issues/170)).
+- Variable-types-to-Haskell-typedefs transformation ([#70](https://github.com/CategoricalData/hydra/issues/70)).
+- A newline at the end of each generated file ([#154](https://github.com/CategoricalData/hydra/issues/154)).
+- Refactor kernel modules and primitives by connectivity ([#177](https://github.com/CategoricalData/hydra/issues/177)).
+
+### Improvements
+
+- Condensed repeated elements in error traces ([#165](https://github.com/CategoricalData/hydra/issues/165)).
+- Fixed transitive schema dependencies ([#185](https://github.com/CategoricalData/hydra/issues/185)).
+- Improved adapter solution with respect to literals.
+- Better handling of type variables in Python coder.
+- Enhanced term-level Python generation with proper ordering to minimize forward references.
+- Topo-sort helper function for dependency management.
+- Updated all Python libraries with latest changes.
+- Distinguished between deannotation and detyping of terms.
+- Adapted primitives when applying language constraints to a graph.
+- Use unqualified names where possible in generated code ([#153](https://github.com/CategoricalData/hydra/issues/153)).
+- Eliminated `Data.Graph` (containers) dependency ([#167](https://github.com/CategoricalData/hydra/issues/167)).
+- "Close the loop" demonstration ([#175](https://github.com/CategoricalData/hydra/issues/175)).
+- Implemented `typeOf` ([#168](https://github.com/CategoricalData/hydra/issues/168)).
+
+### Bug fixes
+
+- Fixed System F terms for records and case statements ([#168](https://github.com/CategoricalData/hydra/issues/168)).
+- Fixed issue with transitive type-level module dependencies ([#185](https://github.com/CategoricalData/hydra/issues/185)).
+- Corrected handling of variable references in Python application terms.
+- Fixed nullary functions in Python (added empty parens).
+- Added missing alternatives in `hydra.rewriting.rewriteTermM`.
+
+### Bookkeeping
+
+- Closed long-standing Hydra-Java module-port issues
+  ([#9](https://github.com/CategoricalData/hydra/issues/9), [#11](https://github.com/CategoricalData/hydra/issues/11), [#15](https://github.com/CategoricalData/hydra/issues/15), [#16](https://github.com/CategoricalData/hydra/issues/16), [#18](https://github.com/CategoricalData/hydra/issues/18), [#19](https://github.com/CategoricalData/hydra/issues/19), [#20](https://github.com/CategoricalData/hydra/issues/20), [#21](https://github.com/CategoricalData/hydra/issues/21), [#22](https://github.com/CategoricalData/hydra/issues/22), [#23](https://github.com/CategoricalData/hydra/issues/23), [#25](https://github.com/CategoricalData/hydra/issues/25), [#44](https://github.com/CategoricalData/hydra/issues/44), [#45](https://github.com/CategoricalData/hydra/issues/45));
+  most of the underlying work shipped in earlier releases.
+- Closed Hydra-Java DSL-port issues ([#24](https://github.com/CategoricalData/hydra/issues/24), [#26](https://github.com/CategoricalData/hydra/issues/26), [#27](https://github.com/CategoricalData/hydra/issues/27), [#28](https://github.com/CategoricalData/hydra/issues/28), [#29](https://github.com/CategoricalData/hydra/issues/29)) and
+  the Scala/Avro tracking issues ([#77](https://github.com/CategoricalData/hydra/issues/77), [#81](https://github.com/CategoricalData/hydra/issues/81)); these had been resolved
+  by earlier releases (Scala in 0.14.0, Avro bidi in 0.14.0).
+
+### Documentation
+
+- Updated Hydra-Haskell README.
+- Updated Hydra-Java README with corrected links.
+- Updated JavaDocs.
+
+---
+
+## [0.11.0] - 2025-03-16
+
+Untagged in-repository version.
+A type-inference rebase release: major restructuring of inference internals
+to align with Algorithm W, plus a sweeping removal of explicit type annotations
+across the kernel.
+
+### Highlights
+
+- **Inference rebased on Algorithm W** ([#118](https://github.com/CategoricalData/hydra/issues/118)): unify-early strategy ([#146](https://github.com/CategoricalData/hydra/issues/146)),
+  infinite-type checks restored ([#116](https://github.com/CategoricalData/hydra/issues/116)), recursive-element inference ([#90](https://github.com/CategoricalData/hydra/issues/90)),
+  unified handling of elements and let bindings ([#112](https://github.com/CategoricalData/hydra/issues/112)), minimized manual
+  type annotations ([#119](https://github.com/CategoricalData/hydra/issues/119)).
+- **`hydra.inference` module** introduced for inference type definitions;
+  substitution and unification moved up a level.
+
+### Breaking changes
+
+- Argument order of `Logic.ifElse` changed ([#147](https://github.com/CategoricalData/hydra/issues/147)).
+
+### New features
+
+- Inference test cases promoted into the common test suite ([#148](https://github.com/CategoricalData/hydra/issues/148));
+  added "kernel examples" inference tests; more recursion / mutual recursion cases.
+
+### Improvements
+
+- Removed type annotations across all kernel sources ([#119](https://github.com/CategoricalData/hydra/issues/119)).
+- Migrated to fully-applied primitive library DSLs ([#157](https://github.com/CategoricalData/hydra/issues/157)).
+- Aligned `Graph` and `Element` with `LetBinding` ([#159](https://github.com/CategoricalData/hydra/issues/159)).
+- `hydra.core.Unit` recognized by the Haskell coder.
+- Refactored inference tests.
+
+### Bug fixes
+
+- Fix for underdetermined type in `hydra.decode`.
+
+---
+
+## [0.10.0] - 2025-02-19
+
+Untagged in-repository version.
+Adds Hydra-Python (initial completion), a GraphSON coder,
+provisional Hydra-Go support, and dot-separated namespace conventions.
+
+### Highlights
+
+- **Hydra-Python initial completion** ([#80](https://github.com/CategoricalData/hydra/issues/80), [#66](https://github.com/CategoricalData/hydra/issues/66)): Python coder, generated kernel
+  modules in Python, and full library implementations across kernel namespaces.
+- **GraphSON coder** ([#79](https://github.com/CategoricalData/hydra/issues/79)).
+- **Provisional Hydra-Go** ([#65](https://github.com/CategoricalData/hydra/issues/65)).
+- **Namespace formatting** standardized to dot-separated form ([#151](https://github.com/CategoricalData/hydra/issues/151)).
+
+### Breaking changes
+
+- All namespaces use dot-separated form ([#151](https://github.com/CategoricalData/hydra/issues/151)).
+
+### New features
+
+- Hydra-Python: Python coder; generated `hydra.coreEncoding`, `hydra.strip`,
+  `hydra.literals` and other kernel modules in Python; tuple-expression support;
+  updated `hydra.constants` in Python.
+- GraphSON coder ([#79](https://github.com/CategoricalData/hydra/issues/79)).
+- Provisional Hydra-Go ([#65](https://github.com/CategoricalData/hydra/issues/65)).
+- `string-to-char-list` and `char-list-to-string` primitives ([#149](https://github.com/CategoricalData/hydra/issues/149)).
+- Restored normalization for generated term variables ([#145](https://github.com/CategoricalData/hydra/issues/145)).
+
+### Improvements
+
+- Re-leveled dependency tiers ([#135](https://github.com/CategoricalData/hydra/issues/135)).
+- Updated all Java, Haskell, hydra-ext, and Python primitives to current sources.
+
+---
+
+## [0.9.0] - 2025-01-06
+
+Untagged in-repository version.
+Bootstraps Hydra-Python and the JSON Schema coder; introduces a fluent Java DSL for flows.
+
+### Highlights
+
+- **JSON Schema coder** ([#141](https://github.com/CategoricalData/hydra/issues/141)).
+- **Python coder scaffold**: serde, language constraints, and generated Haskell
+  sources for Python.
+- **Fluent-style Java DSL for flows** ([#143](https://github.com/CategoricalData/hydra/issues/143)).
+
+### New features
+
+- JSON Schema coder ([#141](https://github.com/CategoricalData/hydra/issues/141)).
+- Python coder scaffold and serde.
+- Provisional Python language constraints module.
+- Fluent-style Java DSL for flows ([#143](https://github.com/CategoricalData/hydra/issues/143)); moved Flows DSL into `hydra.dsl`.
+- New `hydra.coders` DSL.
+- New DSL functions for core variants.
+
+### Improvements
+
+- Generalized `Namespaces` so it can be used for languages other than Haskell.
+- Local-name-only Python type aliases (the directory tree provides the namespace).
+- Coders DSL used to simplify Java language-constraint sources.
+- Removed redundant productions in the Python grammar.
+- Added unit tests for fluent flows.
+
+### Documentation
+
+- Updated JavaDocs for 0.9.0.
+
+---
+
+## [0.8.1] - 2024-09-24
+
+Patch release.
+
+### Improvements
+
+- Generalized the property graph merging utility to accept type systems other than Hydra Core.
+
+---
+
+## [0.8.0] - 2024-09-09
+
+C# support ([#139](https://github.com/CategoricalData/hydra/issues/139)), Graphviz DOT coder, term accessors, and a small breaking change in Java
+to support Spark.
+
+### Breaking changes
+
+- Made `FlowException` serializable for Spark support (may affect existing error handling).
+
+### New features
+
+- C# syntax module based on the Microsoft ANTLR grammar ([#139](https://github.com/CategoricalData/hydra/issues/139)).
+- Graphviz DOT coder ([#136](https://github.com/CategoricalData/hydra/issues/136)):
+  full support for lambdas and recursive `let` statements;
+  compact 'accessor graph' visualization option;
+  customizable label styles;
+  highlighted let-bound terms; edge labels.
+- Term accessor type to facilitate lenses and path-aware transformations.
+- OpenGQL grammar and generated Haskell for the OpenGQL model ([#140](https://github.com/CategoricalData/hydra/issues/140)).
+
+### Improvements
+
+- Added `</>` as alternative to `@@` application operator in Haskell DSLs.
+- Utilities for working with term accessors.
+- More specific exception class for JSON decoding.
+- Additional convenience methods on `JsonDecoding.java`.
+- Used transitive dependencies in hydra-java and hydra-ext.
+- Upgraded ANTLR to address a vulnerability.
+- Moved TinkerPop utilities from `hydra/ext/org/apache/tinkerpop` into `hydra/pg`.
+
+---
+
+## [0.7.0] - 2024-08-21
+
+Major refactoring of module organization and namespace management.
+Establishes the DNS-style namespace convention in hydra-ext
+and lifts property-graph models into a top-level `hydra/pg` namespace.
+
+### Breaking changes
+
+- Namespace reorganization: migrated to DNS-based module naming in hydra-ext ([#138](https://github.com/CategoricalData/hydra/issues/138)):
+  `hydra/ext/avro` → `hydra/ext/org/apache/avro`,
+  `hydra/ext/graphql` → `hydra/ext/org/graphql`,
+  `hydra/ext/yaml` → `hydra/ext/org/yaml`,
+  `hydra/ext/json/decoding` → `hydra/ext/org/json/decoding`,
+  `hydra/ext/rdf` → `hydra/ext/org/w3/rdf`,
+  `hydra/ext/shacl` → `hydra/ext/org/w3/shacl`,
+  `hydra/ext/tinkerpop` → `hydra/ext/org/apache/tinkerpop`.
+- Property graphs: promoted property graph modules from
+  `hydra/ext/org/apache/tinkerpop` to `hydra/pg`.
+- Project structure: renamed `hydra-extensions` to `hydra-ext`;
+  renamed `hydra/langs` to `hydra/ext` ([#138](https://github.com/CategoricalData/hydra/issues/138));
+  made hydra-ext into a Gradle subproject alongside hydra-java;
+  added top-level Gradle build.
+
+### Improvements
+
+- Moved TinkerPop modules from hydra-haskell into hydra-ext for better separation.
+- Moved miscellaneous models to `Hydra.Ext.Other` ([#138](https://github.com/CategoricalData/hydra/issues/138)).
+- Moved XML Schema, SQL, ShEx, and OWL models to hydra-ext.
+- Moved KQL, Parquet, and Python modules to hydra-ext.
+- Separated JavaDocs for hydra-java and hydra-ext.
+- Updated publishing configuration in `build.gradle`.
+
+---
+
+## [0.6.0] - 2024-08-19
+
+Type-system improvements (System F type abstraction/application; eliminated polymorphic
+types from Hydra Core), expanded language support (Graphviz DOT model, generated Java
+field-name constants), and revamped annotation handling.
+
+### Breaking changes
+
+- Eliminated `InferenceContext` helper type ([#103](https://github.com/CategoricalData/hydra/issues/103)).
+- Changed typing environment from `Map Name Type` to `Map Name TypeScheme` in graphs ([#76](https://github.com/CategoricalData/hydra/issues/76)).
+- Updated annotations and flows to use `map<Name, Term>` instead of `map<string, Term>` ([#133](https://github.com/CategoricalData/hydra/issues/133)).
+- Unified `Name` and `FieldName`; aliased to `string` ([#121](https://github.com/CategoricalData/hydra/issues/121)).
+- Renamed `hydra/core.UnitType` to `hydra/core.Unit` ([#123](https://github.com/CategoricalData/hydra/issues/123)).
+- Eliminated annotation classes; Hydra has a single built-in notion of annotations ([#113](https://github.com/CategoricalData/hydra/issues/113)).
+- Unified the `Nominal` type with `RowType` ([#115](https://github.com/CategoricalData/hydra/issues/115)).
+- Removed the `extends` parameter for row types ([#132](https://github.com/CategoricalData/hydra/issues/132)).
+- Replaced `hydra/Kv` with `hydra/Annotations` (rename revisited).
+
+### New features
+
+- System F support: `typeAbstraction` and `typeApplication` term constructors.
+- Python3 syntax model based on the official Python BNF ([#80](https://github.com/CategoricalData/hydra/issues/80)).
+- Graphviz DOT model and initial support ([#136](https://github.com/CategoricalData/hydra/issues/136)).
+- Field-name constants generated in Java code generation ([#137](https://github.com/CategoricalData/hydra/issues/137)).
+- Provisional Algorithm W implementation in Haskell (originally from @wisnesky), kept for reference.
+
+### Improvements
+
+- Primitive organization: Hydra primitives organized into libraries for namespace management.
+- Code generation:
+  - Escaped field name constants and `with_` methods in Java coder.
+  - Generated field name constants in Java ([#137](https://github.com/CategoricalData/hydra/issues/137)).
+  - Avoided duplicated comments in wrapper classes in generated Java.
+  - Removed superfluous newtype comments in Haskell coder.
+- Updated Delta Parquet model to follow the Java API more closely.
+- Enriched OpenCypher features module with the complete list of standard Cypher functions.
+- Added convenience methods to `JsonEncoding.java`.
+- Restored `Hydra.Inference` subdirectory.
+- Allowed arbitrary case for element names ([#7](https://github.com/CategoricalData/hydra/issues/7)).
+- Corrected `uint8` representation in Java to `Short` ([#120](https://github.com/CategoricalData/hydra/issues/120)).
+
+### Bug fixes
+
+- Fixed handling of type annotations in term adapters.
+- Fixed decoding of encoded terms annotated with a type.
+- Corrected encoding of universal types in `showTerm` ([#117](https://github.com/CategoricalData/hydra/issues/117)).
+
+---
+
+## [0.5.3] - 2024-08-06
+
+Patch release.
+Preserves order of map key/value pairs and set elements during JSON serialization.
+
+### Bug fixes
+
+- Preserved ordering of key/value pairs and set elements in JSON output.
+
+### New features
+
+- Polymorphic `equal` primitive in Haskell and Java.
+- Generated Hydra type definitions together with native instantiations of Hydra types
+  in Haskell (a stepping stone toward generated coders, [#47](https://github.com/CategoricalData/hydra/issues/47)).
+
+---
+
+## [0.5.1] - 2024-08-01
+
+Patch release.
+Dependency updates and minor improvements following the 0.5.0 Hydra Core overhaul.
+
+### Improvements
+
+- Updated dependencies.
+
+---
+
+## [0.5.0] - 2024-07-26
+
+Untagged in-repository version.
+Major Hydra Core overhaul: eliminates polymorphic types in favor of explicit
+TypeScheme; consolidates the annotation system; revamps `Let` term encoding.
+
+### Breaking changes
+
+- Eliminated polymorphic types from Hydra Core in Haskell ([#125](https://github.com/CategoricalData/hydra/issues/125)):
+  removed type parameters from `hydra/core` types in Hydra-Java; replaced type schemes
+  with forall types ([#76](https://github.com/CategoricalData/hydra/issues/76)).
+- Revamped core encoding and `Let`: bindings are now a list of
+  `(name, term, optional type scheme)` triplets instead of a map.
+- Unified typed-term types and moved `TypeScheme` into Hydra Core.
+- Eliminated `AnnotationClass`; Hydra has a single built-in notion of annotations now ([#113](https://github.com/CategoricalData/hydra/issues/113)).
+- Renamed and refactored phantom-type wrappers ([#128](https://github.com/CategoricalData/hydra/issues/128)); removed deprecated `Reference`
+  type from `hydra/phantoms`.
+- Removed incomplete support for stream types and stream terms ([#88](https://github.com/CategoricalData/hydra/issues/88)).
+
+### New features
+
+- `LiteralTypes` DSL module so literals can be built independently of terms.
+- `Hydra.Minimal` module to facilitate collaboration on Hydra application prototypes.
+- `TypeConstraint` type added to the kernel.
+- `foldl` primitive in Haskell and Java; DSL uses `foldl` instead of the built-in
+  list elimination term by default.
+
+### Improvements
+
+- Improvements to Java and JSON coders; improved untyped JSON coder.
+- Pre-order and post-order term-traversal test cases added.
+- Refactored type inference tests.
+- Restored generated Java (Core through Tier 3) with only a few manual tweaks.
+- Element names allow arbitrary case ([#7](https://github.com/CategoricalData/hydra/issues/7)).
+
+---
+
+## [0.4.0] - 2024-07-10
+
+Untagged in-repository version.
+Adds null checks to generated Java (breaking, but justified — Hydra-Java disallows nulls),
+the Gremlin model, and Protobuf annotation refinements.
+
+### Breaking changes
+
+- Null checks added to constructors and `withXXX()` methods in generated Java;
+  null values are no longer permitted in Hydra-Java.
+- Removed Java 8 restriction (raised minimum Java version).
+
+### New features
+
+- Gremlin model ([#127](https://github.com/CategoricalData/hydra/issues/127)); generated Haskell for Gremlin.
+- `hydra/lib/lists.safeHead` primitive in Haskell (necessary in Java due to eager evaluation).
+- Support for Protobuf `deprecated=true` annotation; non-string Protobuf options.
+- Java options in generated Protobuf.
+
+### Improvements
+
+- Used `java.util.Objects.requireNonNull` instead of a custom null check in generated Java.
+- Added 'automatically generated file' disclaimer to generated Java files.
+- Added autogen comments and null checks to (most) generated Java.
+- Added necessary schema-level dependencies for built-in modules.
+- Added null checks to the Flows DSL in Java.
+
+---
+
+## [0.3.0] - 2024-06-05
+
+Untagged in-repository version.
+Adds an OpenCypher parser based on an ANTLR grammar ([#124](https://github.com/CategoricalData/hydra/issues/124)),
+a KQL (Kusto Query Language) model and serializer,
+a Delta Parquet model,
+and an early property graph queries model in the style of Cypher.
+
+### New features
+
+- OpenCypher parser based on the OpenCypher M23 ANTLR grammar ([#124](https://github.com/CategoricalData/hydra/issues/124));
+  ANTLR added as a build dependency;
+  large Cypher test suite drawn from the Cypher Manual.
+- Cypher-to-PG-query transformer (Java; partially implemented).
+- Property graph queries DSL and generated property graph query classes in Java.
+- Property graph queries model (Cypher / future GQL style).
+- KQL (Kusto Query Language) initial model and basic serializer.
+- Delta Parquet model with generated sources.
+
+### Improvements
+
+- Java options and `deprecated=true` support in generated Protobuf.
+- Convenience methods in Java.
+
+---
+
+## [0.2.0] - 2024-01-10
+
+Hydra-Java 0.2.0 release.
+Significant Java tooling and DSL build-out, Protobuf bidirectional coder,
+Python3 syntax model ([#80](https://github.com/CategoricalData/hydra/issues/80)), property graph validation ([#100](https://github.com/CategoricalData/hydra/issues/100)),
+JSON bidirectional support in Java ([#104](https://github.com/CategoricalData/hydra/issues/104)),
+OpenCypher initial model ([#108](https://github.com/CategoricalData/hydra/issues/108)),
+Cypher unification, and the start of the typed-DSL story in Haskell.
+
+### New features
+
+- Property graph validation: validator type, optionality on property types,
+  customizable id/property handling in the merging adapter, fine-tuned validation,
+  comprehensive unit tests in Java ([#100](https://github.com/CategoricalData/hydra/issues/100)).
+- Bidirectional JSON serialization/deserialization in Java ([#104](https://github.com/CategoricalData/hydra/issues/104)).
+- Checkstyle configuration based on Google style guide ([#111](https://github.com/CategoricalData/hydra/issues/111)).
+- Python3 syntax model based on the official Python BNF ([#80](https://github.com/CategoricalData/hydra/issues/80)).
+- Initial OpenCypher model and parser scaffold ([#108](https://github.com/CategoricalData/hydra/issues/108)).
+- Protobuf coder ([#99](https://github.com/CategoricalData/hydra/issues/99)): type encoder, field numbering, formatting, deprecated annotation,
+  Java options, non-string options.
+- Adapter framework tolerance of recursive types ([#58](https://github.com/CategoricalData/hydra/issues/58)); default branch for case
+  statements ([#60](https://github.com/CategoricalData/hydra/issues/60)).
+- Topological sort in type inference ([#67](https://github.com/CategoricalData/hydra/issues/67)).
+- `hydra/query` model ([#73](https://github.com/CategoricalData/hydra/issues/73)).
+- Records-to-TinkerPop-elements coder ([#64](https://github.com/CategoricalData/hydra/issues/64)).
+- Equality primitives for all literal types ([#92](https://github.com/CategoricalData/hydra/issues/92)); polymorphic logic primitives ([#95](https://github.com/CategoricalData/hydra/issues/95)).
+- `mapKeys` primitive ([#93](https://github.com/CategoricalData/hydra/issues/93)).
+- Tuple support in Java ([#94](https://github.com/CategoricalData/hydra/issues/94)).
+- Java 8 as an optional target ([#96](https://github.com/CategoricalData/hydra/issues/96)); optionally generate Java classes as `Serializable` ([#97](https://github.com/CategoricalData/hydra/issues/97)).
+- Bidirectional "merged vertex" and "merged edge" coders ([#106](https://github.com/CategoricalData/hydra/issues/106)).
+- Nullability and parameterization in the tabular model ([#107](https://github.com/CategoricalData/hydra/issues/107)).
+- Term-level / type-level dependency distinction for modules ([#109](https://github.com/CategoricalData/hydra/issues/109)).
+- Flatten nested `let` terms for transformation into Java ([#110](https://github.com/CategoricalData/hydra/issues/110)).
+- Various `Flow` utilities in Java: `bind3`; convenience methods for consuming results;
+  `fromFlow` variants including one that throws.
+
+### Improvements
+
+- Hydra-Java module ports ([#10](https://github.com/CategoricalData/hydra/issues/10), [#12](https://github.com/CategoricalData/hydra/issues/12), [#13](https://github.com/CategoricalData/hydra/issues/13), [#14](https://github.com/CategoricalData/hydra/issues/14), [#17](https://github.com/CategoricalData/hydra/issues/17), [#30](https://github.com/CategoricalData/hydra/issues/30), [#31](https://github.com/CategoricalData/hydra/issues/31), [#32](https://github.com/CategoricalData/hydra/issues/32), [#33](https://github.com/CategoricalData/hydra/issues/33), [#34](https://github.com/CategoricalData/hydra/issues/34), [#35](https://github.com/CategoricalData/hydra/issues/35),
+  [#38](https://github.com/CategoricalData/hydra/issues/38), [#39](https://github.com/CategoricalData/hydra/issues/39), [#41](https://github.com/CategoricalData/hydra/issues/41), [#43](https://github.com/CategoricalData/hydra/issues/43), [#48](https://github.com/CategoricalData/hydra/issues/48), [#71](https://github.com/CategoricalData/hydra/issues/71), [#72](https://github.com/CategoricalData/hydra/issues/72), [#75](https://github.com/CategoricalData/hydra/issues/75), [#83](https://github.com/CategoricalData/hydra/issues/83)):
+  `Common`, `CoreEncoding`, `CoreLanguage`, `Kernel`, `Flows`, `Lists`, `Literals`,
+  `Math`, `Sets`, `Strings`, `Optionals`, `Maps`, `Flows` primitives, `Sets` primitives.
+- Common DSLs in Haskell: Flow support ([#68](https://github.com/CategoricalData/hydra/issues/68)), Let support ([#69](https://github.com/CategoricalData/hydra/issues/69)).
+- Renamed annotation type parameter `m` to `a` ([#41](https://github.com/CategoricalData/hydra/issues/41)).
+- Updated wrapper, element, and variable types ([#75](https://github.com/CategoricalData/hydra/issues/75)).
+- Removed `schema` field from `Element` ([#83](https://github.com/CategoricalData/hydra/issues/83)).
+- GraphQL coder ([#78](https://github.com/CategoricalData/hydra/issues/78)).
+- Code quality:
+  - Updated main and test sources to conform to Checkstyle configuration ([#111](https://github.com/CategoricalData/hydra/issues/111)).
+  - Extended line-length limit from 100 to 120 characters.
+  - Disabled overly restrictive indentation and import-order rules.
+  - Disabled `RightCurlyAlone` for compact inline map definitions.
+- Streamlined property-graph element merging to unify properties with identical
+  keys and types ([#106](https://github.com/CategoricalData/hydra/issues/106)).
+- Convenience functions for printing literals and literal types in the Java DSL.
+- Minor addition to JSON decoding.
+- DSL convenience: alphabetic-case flexibility for element names ([#7](https://github.com/CategoricalData/hydra/issues/7)).
+
+### Bug fixes
+
+- Fixed type annotations for the Sets Java port ([#48](https://github.com/CategoricalData/hydra/issues/48)).
+- Various minor fixes during the Java module ports.
+
+---
+
+## [0.1.1] - 2022-12-04
+
+Patch release the same day as 0.1.0.
+README polish only.
+
+---
+
+## [0.1.0] - 2022-12-04
+
+First packaged release of Hydra (Hackage).
+This release contains the complete foundation of Hydra.
+
+### Core language
+
+- Hydra's core type and data languages (`hydra.core`).
+- Core models for graphs and modules.
+- Computation model with the `Flow` monad.
+- BNF grammars support.
+- Phantom types.
+- Basic operations on types and terms.
+
+### Type system
+
+- Hindley–Milner-style type inference.
+- Type schemes with polymorphism.
+- Type/term validation.
+
+### Transformations
+
+- Adapter system: type-to-type rewriting and transformation.
+- Coders:
+  Haskell coder (types and terms),
+  Java coder (types and terms),
+  partial Scala coder (terms only),
+  Avro coder,
+  JSON coder,
+  PDL (Pegasus Data Language) coder,
+  RDF + SHACL coder,
+  YAML coder.
+
+### Language support
+
+- Models for GraphQL, OWL (Web Ontology Language), ShEx (Shape Expressions),
+  and TinkerPop-style property graphs.
+
+### Developer tools
+
+- Type-construction DSL and term-construction DSL.
+- QuickCheck property-based tests.
+
+### Implementations
+
+- Hydra-Haskell: bootstrapping implementation with full kernel.
+- Hydra-Java: Java implementation with mature tooling.
+
+### Community
+
+- Set up the LambdaGraph Discord server ([#2](https://github.com/CategoricalData/hydra/issues/2)).
+
+---
+
+## Contributing
+
+We welcome contributions! Please see:
+
+- [Developer recipes](https://github.com/CategoricalData/hydra/tree/main/docs/recipes)
+- [LambdaGraph Discord](https://bit.ly/lg-discord)
+
+## Release process
+
+See the [Release policy](https://github.com/CategoricalData/hydra/wiki/Release-policy)
+wiki page and [docs/release-workflow.md](docs/release-workflow.md)
+for information on how Hydra releases are versioned, built, and published.
diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/NOTICE b/NOTICE
new file mode 100644
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,3 @@
+Hydra
+Copyright 2021-2026 The Hydra authors
+https://github.com/CategoricalData/hydra
diff --git a/hydra-pg.cabal b/hydra-pg.cabal
new file mode 100644
--- /dev/null
+++ b/hydra-pg.cabal
@@ -0,0 +1,81 @@
+cabal-version: 1.12
+
+-- This file has been generated from package.yaml by hpack version 0.39.1.
+--
+-- see: https://github.com/sol/hpack
+
+name:           hydra-pg
+version:        0.17.0
+synopsis:       Hydra's property-graph (TinkerPop/Gremlin) model and coder support
+description:    Hydra is an implementation of the LambdaGraph data model, which takes advantage of an isomorphism between labeled hypergraphs and typed lambda calculus: in Hydra, "graphs are programs, and programs are graphs". Property graph support for Hydra
+category:       Data
+homepage:       https://github.com/CategoricalData/hydra#readme
+bug-reports:    https://github.com/CategoricalData/hydra/issues
+author:         Joshua Shinavier <josh@fortytwo.net>
+maintainer:     Joshua Shinavier <josh@fortytwo.net>
+license:        Apache-2.0
+license-file:   LICENSE
+build-type:     Simple
+extra-source-files:
+    LICENSE
+    NOTICE
+    CHANGELOG.md
+
+source-repository head
+  type: git
+  location: https://github.com/CategoricalData/hydra
+
+library
+  exposed-modules:
+      Com.Gdblab.PathAlgebra.Expressions
+      Com.Gdblab.PathAlgebra.Syntax
+      Hydra.Cypher.Features
+      Hydra.Cypher.OpenCypher
+      Hydra.Decode.Neo4j.Model
+      Hydra.Decode.Pg.Mapping
+      Hydra.Decode.Pg.Model
+      Hydra.Demos.Genpg.Transform
+      Hydra.Dsl.Pg.Model
+      Hydra.Encode.Neo4j.Model
+      Hydra.Encode.Pg.Mapping
+      Hydra.Encode.Pg.Model
+      Hydra.Error.Neo4j
+      Hydra.Error.Pg
+      Hydra.Graphviz.Coder
+      Hydra.Graphviz.Dot
+      Hydra.Graphviz.Serde
+      Hydra.Neo4j.Model
+      Hydra.Neo4j.Pg
+      Hydra.Pg.Coder
+      Hydra.Pg.Graphson.Coder
+      Hydra.Pg.Graphson.Construct
+      Hydra.Pg.Graphson.Syntax
+      Hydra.Pg.Graphson.Utils
+      Hydra.Pg.Mapping
+      Hydra.Pg.Model
+      Hydra.Pg.Printing
+      Hydra.Pg.Query
+      Hydra.Pg.Rdf.Environment
+      Hydra.Pg.Rdf.Mappings
+      Hydra.Pg.TermsToElements
+      Hydra.Pg.Utils
+      Hydra.Show.Error.Pg
+      Hydra.Tinkerpop.Examples.Modern
+      Hydra.Tinkerpop.Features
+      Hydra.Tinkerpop.Gremlin
+      Hydra.Tinkerpop.Language
+      Hydra.Validate.Neo4j
+      Hydra.Validate.Pg
+      OpenGql.Grammar
+  other-modules:
+      Paths_hydra_pg
+  hs-source-dirs:
+      src/main/haskell
+  build-depends:
+      base >=4.19.0 && <4.22
+    , bytestring >=0.11.5 && <0.13
+    , containers >=0.6.7 && <0.8
+    , hydra-kernel ==0.17.0
+    , hydra-rdf ==0.17.0
+    , scientific >=0.3.7 && <0.4
+  default-language: Haskell2010
diff --git a/src/main/haskell/Com/Gdblab/PathAlgebra/Expressions.hs b/src/main/haskell/Com/Gdblab/PathAlgebra/Expressions.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Com/Gdblab/PathAlgebra/Expressions.hs
@@ -0,0 +1,404 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Algebraic expression trees for the path algebra by Angles et al., extended for GQL support
+
+module Com.Gdblab.PathAlgebra.Expressions where
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Json.Model as Model
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Query as Query
+import qualified Hydra.Relational as Relational
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Complete query with path algebra and result projection
+data QueryExpression =
+  QueryExpression {
+    queryExpressionPathExpression :: PathExpression,
+    queryExpressionResultProjection :: (Maybe ResultProjection)}
+  deriving (Eq, Ord, Read, Show)
+_QueryExpression = Core.Name "com.gdblab.pathAlgebra.expressions.QueryExpression"
+_QueryExpression_pathExpression = Core.Name "pathExpression"
+_QueryExpression_resultProjection = Core.Name "resultProjection"
+-- | A path algebra expression that evaluates to a set of paths
+data PathExpression =
+  -- | Base case: extract paths from graph
+  PathExpressionBase BaseExpression |
+  -- | Selection operator (σ): filter paths by condition
+  PathExpressionSelection SelectionExpression |
+  -- | Join operator (⊲⊳): concatenate compatible paths
+  PathExpressionJoin JoinExpression |
+  -- | Union operator (∪): combine path sets
+  PathExpressionUnion UnionExpression |
+  -- | Recursive operator (φ): compute transitive closure with semantics
+  PathExpressionRecursive RecursiveExpression |
+  -- | Group-by operator (γ): organize paths into solution space
+  PathExpressionGroupBy GroupByExpression |
+  -- | Order-by operator (τ): sort solution space
+  PathExpressionOrderBy OrderByExpression |
+  -- | Projection operator (π): extract paths from solution space
+  PathExpressionProjection ProjectionExpression
+  deriving (Eq, Ord, Read, Show)
+_PathExpression = Core.Name "com.gdblab.pathAlgebra.expressions.PathExpression"
+_PathExpression_base = Core.Name "base"
+_PathExpression_selection = Core.Name "selection"
+_PathExpression_join = Core.Name "join"
+_PathExpression_union = Core.Name "union"
+_PathExpression_recursive = Core.Name "recursive"
+_PathExpression_groupBy = Core.Name "groupBy"
+_PathExpression_orderBy = Core.Name "orderBy"
+_PathExpression_projection = Core.Name "projection"
+-- | Base path expressions that extract paths from graph
+data BaseExpression =
+  -- | Paths0(G): all paths of length 0 (nodes)
+  BaseExpressionPaths0 GraphReference |
+  -- | Paths1(G): all paths of length 1 (edges)
+  BaseExpressionPaths1 GraphReference |
+  -- | Paths*(G): all paths in graph (infinite without restrictions)
+  BaseExpressionPathsStar GraphReference
+  deriving (Eq, Ord, Read, Show)
+_BaseExpression = Core.Name "com.gdblab.pathAlgebra.expressions.BaseExpression"
+_BaseExpression_paths0 = Core.Name "paths0"
+_BaseExpression_paths1 = Core.Name "paths1"
+_BaseExpression_pathsStar = Core.Name "pathsStar"
+-- | Reference to a property graph
+newtype GraphReference =
+  GraphReference {
+    unGraphReference :: String}
+  deriving (Eq, Ord, Read, Show)
+_GraphReference = Core.Name "com.gdblab.pathAlgebra.expressions.GraphReference"
+-- | Selection operator: σ_condition(expression)
+data SelectionExpression =
+  SelectionExpression {
+    selectionExpressionCondition :: SelectionCondition,
+    selectionExpressionExpression :: PathExpression}
+  deriving (Eq, Ord, Read, Show)
+_SelectionExpression = Core.Name "com.gdblab.pathAlgebra.expressions.SelectionExpression"
+_SelectionExpression_condition = Core.Name "condition"
+_SelectionExpression_expression = Core.Name "expression"
+-- | Conditions for filtering paths
+data SelectionCondition =
+  SelectionConditionSimple SimpleCondition |
+  SelectionConditionAnd AndCondition |
+  SelectionConditionOr OrCondition |
+  SelectionConditionNot NotCondition
+  deriving (Eq, Ord, Read, Show)
+_SelectionCondition = Core.Name "com.gdblab.pathAlgebra.expressions.SelectionCondition"
+_SelectionCondition_simple = Core.Name "simple"
+_SelectionCondition_and = Core.Name "and"
+_SelectionCondition_or = Core.Name "or"
+_SelectionCondition_not = Core.Name "not"
+-- | Atomic selection conditions
+data SimpleCondition =
+  SimpleConditionLabelEquals LabelCondition |
+  SimpleConditionPropertyEquals PropertyCondition |
+  SimpleConditionPropertyComparison PropertyComparisonCondition |
+  SimpleConditionLengthEquals LengthCondition
+  deriving (Eq, Ord, Read, Show)
+_SimpleCondition = Core.Name "com.gdblab.pathAlgebra.expressions.SimpleCondition"
+_SimpleCondition_labelEquals = Core.Name "labelEquals"
+_SimpleCondition_propertyEquals = Core.Name "propertyEquals"
+_SimpleCondition_propertyComparison = Core.Name "propertyComparison"
+_SimpleCondition_lengthEquals = Core.Name "lengthEquals"
+-- | Conditions on node/edge labels: label(node(i)) = v
+data LabelCondition =
+  LabelCondition {
+    labelConditionTarget :: PathElement,
+    labelConditionValue :: String}
+  deriving (Eq, Ord, Read, Show)
+_LabelCondition = Core.Name "com.gdblab.pathAlgebra.expressions.LabelCondition"
+_LabelCondition_target = Core.Name "target"
+_LabelCondition_value = Core.Name "value"
+-- | Property equality conditions: node(i).prop = v
+data PropertyCondition =
+  PropertyCondition {
+    propertyConditionTarget :: PathElement,
+    propertyConditionProperty :: String,
+    propertyConditionValue :: LiteralValue}
+  deriving (Eq, Ord, Read, Show)
+_PropertyCondition = Core.Name "com.gdblab.pathAlgebra.expressions.PropertyCondition"
+_PropertyCondition_target = Core.Name "target"
+_PropertyCondition_property = Core.Name "property"
+_PropertyCondition_value = Core.Name "value"
+-- | Property comparison conditions: node(i).prop > v, etc.
+data PropertyComparisonCondition =
+  PropertyComparisonCondition {
+    propertyComparisonConditionTarget :: PathElement,
+    propertyComparisonConditionProperty :: String,
+    propertyComparisonConditionOperator :: ComparisonOperator,
+    propertyComparisonConditionValue :: LiteralValue}
+  deriving (Eq, Ord, Read, Show)
+_PropertyComparisonCondition = Core.Name "com.gdblab.pathAlgebra.expressions.PropertyComparisonCondition"
+_PropertyComparisonCondition_target = Core.Name "target"
+_PropertyComparisonCondition_property = Core.Name "property"
+_PropertyComparisonCondition_operator = Core.Name "operator"
+_PropertyComparisonCondition_value = Core.Name "value"
+-- | Comparison operators for property conditions
+data ComparisonOperator =
+  ComparisonOperatorEqual |
+  ComparisonOperatorNotEqual |
+  ComparisonOperatorLessThan |
+  ComparisonOperatorLessThanOrEqual |
+  ComparisonOperatorGreaterThan |
+  ComparisonOperatorGreaterThanOrEqual
+  deriving (Eq, Ord, Read, Show)
+_ComparisonOperator = Core.Name "com.gdblab.pathAlgebra.expressions.ComparisonOperator"
+_ComparisonOperator_equal = Core.Name "equal"
+_ComparisonOperator_notEqual = Core.Name "notEqual"
+_ComparisonOperator_lessThan = Core.Name "lessThan"
+_ComparisonOperator_lessThanOrEqual = Core.Name "lessThanOrEqual"
+_ComparisonOperator_greaterThan = Core.Name "greaterThan"
+_ComparisonOperator_greaterThanOrEqual = Core.Name "greaterThanOrEqual"
+-- | Literal values for comparisons
+data LiteralValue =
+  LiteralValueString String |
+  LiteralValueInteger Int |
+  LiteralValueFloat Double |
+  LiteralValueBoolean Bool
+  deriving (Eq, Ord, Read, Show)
+_LiteralValue = Core.Name "com.gdblab.pathAlgebra.expressions.LiteralValue"
+_LiteralValue_string = Core.Name "string"
+_LiteralValue_integer = Core.Name "integer"
+_LiteralValue_float = Core.Name "float"
+_LiteralValue_boolean = Core.Name "boolean"
+-- | Condition on path length: len() = i
+data LengthCondition =
+  LengthCondition {
+    lengthConditionLength :: Int}
+  deriving (Eq, Ord, Read, Show)
+_LengthCondition = Core.Name "com.gdblab.pathAlgebra.expressions.LengthCondition"
+_LengthCondition_length = Core.Name "length"
+-- | References to elements within a path
+data PathElement =
+  PathElementNode Int |
+  PathElementEdge Int |
+  PathElementFirst |
+  PathElementLast
+  deriving (Eq, Ord, Read, Show)
+_PathElement = Core.Name "com.gdblab.pathAlgebra.expressions.PathElement"
+_PathElement_node = Core.Name "node"
+_PathElement_edge = Core.Name "edge"
+_PathElement_first = Core.Name "first"
+_PathElement_last = Core.Name "last"
+data AndCondition =
+  AndCondition {
+    andConditionLeft :: SelectionCondition,
+    andConditionRight :: SelectionCondition}
+  deriving (Eq, Ord, Read, Show)
+_AndCondition = Core.Name "com.gdblab.pathAlgebra.expressions.AndCondition"
+_AndCondition_left = Core.Name "left"
+_AndCondition_right = Core.Name "right"
+data OrCondition =
+  OrCondition {
+    orConditionLeft :: SelectionCondition,
+    orConditionRight :: SelectionCondition}
+  deriving (Eq, Ord, Read, Show)
+_OrCondition = Core.Name "com.gdblab.pathAlgebra.expressions.OrCondition"
+_OrCondition_left = Core.Name "left"
+_OrCondition_right = Core.Name "right"
+data NotCondition =
+  NotCondition {
+    notConditionCondition :: SelectionCondition}
+  deriving (Eq, Ord, Read, Show)
+_NotCondition = Core.Name "com.gdblab.pathAlgebra.expressions.NotCondition"
+_NotCondition_condition = Core.Name "condition"
+-- | Join operator: expr1 ⊲⊳ expr2
+data JoinExpression =
+  JoinExpression {
+    joinExpressionLeft :: PathExpression,
+    joinExpressionRight :: PathExpression}
+  deriving (Eq, Ord, Read, Show)
+_JoinExpression = Core.Name "com.gdblab.pathAlgebra.expressions.JoinExpression"
+_JoinExpression_left = Core.Name "left"
+_JoinExpression_right = Core.Name "right"
+-- | Union operator: expr1 ∪ expr2
+data UnionExpression =
+  UnionExpression {
+    unionExpressionLeft :: PathExpression,
+    unionExpressionRight :: PathExpression}
+  deriving (Eq, Ord, Read, Show)
+_UnionExpression = Core.Name "com.gdblab.pathAlgebra.expressions.UnionExpression"
+_UnionExpression_left = Core.Name "left"
+_UnionExpression_right = Core.Name "right"
+-- | Recursive operator with path semantics
+data RecursiveExpression =
+  RecursiveExpression {
+    recursiveExpressionSemantics :: PathSemantics,
+    recursiveExpressionExpression :: PathExpression}
+  deriving (Eq, Ord, Read, Show)
+_RecursiveExpression = Core.Name "com.gdblab.pathAlgebra.expressions.RecursiveExpression"
+_RecursiveExpression_semantics = Core.Name "semantics"
+_RecursiveExpression_expression = Core.Name "expression"
+-- | Path semantics for recursive operations
+data PathSemantics =
+  PathSemanticsWalk |
+  PathSemanticsTrail |
+  PathSemanticsAcyclic |
+  PathSemanticsSimple |
+  PathSemanticsShortest
+  deriving (Eq, Ord, Read, Show)
+_PathSemantics = Core.Name "com.gdblab.pathAlgebra.expressions.PathSemantics"
+_PathSemantics_walk = Core.Name "walk"
+_PathSemantics_trail = Core.Name "trail"
+_PathSemantics_acyclic = Core.Name "acyclic"
+_PathSemantics_simple = Core.Name "simple"
+_PathSemantics_shortest = Core.Name "shortest"
+-- | Expressions that work with solution spaces
+data SolutionSpaceExpression =
+  SolutionSpaceExpressionGroupBy GroupByExpression |
+  SolutionSpaceExpressionOrderBy OrderByExpression
+  deriving (Eq, Ord, Read, Show)
+_SolutionSpaceExpression = Core.Name "com.gdblab.pathAlgebra.expressions.SolutionSpaceExpression"
+_SolutionSpaceExpression_groupBy = Core.Name "groupBy"
+_SolutionSpaceExpression_orderBy = Core.Name "orderBy"
+-- | Group-by operator: γ_criterion(expression)
+data GroupByExpression =
+  GroupByExpression {
+    groupByExpressionCriterion :: GroupByCriterion,
+    groupByExpressionExpression :: PathExpression}
+  deriving (Eq, Ord, Read, Show)
+_GroupByExpression = Core.Name "com.gdblab.pathAlgebra.expressions.GroupByExpression"
+_GroupByExpression_criterion = Core.Name "criterion"
+_GroupByExpression_expression = Core.Name "expression"
+-- | Grouping criteria corresponding to paper's γ variants
+data GroupByCriterion =
+  GroupByCriterionNone |
+  GroupByCriterionSource |
+  GroupByCriterionTarget |
+  GroupByCriterionLength |
+  GroupByCriterionSourceTarget |
+  GroupByCriterionSourceLength |
+  GroupByCriterionTargetLength |
+  GroupByCriterionSourceTargetLength
+  deriving (Eq, Ord, Read, Show)
+_GroupByCriterion = Core.Name "com.gdblab.pathAlgebra.expressions.GroupByCriterion"
+_GroupByCriterion_none = Core.Name "none"
+_GroupByCriterion_source = Core.Name "source"
+_GroupByCriterion_target = Core.Name "target"
+_GroupByCriterion_length = Core.Name "length"
+_GroupByCriterion_sourceTarget = Core.Name "sourceTarget"
+_GroupByCriterion_sourceLength = Core.Name "sourceLength"
+_GroupByCriterion_targetLength = Core.Name "targetLength"
+_GroupByCriterion_sourceTargetLength = Core.Name "sourceTargetLength"
+-- | Order-by operator: τ_criterion(solutionSpace)
+data OrderByExpression =
+  OrderByExpression {
+    orderByExpressionCriterion :: OrderByCriterion,
+    orderByExpressionExpression :: SolutionSpaceExpression}
+  deriving (Eq, Ord, Read, Show)
+_OrderByExpression = Core.Name "com.gdblab.pathAlgebra.expressions.OrderByExpression"
+_OrderByExpression_criterion = Core.Name "criterion"
+_OrderByExpression_expression = Core.Name "expression"
+-- | Ordering criteria corresponding to paper's τ variants
+data OrderByCriterion =
+  OrderByCriterionPartition |
+  OrderByCriterionGroup |
+  OrderByCriterionPath |
+  OrderByCriterionPartitionGroup |
+  OrderByCriterionPartitionPath |
+  OrderByCriterionGroupPath |
+  OrderByCriterionPartitionGroupPath
+  deriving (Eq, Ord, Read, Show)
+_OrderByCriterion = Core.Name "com.gdblab.pathAlgebra.expressions.OrderByCriterion"
+_OrderByCriterion_partition = Core.Name "partition"
+_OrderByCriterion_group = Core.Name "group"
+_OrderByCriterion_path = Core.Name "path"
+_OrderByCriterion_partitionGroup = Core.Name "partitionGroup"
+_OrderByCriterion_partitionPath = Core.Name "partitionPath"
+_OrderByCriterion_groupPath = Core.Name "groupPath"
+_OrderByCriterion_partitionGroupPath = Core.Name "partitionGroupPath"
+-- | Projection operator: π_(#P,#G,#A)(solutionSpace)
+data ProjectionExpression =
+  ProjectionExpression {
+    projectionExpressionPartitions :: ProjectionSpec,
+    projectionExpressionGroups :: ProjectionSpec,
+    projectionExpressionPaths :: ProjectionSpec,
+    projectionExpressionExpression :: SolutionSpaceExpression}
+  deriving (Eq, Ord, Read, Show)
+_ProjectionExpression = Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionExpression"
+_ProjectionExpression_partitions = Core.Name "partitions"
+_ProjectionExpression_groups = Core.Name "groups"
+_ProjectionExpression_paths = Core.Name "paths"
+_ProjectionExpression_expression = Core.Name "expression"
+-- | Projection specification: * or specific number
+data ProjectionSpec =
+  ProjectionSpecAll |
+  ProjectionSpecLimited Int
+  deriving (Eq, Ord, Read, Show)
+_ProjectionSpec = Core.Name "com.gdblab.pathAlgebra.expressions.ProjectionSpec"
+_ProjectionSpec_all = Core.Name "all"
+_ProjectionSpec_limited = Core.Name "limited"
+-- | Extract specific values from paths for RETURN clause
+data ResultProjection =
+  ResultProjection {
+    resultProjectionProjections :: [PropertyExtraction]}
+  deriving (Eq, Ord, Read, Show)
+_ResultProjection = Core.Name "com.gdblab.pathAlgebra.expressions.ResultProjection"
+_ResultProjection_projections = Core.Name "projections"
+-- | Extract properties from path elements
+data PropertyExtraction =
+  PropertyExtraction {
+    propertyExtractionAlias :: (Maybe String),
+    propertyExtractionSource :: PropertySource}
+  deriving (Eq, Ord, Read, Show)
+_PropertyExtraction = Core.Name "com.gdblab.pathAlgebra.expressions.PropertyExtraction"
+_PropertyExtraction_alias = Core.Name "alias"
+_PropertyExtraction_source = Core.Name "source"
+-- | Source of a property value
+data PropertySource =
+  PropertySourceNodeProperty NodePropertyRef |
+  PropertySourceEdgeProperty EdgePropertyRef |
+  PropertySourcePathProperty PathPropertyRef
+  deriving (Eq, Ord, Read, Show)
+_PropertySource = Core.Name "com.gdblab.pathAlgebra.expressions.PropertySource"
+_PropertySource_nodeProperty = Core.Name "nodeProperty"
+_PropertySource_edgeProperty = Core.Name "edgeProperty"
+_PropertySource_pathProperty = Core.Name "pathProperty"
+-- | Reference to a node property: node.property
+data NodePropertyRef =
+  NodePropertyRef {
+    nodePropertyRefElement :: PathElement,
+    nodePropertyRefProperty :: String}
+  deriving (Eq, Ord, Read, Show)
+_NodePropertyRef = Core.Name "com.gdblab.pathAlgebra.expressions.NodePropertyRef"
+_NodePropertyRef_element = Core.Name "element"
+_NodePropertyRef_property = Core.Name "property"
+-- | Reference to an edge property: edge.property
+data EdgePropertyRef =
+  EdgePropertyRef {
+    edgePropertyRefElement :: PathElement,
+    edgePropertyRefProperty :: String}
+  deriving (Eq, Ord, Read, Show)
+_EdgePropertyRef = Core.Name "com.gdblab.pathAlgebra.expressions.EdgePropertyRef"
+_EdgePropertyRef_element = Core.Name "element"
+_EdgePropertyRef_property = Core.Name "property"
+-- | Reference to path-level properties: length, etc.
+data PathPropertyRef =
+  PathPropertyRefLength |
+  PathPropertyRefStartNode |
+  PathPropertyRefEndNode
+  deriving (Eq, Ord, Read, Show)
+_PathPropertyRef = Core.Name "com.gdblab.pathAlgebra.expressions.PathPropertyRef"
+_PathPropertyRef_length = Core.Name "length"
+_PathPropertyRef_startNode = Core.Name "startNode"
+_PathPropertyRef_endNode = Core.Name "endNode"
diff --git a/src/main/haskell/Com/Gdblab/PathAlgebra/Syntax.hs b/src/main/haskell/Com/Gdblab/PathAlgebra/Syntax.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Com/Gdblab/PathAlgebra/Syntax.hs
@@ -0,0 +1,298 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A syntax model for the path algebra grammar by Angles et al. See the paper "Path-based Algebraic Foundations of Graph Query Languages" and the ANTLR grammar at https://github.com/pathalgebra/AlgebraParser
+
+module Com.Gdblab.PathAlgebra.Syntax where
+import qualified Hydra.Core as Core
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+type Number = Integer
+_Number = Core.Name "com.gdblab.pathAlgebra.syntax.Number"
+type Text = String
+_Text = Core.Name "com.gdblab.pathAlgebra.syntax.Text"
+type Label = String
+_Label = Core.Name "com.gdblab.pathAlgebra.syntax.Label"
+type Variable = String
+_Variable = Core.Name "com.gdblab.pathAlgebra.syntax.Variable"
+type PathName = String
+_PathName = Core.Name "com.gdblab.pathAlgebra.syntax.PathName"
+data PathQuery =
+  PathQuery {
+    pathQueryProjection :: Projection,
+    pathQueryRestrictorExt :: (Maybe RestrictorExt),
+    pathQueryPathPattern :: PathPattern,
+    pathQueryGroupBy :: (Maybe GroupBy),
+    pathQueryOrderBy :: (Maybe OrderBy)}
+  deriving (Eq, Ord, Read, Show)
+_PathQuery = Core.Name "com.gdblab.pathAlgebra.syntax.PathQuery"
+_PathQuery_projection = Core.Name "projection"
+_PathQuery_restrictorExt = Core.Name "restrictorExt"
+_PathQuery_pathPattern = Core.Name "pathPattern"
+_PathQuery_groupBy = Core.Name "groupBy"
+_PathQuery_orderBy = Core.Name "orderBy"
+data Projection =
+  Projection {
+    projectionPartProj :: PartProj,
+    projectionGroupProj :: GroupProj,
+    projectionPathProj :: PathProj}
+  deriving (Eq, Ord, Read, Show)
+_Projection = Core.Name "com.gdblab.pathAlgebra.syntax.Projection"
+_Projection_partProj = Core.Name "partProj"
+_Projection_groupProj = Core.Name "groupProj"
+_Projection_pathProj = Core.Name "pathProj"
+data PartProj =
+  PartProjAll |
+  PartProjLimited Number
+  deriving (Eq, Ord, Read, Show)
+_PartProj = Core.Name "com.gdblab.pathAlgebra.syntax.PartProj"
+_PartProj_all = Core.Name "all"
+_PartProj_limited = Core.Name "limited"
+data GroupProj =
+  GroupProjAll |
+  GroupProjLimited Number
+  deriving (Eq, Ord, Read, Show)
+_GroupProj = Core.Name "com.gdblab.pathAlgebra.syntax.GroupProj"
+_GroupProj_all = Core.Name "all"
+_GroupProj_limited = Core.Name "limited"
+data PathProj =
+  PathProjAll |
+  PathProjLimited Number
+  deriving (Eq, Ord, Read, Show)
+_PathProj = Core.Name "com.gdblab.pathAlgebra.syntax.PathProj"
+_PathProj_all = Core.Name "all"
+_PathProj_limited = Core.Name "limited"
+data RestrictorExt =
+  RestrictorExtWalk |
+  RestrictorExtTrail |
+  RestrictorExtSimple |
+  RestrictorExtAcyclic |
+  RestrictorExtShortest
+  deriving (Eq, Ord, Read, Show)
+_RestrictorExt = Core.Name "com.gdblab.pathAlgebra.syntax.RestrictorExt"
+_RestrictorExt_walk = Core.Name "walk"
+_RestrictorExt_trail = Core.Name "trail"
+_RestrictorExt_simple = Core.Name "simple"
+_RestrictorExt_acyclic = Core.Name "acyclic"
+_RestrictorExt_shortest = Core.Name "shortest"
+newtype OrderBy =
+  OrderBy {
+    unOrderBy :: OrderByOption}
+  deriving (Eq, Ord, Read, Show)
+_OrderBy = Core.Name "com.gdblab.pathAlgebra.syntax.OrderBy"
+newtype GroupBy =
+  GroupBy {
+    unGroupBy :: GroupByOption}
+  deriving (Eq, Ord, Read, Show)
+_GroupBy = Core.Name "com.gdblab.pathAlgebra.syntax.GroupBy"
+data OrderByOption =
+  OrderByOptionPartition |
+  OrderByOptionGroup |
+  OrderByOptionPath |
+  OrderByOptionPartitionGroup |
+  OrderByOptionPartitionPath |
+  OrderByOptionGroupPath |
+  OrderByOptionPartitionGroupPath
+  deriving (Eq, Ord, Read, Show)
+_OrderByOption = Core.Name "com.gdblab.pathAlgebra.syntax.OrderByOption"
+_OrderByOption_partition = Core.Name "partition"
+_OrderByOption_group = Core.Name "group"
+_OrderByOption_path = Core.Name "path"
+_OrderByOption_partitionGroup = Core.Name "partitionGroup"
+_OrderByOption_partitionPath = Core.Name "partitionPath"
+_OrderByOption_groupPath = Core.Name "groupPath"
+_OrderByOption_partitionGroupPath = Core.Name "partitionGroupPath"
+data GroupByOption =
+  GroupByOptionSource |
+  GroupByOptionTarget |
+  GroupByOptionLength |
+  GroupByOptionSourceTarget |
+  GroupByOptionSourceLength |
+  GroupByOptionTargetLength |
+  GroupByOptionSourceTargetLength
+  deriving (Eq, Ord, Read, Show)
+_GroupByOption = Core.Name "com.gdblab.pathAlgebra.syntax.GroupByOption"
+_GroupByOption_source = Core.Name "source"
+_GroupByOption_target = Core.Name "target"
+_GroupByOption_length = Core.Name "length"
+_GroupByOption_sourceTarget = Core.Name "sourceTarget"
+_GroupByOption_sourceLength = Core.Name "sourceLength"
+_GroupByOption_targetLength = Core.Name "targetLength"
+_GroupByOption_sourceTargetLength = Core.Name "sourceTargetLength"
+data PathPattern =
+  PathPattern {
+    pathPatternPathName :: PathName,
+    pathPatternStartNode :: NodePattern,
+    pathPatternEdge :: EdgePattern,
+    pathPatternEndNode :: NodePattern,
+    pathPatternCondition :: (Maybe ComplexCondition)}
+  deriving (Eq, Ord, Read, Show)
+_PathPattern = Core.Name "com.gdblab.pathAlgebra.syntax.PathPattern"
+_PathPattern_pathName = Core.Name "pathName"
+_PathPattern_startNode = Core.Name "startNode"
+_PathPattern_edge = Core.Name "edge"
+_PathPattern_endNode = Core.Name "endNode"
+_PathPattern_condition = Core.Name "condition"
+data NodePattern =
+  NodePattern {
+    nodePatternVariable :: (Maybe Variable)}
+  deriving (Eq, Ord, Read, Show)
+_NodePattern = Core.Name "com.gdblab.pathAlgebra.syntax.NodePattern"
+_NodePattern_variable = Core.Name "variable"
+data EdgePattern =
+  EdgePattern {
+    edgePatternDirection :: EdgeDirection,
+    edgePatternRpq :: (Maybe Rpq)}
+  deriving (Eq, Ord, Read, Show)
+_EdgePattern = Core.Name "com.gdblab.pathAlgebra.syntax.EdgePattern"
+_EdgePattern_direction = Core.Name "direction"
+_EdgePattern_rpq = Core.Name "rpq"
+data EdgeDirection =
+  EdgeDirectionOutgoing |
+  EdgeDirectionIncoming |
+  EdgeDirectionUndirected
+  deriving (Eq, Ord, Read, Show)
+_EdgeDirection = Core.Name "com.gdblab.pathAlgebra.syntax.EdgeDirection"
+_EdgeDirection_outgoing = Core.Name "outgoing"
+_EdgeDirection_incoming = Core.Name "incoming"
+_EdgeDirection_undirected = Core.Name "undirected"
+data Rpq =
+  RpqParenthesis Rpq |
+  RpqLabel Label |
+  RpqNegated Label |
+  RpqReverse Label |
+  RpqOptional Rpq |
+  RpqPlus Plus |
+  RpqStar Star |
+  RpqConcatenation Concatenation |
+  RpqAlternation Alternation
+  deriving (Eq, Ord, Read, Show)
+_Rpq = Core.Name "com.gdblab.pathAlgebra.syntax.Rpq"
+_Rpq_parenthesis = Core.Name "parenthesis"
+_Rpq_label = Core.Name "label"
+_Rpq_negated = Core.Name "negated"
+_Rpq_reverse = Core.Name "reverse"
+_Rpq_optional = Core.Name "optional"
+_Rpq_plus = Core.Name "plus"
+_Rpq_star = Core.Name "star"
+_Rpq_concatenation = Core.Name "concatenation"
+_Rpq_alternation = Core.Name "alternation"
+data Plus =
+  Plus {
+    plusExpression :: Rpq,
+    plusRestrictor :: (Maybe RpqRestrictor)}
+  deriving (Eq, Ord, Read, Show)
+_Plus = Core.Name "com.gdblab.pathAlgebra.syntax.Plus"
+_Plus_expression = Core.Name "expression"
+_Plus_restrictor = Core.Name "restrictor"
+data Star =
+  Star {
+    starExpression :: Rpq,
+    starRestrictor :: (Maybe RpqRestrictor)}
+  deriving (Eq, Ord, Read, Show)
+_Star = Core.Name "com.gdblab.pathAlgebra.syntax.Star"
+_Star_expression = Core.Name "expression"
+_Star_restrictor = Core.Name "restrictor"
+data Concatenation =
+  Concatenation {
+    concatenationLeft :: Rpq,
+    concatenationRight :: Rpq}
+  deriving (Eq, Ord, Read, Show)
+_Concatenation = Core.Name "com.gdblab.pathAlgebra.syntax.Concatenation"
+_Concatenation_left = Core.Name "left"
+_Concatenation_right = Core.Name "right"
+data Alternation =
+  Alternation {
+    alternationLeft :: Rpq,
+    alternationRight :: Rpq}
+  deriving (Eq, Ord, Read, Show)
+_Alternation = Core.Name "com.gdblab.pathAlgebra.syntax.Alternation"
+_Alternation_left = Core.Name "left"
+_Alternation_right = Core.Name "right"
+newtype RpqRestrictor =
+  RpqRestrictor {
+    unRpqRestrictor :: RestrictorExt}
+  deriving (Eq, Ord, Read, Show)
+_RpqRestrictor = Core.Name "com.gdblab.pathAlgebra.syntax.RpqRestrictor"
+data ComplexCondition =
+  ComplexConditionSimple Condition |
+  ComplexConditionCompound CompoundComplexCondition
+  deriving (Eq, Ord, Read, Show)
+_ComplexCondition = Core.Name "com.gdblab.pathAlgebra.syntax.ComplexCondition"
+_ComplexCondition_simple = Core.Name "simple"
+_ComplexCondition_compound = Core.Name "compound"
+data CompoundComplexCondition =
+  CompoundComplexCondition {
+    compoundComplexConditionLhs :: Condition,
+    compoundComplexConditionOperator :: BoolOp,
+    compoundComplexConditionRhs :: ComplexCondition}
+  deriving (Eq, Ord, Read, Show)
+_CompoundComplexCondition = Core.Name "com.gdblab.pathAlgebra.syntax.CompoundComplexCondition"
+_CompoundComplexCondition_lhs = Core.Name "lhs"
+_CompoundComplexCondition_operator = Core.Name "operator"
+_CompoundComplexCondition_rhs = Core.Name "rhs"
+data Condition =
+  Condition {
+    conditionFunction :: Function,
+    conditionCompareSym :: CompareSym,
+    conditionValue :: Text}
+  deriving (Eq, Ord, Read, Show)
+_Condition = Core.Name "com.gdblab.pathAlgebra.syntax.Condition"
+_Condition_function = Core.Name "function"
+_Condition_compareSym = Core.Name "compareSym"
+_Condition_value = Core.Name "value"
+data CompareSym =
+  CompareSymEqual |
+  CompareSymNotEqual |
+  CompareSymLessThan |
+  CompareSymGreaterThan |
+  CompareSymLessThanOrEqual |
+  CompareSymGreaterThanOrEqual
+  deriving (Eq, Ord, Read, Show)
+_CompareSym = Core.Name "com.gdblab.pathAlgebra.syntax.CompareSym"
+_CompareSym_equal = Core.Name "equal"
+_CompareSym_notEqual = Core.Name "notEqual"
+_CompareSym_lessThan = Core.Name "lessThan"
+_CompareSym_greaterThan = Core.Name "greaterThan"
+_CompareSym_lessThanOrEqual = Core.Name "lessThanOrEqual"
+_CompareSym_greaterThanOrEqual = Core.Name "greaterThanOrEqual"
+data Function =
+  FunctionSimple SimpleFunction |
+  FunctionNested NestedFunction |
+  FunctionComplex ComplexFunction
+  deriving (Eq, Ord, Read, Show)
+_Function = Core.Name "com.gdblab.pathAlgebra.syntax.Function"
+_Function_simple = Core.Name "simple"
+_Function_nested = Core.Name "nested"
+_Function_complex = Core.Name "complex"
+data SimpleFunction =
+  SimpleFunction {
+    simpleFunctionName :: Text,
+    simpleFunctionArgument :: Text}
+  deriving (Eq, Ord, Read, Show)
+_SimpleFunction = Core.Name "com.gdblab.pathAlgebra.syntax.SimpleFunction"
+_SimpleFunction_name = Core.Name "name"
+_SimpleFunction_argument = Core.Name "argument"
+data NestedFunction =
+  NestedFunction {
+    nestedFunctionName :: Text,
+    nestedFunctionInnerFunction :: Function}
+  deriving (Eq, Ord, Read, Show)
+_NestedFunction = Core.Name "com.gdblab.pathAlgebra.syntax.NestedFunction"
+_NestedFunction_name = Core.Name "name"
+_NestedFunction_innerFunction = Core.Name "innerFunction"
+data ComplexFunction =
+  ComplexFunction {
+    complexFunctionName :: Text,
+    complexFunctionInnerFunction :: Function,
+    complexFunctionAdditionalArg :: Text}
+  deriving (Eq, Ord, Read, Show)
+_ComplexFunction = Core.Name "com.gdblab.pathAlgebra.syntax.ComplexFunction"
+_ComplexFunction_name = Core.Name "name"
+_ComplexFunction_innerFunction = Core.Name "innerFunction"
+_ComplexFunction_additionalArg = Core.Name "additionalArg"
+data BoolOp =
+  BoolOpAnd |
+  BoolOpOr
+  deriving (Eq, Ord, Read, Show)
+_BoolOp = Core.Name "com.gdblab.pathAlgebra.syntax.BoolOp"
+_BoolOp_and = Core.Name "and"
+_BoolOp_or = Core.Name "or"
diff --git a/src/main/haskell/Hydra/Cypher/Features.hs b/src/main/haskell/Hydra/Cypher/Features.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Cypher/Features.hs
@@ -0,0 +1,1010 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A model for characterizing OpenCypher queries and implementations in terms of included features.Based on the OpenCypher grammar and the list of standard Cypher functions at https://neo4j.com/docs/cypher-manual/current/functions. Current as of August 2024.
+
+module Hydra.Cypher.Features where
+import qualified Hydra.Core as Core
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | A set of features which characterize an OpenCypher query or implementation. Any features which are omitted from the set are assumed to be unsupported or nonrequired.
+data CypherFeatures =
+  CypherFeatures {
+    -- | Arithmetic operations
+    cypherFeaturesArithmetic :: ArithmeticFeatures,
+    -- | Various kinds of atomic expressions
+    cypherFeaturesAtom :: AtomFeatures,
+    -- | Comparison operators and functions
+    cypherFeaturesComparison :: ComparisonFeatures,
+    -- | Delete operations
+    cypherFeaturesDelete :: DeleteFeatures,
+    -- | Standard Cypher functions
+    cypherFeaturesFunction :: FunctionFeatures,
+    -- | List functionality
+    cypherFeaturesList :: ListFeatures,
+    -- | Various types of literal values
+    cypherFeaturesLiteral :: LiteralFeatures,
+    -- | Logical operations
+    cypherFeaturesLogical :: LogicalFeatures,
+    -- | Match queries
+    cypherFeaturesMatch :: MatchFeatures,
+    -- | Merge operations
+    cypherFeaturesMerge :: MergeFeatures,
+    -- | Node patterns
+    cypherFeaturesNodePattern :: NodePatternFeatures,
+    -- | IS NULL / IS NOT NULL checks
+    cypherFeaturesNull :: NullFeatures,
+    -- | Path functions only found in OpenCypher
+    cypherFeaturesPath :: PathFeatures,
+    -- | Procedure calls
+    cypherFeaturesProcedureCall :: ProcedureCallFeatures,
+    -- | Projections
+    cypherFeaturesProjection :: ProjectionFeatures,
+    -- | Quantifier expressions
+    cypherFeaturesQuantifier :: QuantifierFeatures,
+    -- | Range literals within relationship patterns
+    cypherFeaturesRangeLiteral :: RangeLiteralFeatures,
+    -- | Specific syntax related to reading data from the graph.
+    cypherFeaturesReading :: ReadingFeatures,
+    -- | Relationship directions / arrow patterns
+    cypherFeaturesRelationshipDirection :: RelationshipDirectionFeatures,
+    -- | Relationship patterns
+    cypherFeaturesRelationshipPattern :: RelationshipPatternFeatures,
+    -- | REMOVE operations
+    cypherFeaturesRemove :: RemoveFeatures,
+    -- | Set definitions
+    cypherFeaturesSet :: SetFeatures,
+    -- | String functions/keywords only found in OpenCypher
+    cypherFeaturesString :: StringFeatures,
+    -- | Specific syntax related to updating data in the graph
+    cypherFeaturesUpdating :: UpdatingFeatures}
+  deriving (Eq, Ord, Read, Show)
+_CypherFeatures = Core.Name "hydra.cypher.features.CypherFeatures"
+_CypherFeatures_arithmetic = Core.Name "arithmetic"
+_CypherFeatures_atom = Core.Name "atom"
+_CypherFeatures_comparison = Core.Name "comparison"
+_CypherFeatures_delete = Core.Name "delete"
+_CypherFeatures_function = Core.Name "function"
+_CypherFeatures_list = Core.Name "list"
+_CypherFeatures_literal = Core.Name "literal"
+_CypherFeatures_logical = Core.Name "logical"
+_CypherFeatures_match = Core.Name "match"
+_CypherFeatures_merge = Core.Name "merge"
+_CypherFeatures_nodePattern = Core.Name "nodePattern"
+_CypherFeatures_null = Core.Name "null"
+_CypherFeatures_path = Core.Name "path"
+_CypherFeatures_procedureCall = Core.Name "procedureCall"
+_CypherFeatures_projection = Core.Name "projection"
+_CypherFeatures_quantifier = Core.Name "quantifier"
+_CypherFeatures_rangeLiteral = Core.Name "rangeLiteral"
+_CypherFeatures_reading = Core.Name "reading"
+_CypherFeatures_relationshipDirection = Core.Name "relationshipDirection"
+_CypherFeatures_relationshipPattern = Core.Name "relationshipPattern"
+_CypherFeatures_remove = Core.Name "remove"
+_CypherFeatures_set = Core.Name "set"
+_CypherFeatures_string = Core.Name "string"
+_CypherFeatures_updating = Core.Name "updating"
+-- | Arithmetic operations
+data ArithmeticFeatures =
+  ArithmeticFeatures {
+    -- | The + operator
+    arithmeticFeaturesPlus :: Bool,
+    -- | The - operator
+    arithmeticFeaturesMinus :: Bool,
+    -- | The * operator
+    arithmeticFeaturesMultiply :: Bool,
+    -- | The / operator
+    arithmeticFeaturesDivide :: Bool,
+    -- | The % operator
+    arithmeticFeaturesModulus :: Bool,
+    -- | The ^ operator
+    arithmeticFeaturesPowerOf :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ArithmeticFeatures = Core.Name "hydra.cypher.features.ArithmeticFeatures"
+_ArithmeticFeatures_plus = Core.Name "plus"
+_ArithmeticFeatures_minus = Core.Name "minus"
+_ArithmeticFeatures_multiply = Core.Name "multiply"
+_ArithmeticFeatures_divide = Core.Name "divide"
+_ArithmeticFeatures_modulus = Core.Name "modulus"
+_ArithmeticFeatures_powerOf = Core.Name "powerOf"
+-- | Various kinds of atomic expressions
+data AtomFeatures =
+  AtomFeatures {
+    -- | CASE expressions
+    atomFeaturesCaseExpression :: Bool,
+    -- | The COUNT (*) expression
+    atomFeaturesCount :: Bool,
+    -- | Existential subqueries
+    atomFeaturesExistentialSubquery :: Bool,
+    -- | Function invocation
+    atomFeaturesFunctionInvocation :: Bool,
+    -- | Parameter expressions
+    atomFeaturesParameter :: Bool,
+    -- | Pattern comprehensions
+    atomFeaturesPatternComprehension :: Bool,
+    -- | Relationship patterns as subexpressions
+    atomFeaturesPatternPredicate :: Bool,
+    -- | Variable expressions (note: included by most if not all implementations).
+    atomFeaturesVariable :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_AtomFeatures = Core.Name "hydra.cypher.features.AtomFeatures"
+_AtomFeatures_caseExpression = Core.Name "caseExpression"
+_AtomFeatures_count = Core.Name "count"
+_AtomFeatures_existentialSubquery = Core.Name "existentialSubquery"
+_AtomFeatures_functionInvocation = Core.Name "functionInvocation"
+_AtomFeatures_parameter = Core.Name "parameter"
+_AtomFeatures_patternComprehension = Core.Name "patternComprehension"
+_AtomFeatures_patternPredicate = Core.Name "patternPredicate"
+_AtomFeatures_variable = Core.Name "variable"
+-- | Comparison operators and functions
+data ComparisonFeatures =
+  ComparisonFeatures {
+    -- | The = comparison operator
+    comparisonFeaturesEqual :: Bool,
+    -- | The > comparison operator
+    comparisonFeaturesGreaterThan :: Bool,
+    -- | The >= comparison operator
+    comparisonFeaturesGreaterThanOrEqual :: Bool,
+    -- | The < comparison operator
+    comparisonFeaturesLessThan :: Bool,
+    -- | The <= comparison operator
+    comparisonFeaturesLessThanOrEqual :: Bool,
+    -- | The <> comparison operator
+    comparisonFeaturesNotEqual :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ComparisonFeatures = Core.Name "hydra.cypher.features.ComparisonFeatures"
+_ComparisonFeatures_equal = Core.Name "equal"
+_ComparisonFeatures_greaterThan = Core.Name "greaterThan"
+_ComparisonFeatures_greaterThanOrEqual = Core.Name "greaterThanOrEqual"
+_ComparisonFeatures_lessThan = Core.Name "lessThan"
+_ComparisonFeatures_lessThanOrEqual = Core.Name "lessThanOrEqual"
+_ComparisonFeatures_notEqual = Core.Name "notEqual"
+-- | Delete operations
+data DeleteFeatures =
+  DeleteFeatures {
+    -- | The basic DELETE clause
+    deleteFeaturesDelete :: Bool,
+    -- | The DETACH DELETE clause
+    deleteFeaturesDetachDelete :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_DeleteFeatures = Core.Name "hydra.cypher.features.DeleteFeatures"
+_DeleteFeatures_delete = Core.Name "delete"
+_DeleteFeatures_detachDelete = Core.Name "detachDelete"
+-- | Standard Cypher functions
+data FunctionFeatures =
+  FunctionFeatures {
+    -- | Aggregate functions
+    functionFeaturesAggregateFunction :: AggregateFunctionFeatures,
+    -- | Database functions
+    functionFeaturesDatabaseFunction :: DatabaseFunctionFeatures,
+    -- | GenAI functions
+    functionFeaturesGenAIFunction :: GenAIFunctionFeatures,
+    -- | Graph functions
+    functionFeaturesGraphFunction :: GraphFunctionFeatures,
+    -- | List functions
+    functionFeaturesListFunction :: ListFunctionFeatures,
+    -- | Load CSV functions
+    functionFeaturesLoadCSVFunction :: LoadCSVFunctionFeatures,
+    -- | Logarithmic functions
+    functionFeaturesLogarithmicFunction :: LogarithmicFunctionFeatures,
+    -- | Numeric functions
+    functionFeaturesNumericFunction :: NumericFunctionFeatures,
+    -- | Predicate functions
+    functionFeaturesPredicateFunction :: PredicateFunctionFeatures,
+    -- | Scalar functions
+    functionFeaturesScalarFunction :: ScalarFunctionFeatures,
+    -- | Spatial functions
+    functionFeaturesSpatialFunction :: SpatialFunctionFeatures,
+    -- | String functions
+    functionFeaturesStringFunction :: StringFunctionFeatures,
+    -- | Temporal duration functions
+    functionFeaturesTemporalDurationFunction :: TemporalDurationFunctionFeatures,
+    -- | Temporal instant functions
+    functionFeaturesTemporalInstantFunction :: TemporalInstantFunctionFeatures,
+    -- | Trigonometric functions
+    functionFeaturesTrigonometricFunction :: TrigonometricFunctionFeatures,
+    -- | Vector functions
+    functionFeaturesVectorFunction :: VectorFunctionFeatures}
+  deriving (Eq, Ord, Read, Show)
+_FunctionFeatures = Core.Name "hydra.cypher.features.FunctionFeatures"
+_FunctionFeatures_aggregateFunction = Core.Name "aggregateFunction"
+_FunctionFeatures_databaseFunction = Core.Name "databaseFunction"
+_FunctionFeatures_genAIFunction = Core.Name "genAIFunction"
+_FunctionFeatures_graphFunction = Core.Name "graphFunction"
+_FunctionFeatures_listFunction = Core.Name "listFunction"
+_FunctionFeatures_loadCSVFunction = Core.Name "loadCSVFunction"
+_FunctionFeatures_logarithmicFunction = Core.Name "logarithmicFunction"
+_FunctionFeatures_numericFunction = Core.Name "numericFunction"
+_FunctionFeatures_predicateFunction = Core.Name "predicateFunction"
+_FunctionFeatures_scalarFunction = Core.Name "scalarFunction"
+_FunctionFeatures_spatialFunction = Core.Name "spatialFunction"
+_FunctionFeatures_stringFunction = Core.Name "stringFunction"
+_FunctionFeatures_temporalDurationFunction = Core.Name "temporalDurationFunction"
+_FunctionFeatures_temporalInstantFunction = Core.Name "temporalInstantFunction"
+_FunctionFeatures_trigonometricFunction = Core.Name "trigonometricFunction"
+_FunctionFeatures_vectorFunction = Core.Name "vectorFunction"
+-- | Aggregate functions
+data AggregateFunctionFeatures =
+  AggregateFunctionFeatures {
+    -- | The avg() function / AVG. Returns the average of a set of DURATION values.; Returns the average of a set of FLOAT values.; Returns the average of a set of INTEGER values.
+    aggregateFunctionFeaturesAvg :: Bool,
+    -- | The collect() function / COLLECT. Returns a list containing the values returned by an expression.
+    aggregateFunctionFeaturesCollect :: Bool,
+    -- | The count() function / COUNT. Returns the number of values or rows.
+    aggregateFunctionFeaturesCount :: Bool,
+    -- | The max() function / MAX. Returns the maximum value in a set of values.
+    aggregateFunctionFeaturesMax :: Bool,
+    -- | The min() function / MIN. Returns the minimum value in a set of values.
+    aggregateFunctionFeaturesMin :: Bool,
+    -- | The percentileCont() function. Returns the percentile of a value over a group using linear interpolation.
+    aggregateFunctionFeaturesPercentileCont :: Bool,
+    -- | The percentileDisc() function. Returns the nearest FLOAT value to the given percentile over a group using a rounding method.; Returns the nearest INTEGER value to the given percentile over a group using a rounding method.
+    aggregateFunctionFeaturesPercentileDisc :: Bool,
+    -- | The stdev() function. Returns the standard deviation for the given value over a group for a sample of a population.
+    aggregateFunctionFeaturesStdev :: Bool,
+    -- | The stdevp() function. Returns the standard deviation for the given value over a group for an entire population.
+    aggregateFunctionFeaturesStdevp :: Bool,
+    -- | The sum() function / SUM. Returns the sum of a set of DURATION values.; Returns the sum of a set of FLOAT values.; Returns the sum of a set of INTEGER values.
+    aggregateFunctionFeaturesSum :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_AggregateFunctionFeatures = Core.Name "hydra.cypher.features.AggregateFunctionFeatures"
+_AggregateFunctionFeatures_avg = Core.Name "avg"
+_AggregateFunctionFeatures_collect = Core.Name "collect"
+_AggregateFunctionFeatures_count = Core.Name "count"
+_AggregateFunctionFeatures_max = Core.Name "max"
+_AggregateFunctionFeatures_min = Core.Name "min"
+_AggregateFunctionFeatures_percentileCont = Core.Name "percentileCont"
+_AggregateFunctionFeatures_percentileDisc = Core.Name "percentileDisc"
+_AggregateFunctionFeatures_stdev = Core.Name "stdev"
+_AggregateFunctionFeatures_stdevp = Core.Name "stdevp"
+_AggregateFunctionFeatures_sum = Core.Name "sum"
+-- | Database functions
+data DatabaseFunctionFeatures =
+  DatabaseFunctionFeatures {
+    -- | The db.nameFromElementId() function. Resolves the database name from the given element id. Introduced in 5.12.
+    databaseFunctionFeaturesDbNameFromElementId :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_DatabaseFunctionFeatures = Core.Name "hydra.cypher.features.DatabaseFunctionFeatures"
+_DatabaseFunctionFeatures_dbNameFromElementId = Core.Name "dbNameFromElementId"
+-- | GenAI functions
+data GenAIFunctionFeatures =
+  GenAIFunctionFeatures {
+    -- | The genai.vector.encode() function. Encode a given resource as a vector using the named provider. Introduced in 5.17.
+    genAIFunctionFeaturesGenaiVectorEncode :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_GenAIFunctionFeatures = Core.Name "hydra.cypher.features.GenAIFunctionFeatures"
+_GenAIFunctionFeatures_genaiVectorEncode = Core.Name "genaiVectorEncode"
+-- | Graph functions
+data GraphFunctionFeatures =
+  GraphFunctionFeatures {
+    -- | The graph.byElementId() function. Resolves the constituent graph to which a given element id belongs. Introduced in 5.13.
+    graphFunctionFeaturesGraphByElementId :: Bool,
+    -- | The graph.byName() function. Resolves a constituent graph by name.
+    graphFunctionFeaturesGraphByName :: Bool,
+    -- | The graph.names() function. Returns a list containing the names of all graphs in the current composite database.
+    graphFunctionFeaturesGraphNames :: Bool,
+    -- | The graph.propertiesByName() function. Returns a map containing the properties associated with the given graph.
+    graphFunctionFeaturesGraphPropertiesByName :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_GraphFunctionFeatures = Core.Name "hydra.cypher.features.GraphFunctionFeatures"
+_GraphFunctionFeatures_graphByElementId = Core.Name "graphByElementId"
+_GraphFunctionFeatures_graphByName = Core.Name "graphByName"
+_GraphFunctionFeatures_graphNames = Core.Name "graphNames"
+_GraphFunctionFeatures_graphPropertiesByName = Core.Name "graphPropertiesByName"
+-- | List functions
+data ListFunctionFeatures =
+  ListFunctionFeatures {
+    -- | The keys() function. Returns a LIST<STRING> containing the STRING representations for all the property names of a MAP.; Returns a LIST<STRING> containing the STRING representations for all the property names of a NODE.; Returns a LIST<STRING> containing the STRING representations for all the property names of a RELATIONSHIP.
+    listFunctionFeaturesKeys :: Bool,
+    -- | The labels() function. Returns a LIST<STRING> containing the STRING representations for all the labels of a NODE.
+    listFunctionFeaturesLabels :: Bool,
+    -- | The nodes() function. Returns a LIST<NODE> containing all the NODE values in a PATH.
+    listFunctionFeaturesNodes :: Bool,
+    -- | The range() function. Returns a LIST<INTEGER> comprising all INTEGER values within a specified range.; Returns a LIST<INTEGER> comprising all INTEGER values within a specified range created with step length.
+    listFunctionFeaturesRange :: Bool,
+    -- | The reduce() function. Runs an expression against individual elements of a LIST<ANY>, storing the result of the expression in an accumulator.
+    listFunctionFeaturesReduce :: Bool,
+    -- | The relationships() function. Returns a LIST<RELATIONSHIP> containing all the RELATIONSHIP values in a PATH.
+    listFunctionFeaturesRelationships :: Bool,
+    -- | The reverse() function. Returns a LIST<ANY> in which the order of all elements in the given LIST<ANY> have been reversed.
+    listFunctionFeaturesReverse :: Bool,
+    -- | The tail() function. Returns all but the first element in a LIST<ANY>.
+    listFunctionFeaturesTail :: Bool,
+    -- | The toBooleanList() function. Converts a LIST<ANY> of values to a LIST<BOOLEAN> values. If any values are not convertible to BOOLEAN they will be null in the LIST<BOOLEAN> returned.
+    listFunctionFeaturesToBooleanList :: Bool,
+    -- | The toFloatList() function. Converts a LIST<ANY> to a LIST<FLOAT> values. If any values are not convertible to FLOAT they will be null in the LIST<FLOAT> returned.
+    listFunctionFeaturesToFloatList :: Bool,
+    -- | The toIntegerList() function. Converts a LIST<ANY> to a LIST<INTEGER> values. If any values are not convertible to INTEGER they will be null in the LIST<INTEGER> returned.
+    listFunctionFeaturesToIntegerList :: Bool,
+    -- | The toStringList() function. Converts a LIST<ANY> to a LIST<STRING> values. If any values are not convertible to STRING they will be null in the LIST<STRING> returned.
+    listFunctionFeaturesToStringList :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ListFunctionFeatures = Core.Name "hydra.cypher.features.ListFunctionFeatures"
+_ListFunctionFeatures_keys = Core.Name "keys"
+_ListFunctionFeatures_labels = Core.Name "labels"
+_ListFunctionFeatures_nodes = Core.Name "nodes"
+_ListFunctionFeatures_range = Core.Name "range"
+_ListFunctionFeatures_reduce = Core.Name "reduce"
+_ListFunctionFeatures_relationships = Core.Name "relationships"
+_ListFunctionFeatures_reverse = Core.Name "reverse"
+_ListFunctionFeatures_tail = Core.Name "tail"
+_ListFunctionFeatures_toBooleanList = Core.Name "toBooleanList"
+_ListFunctionFeatures_toFloatList = Core.Name "toFloatList"
+_ListFunctionFeatures_toIntegerList = Core.Name "toIntegerList"
+_ListFunctionFeatures_toStringList = Core.Name "toStringList"
+-- | Load CSV functions
+data LoadCSVFunctionFeatures =
+  LoadCSVFunctionFeatures {
+    -- | The file() function. Returns the absolute path of the file that LOAD CSV is using.
+    loadCSVFunctionFeaturesFile :: Bool,
+    -- | The linenumber() function. Returns the line number that LOAD CSV is currently using.
+    loadCSVFunctionFeaturesLinenumber :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_LoadCSVFunctionFeatures = Core.Name "hydra.cypher.features.LoadCSVFunctionFeatures"
+_LoadCSVFunctionFeatures_file = Core.Name "file"
+_LoadCSVFunctionFeatures_linenumber = Core.Name "linenumber"
+-- | Logarithmic functions
+data LogarithmicFunctionFeatures =
+  LogarithmicFunctionFeatures {
+    -- | The e() function. Returns the base of the natural logarithm, e.
+    logarithmicFunctionFeaturesE :: Bool,
+    -- | The exp() function. Returns e^n, where e is the base of the natural logarithm, and n is the value of the argument expression.
+    logarithmicFunctionFeaturesExp :: Bool,
+    -- | The log() function. Returns the natural logarithm of a FLOAT.
+    logarithmicFunctionFeaturesLog :: Bool,
+    -- | The log10() function. Returns the common logarithm (base 10) of a FLOAT.
+    logarithmicFunctionFeaturesLog10 :: Bool,
+    -- | The sqrt() function. Returns the square root of a FLOAT.
+    logarithmicFunctionFeaturesSqrt :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_LogarithmicFunctionFeatures = Core.Name "hydra.cypher.features.LogarithmicFunctionFeatures"
+_LogarithmicFunctionFeatures_e = Core.Name "e"
+_LogarithmicFunctionFeatures_exp = Core.Name "exp"
+_LogarithmicFunctionFeatures_log = Core.Name "log"
+_LogarithmicFunctionFeatures_log10 = Core.Name "log10"
+_LogarithmicFunctionFeatures_sqrt = Core.Name "sqrt"
+-- | Numeric functions
+data NumericFunctionFeatures =
+  NumericFunctionFeatures {
+    -- | The abs() function. Returns the absolute value of a FLOAT.; Returns the absolute value of an INTEGER.
+    numericFunctionFeaturesAbs :: Bool,
+    -- | The ceil() function. Returns the smallest FLOAT that is greater than or equal to a number and equal to an INTEGER.
+    numericFunctionFeaturesCeil :: Bool,
+    -- | The floor() function. Returns the largest FLOAT that is less than or equal to a number and equal to an INTEGER.
+    numericFunctionFeaturesFloor :: Bool,
+    -- | The isNaN() function. Returns true if the floating point number is NaN.; Returns true if the integer number is NaN.
+    numericFunctionFeaturesIsNaN :: Bool,
+    -- | The rand() function. Returns a random FLOAT in the range from 0 (inclusive) to 1 (exclusive).
+    numericFunctionFeaturesRand :: Bool,
+    -- | The round() function. Returns the value of a number rounded to the nearest INTEGER.; Returns the value of a number rounded to the specified precision using rounding mode HALF_UP.; Returns the value of a number rounded to the specified precision with the specified rounding mode.
+    numericFunctionFeaturesRound :: Bool,
+    -- | The sign() function. Returns the signum of a FLOAT: 0 if the number is 0, -1 for any negative number, and 1 for any positive number.; Returns the signum of an INTEGER: 0 if the number is 0, -1 for any negative number, and 1 for any positive number.
+    numericFunctionFeaturesSign :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_NumericFunctionFeatures = Core.Name "hydra.cypher.features.NumericFunctionFeatures"
+_NumericFunctionFeatures_abs = Core.Name "abs"
+_NumericFunctionFeatures_ceil = Core.Name "ceil"
+_NumericFunctionFeatures_floor = Core.Name "floor"
+_NumericFunctionFeatures_isNaN = Core.Name "isNaN"
+_NumericFunctionFeatures_rand = Core.Name "rand"
+_NumericFunctionFeatures_round = Core.Name "round"
+_NumericFunctionFeatures_sign = Core.Name "sign"
+-- | Predicate functions
+data PredicateFunctionFeatures =
+  PredicateFunctionFeatures {
+    -- | The all() function. Returns true if the predicate holds for all elements in the given LIST<ANY>.
+    predicateFunctionFeaturesAll :: Bool,
+    -- | The any() function. Returns true if the predicate holds for at least one element in the given LIST<ANY>.
+    predicateFunctionFeaturesAny :: Bool,
+    -- | The exists() function. Returns true if a match for the pattern exists in the graph.
+    predicateFunctionFeaturesExists :: Bool,
+    -- | The isEmpty() function. Checks whether a LIST<ANY> is empty.; Checks whether a MAP is empty.; Checks whether a STRING is empty.
+    predicateFunctionFeaturesIsEmpty :: Bool,
+    -- | The none() function. Returns true if the predicate holds for no element in the given LIST<ANY>.
+    predicateFunctionFeaturesNone :: Bool,
+    -- | The single() function. Returns true if the predicate holds for exactly one of the elements in the given LIST<ANY>.
+    predicateFunctionFeaturesSingle :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_PredicateFunctionFeatures = Core.Name "hydra.cypher.features.PredicateFunctionFeatures"
+_PredicateFunctionFeatures_all = Core.Name "all"
+_PredicateFunctionFeatures_any = Core.Name "any"
+_PredicateFunctionFeatures_exists = Core.Name "exists"
+_PredicateFunctionFeatures_isEmpty = Core.Name "isEmpty"
+_PredicateFunctionFeatures_none = Core.Name "none"
+_PredicateFunctionFeatures_single = Core.Name "single"
+-- | Scalar functions
+data ScalarFunctionFeatures =
+  ScalarFunctionFeatures {
+    -- | The char_length() function. Returns the number of Unicode characters in a STRING.
+    scalarFunctionFeaturesChar_length :: Bool,
+    -- | The character_length() function. Returns the number of Unicode characters in a STRING.
+    scalarFunctionFeaturesCharacter_length :: Bool,
+    -- | The coalesce() function. Returns the first non-null value in a list of expressions.
+    scalarFunctionFeaturesCoalesce :: Bool,
+    -- | The elementId() function. Returns a node identifier, unique within a specific transaction and DBMS.; Returns a relationship identifier, unique within a specific transaction and DBMS.
+    scalarFunctionFeaturesElementId :: Bool,
+    -- | The endNode() function. Returns a relationship identifier, unique within a specific transaction and DBMS.
+    scalarFunctionFeaturesEndNode :: Bool,
+    -- | The head() function. Returns the first element in a LIST<ANY>.
+    scalarFunctionFeaturesHead :: Bool,
+    -- | The id() function. [Deprecated] Returns the id of a NODE. Replaced by elementId().; [Deprecated] Returns the id of a RELATIONSHIP. Replaced by elementId().
+    scalarFunctionFeaturesId :: Bool,
+    -- | The last() function. Returns the last element in a LIST<ANY>.
+    scalarFunctionFeaturesLast :: Bool,
+    -- | The length() function. Returns the length of a PATH.
+    scalarFunctionFeaturesLength :: Bool,
+    -- | The nullIf() function. Returns null if the two given parameters are equivalent, otherwise returns the value of the first parameter.
+    scalarFunctionFeaturesNullIf :: Bool,
+    -- | The properties() function. Returns a MAP containing all the properties of a MAP.; Returns a MAP containing all the properties of a NODE.; Returns a MAP containing all the properties of a RELATIONSHIP.
+    scalarFunctionFeaturesProperties :: Bool,
+    -- | The randomUUID() function. Generates a random UUID.
+    scalarFunctionFeaturesRandomUUID :: Bool,
+    -- | The size() function. Returns the number of items in a LIST<ANY>.; Returns the number of Unicode characters in a STRING.
+    scalarFunctionFeaturesSize :: Bool,
+    -- | The startNode() function. Returns the start NODE of a RELATIONSHIP.
+    scalarFunctionFeaturesStartNode :: Bool,
+    -- | The toBoolean() function. Converts a STRING value to a BOOLEAN value.; Converts a BOOLEAN value to a BOOLEAN value.; Converts an INTEGER value to a BOOLEAN value.
+    scalarFunctionFeaturesToBoolean :: Bool,
+    -- | The toBooleanOrNull() function. Converts a value to a BOOLEAN value, or null if the value cannot be converted.
+    scalarFunctionFeaturesToBooleanOrNull :: Bool,
+    -- | The toFloat() function. Converts an INTEGER value to a FLOAT value.; Converts a STRING value to a FLOAT value.
+    scalarFunctionFeaturesToFloat :: Bool,
+    -- | The toFloatOrNull() function. Converts a value to a FLOAT value, or null if the value cannot be converted.
+    scalarFunctionFeaturesToFloatOrNull :: Bool,
+    -- | The toInteger() function. Converts a FLOAT value to an INTEGER value.; Converts a BOOLEAN value to an INTEGER value.; Converts a STRING value to an INTEGER value.
+    scalarFunctionFeaturesToInteger :: Bool,
+    -- | The toIntegerOrNull() function. Converts a value to an INTEGER value, or null if the value cannot be converted.
+    scalarFunctionFeaturesToIntegerOrNull :: Bool,
+    -- | The type() function. Returns a STRING representation of the RELATIONSHIP type.
+    scalarFunctionFeaturesType :: Bool,
+    -- | The valueType() function. Returns a STRING representation of the most precise value type that the given expression evaluates to.
+    scalarFunctionFeaturesValueType :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ScalarFunctionFeatures = Core.Name "hydra.cypher.features.ScalarFunctionFeatures"
+_ScalarFunctionFeatures_char_length = Core.Name "char_length"
+_ScalarFunctionFeatures_character_length = Core.Name "character_length"
+_ScalarFunctionFeatures_coalesce = Core.Name "coalesce"
+_ScalarFunctionFeatures_elementId = Core.Name "elementId"
+_ScalarFunctionFeatures_endNode = Core.Name "endNode"
+_ScalarFunctionFeatures_head = Core.Name "head"
+_ScalarFunctionFeatures_id = Core.Name "id"
+_ScalarFunctionFeatures_last = Core.Name "last"
+_ScalarFunctionFeatures_length = Core.Name "length"
+_ScalarFunctionFeatures_nullIf = Core.Name "nullIf"
+_ScalarFunctionFeatures_properties = Core.Name "properties"
+_ScalarFunctionFeatures_randomUUID = Core.Name "randomUUID"
+_ScalarFunctionFeatures_size = Core.Name "size"
+_ScalarFunctionFeatures_startNode = Core.Name "startNode"
+_ScalarFunctionFeatures_toBoolean = Core.Name "toBoolean"
+_ScalarFunctionFeatures_toBooleanOrNull = Core.Name "toBooleanOrNull"
+_ScalarFunctionFeatures_toFloat = Core.Name "toFloat"
+_ScalarFunctionFeatures_toFloatOrNull = Core.Name "toFloatOrNull"
+_ScalarFunctionFeatures_toInteger = Core.Name "toInteger"
+_ScalarFunctionFeatures_toIntegerOrNull = Core.Name "toIntegerOrNull"
+_ScalarFunctionFeatures_type = Core.Name "type"
+_ScalarFunctionFeatures_valueType = Core.Name "valueType"
+-- | Spatial functions
+data SpatialFunctionFeatures =
+  SpatialFunctionFeatures {
+    -- | The point.distance() function. Returns a FLOAT representing the geodesic distance between any two points in the same CRS.
+    spatialFunctionFeaturesPointDistance :: Bool,
+    -- | The point() function. Returns a 2D point object, given two coordinate values in the Cartesian coordinate system.; Returns a 3D point object, given three coordinate values in the Cartesian coordinate system.; Returns a 2D point object, given two coordinate values in the WGS 84 geographic coordinate system.; Returns a 3D point object, given three coordinate values in the WGS 84 geographic coordinate system.
+    spatialFunctionFeaturesPoint :: Bool,
+    -- | The point.withinBBox() function. Returns true if the provided point is within the bounding box defined by the two provided points, lowerLeft and upperRight.
+    spatialFunctionFeaturesPointWithinBBox :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_SpatialFunctionFeatures = Core.Name "hydra.cypher.features.SpatialFunctionFeatures"
+_SpatialFunctionFeatures_pointDistance = Core.Name "pointDistance"
+_SpatialFunctionFeatures_point = Core.Name "point"
+_SpatialFunctionFeatures_pointWithinBBox = Core.Name "pointWithinBBox"
+-- | String functions
+data StringFunctionFeatures =
+  StringFunctionFeatures {
+    -- | The btrim() function. Returns the given STRING with leading and trailing whitespace removed.; Returns the given STRING with leading and trailing trimCharacterString characters removed. Introduced in 5.20.
+    stringFunctionFeaturesBtrim :: Bool,
+    -- | The left() function. Returns a STRING containing the specified number (INTEGER) of leftmost characters in the given STRING.
+    stringFunctionFeaturesLeft :: Bool,
+    -- | The lower() function. Returns the given STRING in lowercase. This function is an alias to the toLower() function, and it was introduced as part of Cypher's GQL conformance. Introduced in 5.21.
+    stringFunctionFeaturesLower :: Bool,
+    -- | The ltrim() function. Returns the given STRING with leading whitespace removed.; Returns the given STRING with leading trimCharacterString characters removed. Introduced in 5.20.
+    stringFunctionFeaturesLtrim :: Bool,
+    -- | The normalize() function. Returns the given STRING normalized according to the normalization CypherFunctionForm NFC. Introduced in 5.17.; Returns the given STRING normalized according to the specified normalization CypherFunctionForm. Introduced in 5.17.
+    stringFunctionFeaturesNormalize :: Bool,
+    -- | The replace() function. Returns a STRING in which all occurrences of a specified search STRING in the given STRING have been replaced by another (specified) replacement STRING.
+    stringFunctionFeaturesReplace :: Bool,
+    -- | The reverse() function. Returns a STRING in which the order of all characters in the given STRING have been reversed.
+    stringFunctionFeaturesReverse :: Bool,
+    -- | The right() function. Returns a STRING containing the specified number of rightmost characters in the given STRING.
+    stringFunctionFeaturesRight :: Bool,
+    -- | The rtrim() function. Returns the given STRING with trailing whitespace removed.; Returns the given STRING with trailing trimCharacterString characters removed. Introduced in 5.20.
+    stringFunctionFeaturesRtrim :: Bool,
+    -- | The split() function. Returns a LIST<STRING> resulting from the splitting of the given STRING around matches of the given delimiter.; Returns a LIST<STRING> resulting from the splitting of the given STRING around matches of any of the given delimiters.
+    stringFunctionFeaturesSplit :: Bool,
+    -- | The substring() function. Returns a substring of the given STRING, beginning with a 0-based index start.; Returns a substring of a given length from the given STRING, beginning with a 0-based index start.
+    stringFunctionFeaturesSubstring :: Bool,
+    -- | The toLower() function. Returns the given STRING in lowercase.
+    stringFunctionFeaturesToLower :: Bool,
+    -- | The toString() function. Converts an INTEGER, FLOAT, BOOLEAN, POINT or temporal type (i.e. DATE, ZONED TIME, LOCAL TIME, ZONED DATETIME, LOCAL DATETIME or DURATION) value to a STRING.
+    stringFunctionFeaturesToString :: Bool,
+    -- | The toStringOrNull() function. Converts an INTEGER, FLOAT, BOOLEAN, POINT or temporal type (i.e. DATE, ZONED TIME, LOCAL TIME, ZONED DATETIME, LOCAL DATETIME or DURATION) value to a STRING, or null if the value cannot be converted.
+    stringFunctionFeaturesToStringOrNull :: Bool,
+    -- | The toUpper() function. Returns the given STRING in uppercase.
+    stringFunctionFeaturesToUpper :: Bool,
+    -- | The trim() function. Returns the given STRING with leading and trailing whitespace removed.; Returns the given STRING with the leading and/or trailing trimCharacterString character removed. Introduced in 5.20.
+    stringFunctionFeaturesTrim :: Bool,
+    -- | The upper() function. Returns the given STRING in uppercase. This function is an alias to the toUpper() function, and it was introduced as part of Cypher's GQL conformance. Introduced in 5.21.
+    stringFunctionFeaturesUpper :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_StringFunctionFeatures = Core.Name "hydra.cypher.features.StringFunctionFeatures"
+_StringFunctionFeatures_btrim = Core.Name "btrim"
+_StringFunctionFeatures_left = Core.Name "left"
+_StringFunctionFeatures_lower = Core.Name "lower"
+_StringFunctionFeatures_ltrim = Core.Name "ltrim"
+_StringFunctionFeatures_normalize = Core.Name "normalize"
+_StringFunctionFeatures_replace = Core.Name "replace"
+_StringFunctionFeatures_reverse = Core.Name "reverse"
+_StringFunctionFeatures_right = Core.Name "right"
+_StringFunctionFeatures_rtrim = Core.Name "rtrim"
+_StringFunctionFeatures_split = Core.Name "split"
+_StringFunctionFeatures_substring = Core.Name "substring"
+_StringFunctionFeatures_toLower = Core.Name "toLower"
+_StringFunctionFeatures_toString = Core.Name "toString"
+_StringFunctionFeatures_toStringOrNull = Core.Name "toStringOrNull"
+_StringFunctionFeatures_toUpper = Core.Name "toUpper"
+_StringFunctionFeatures_trim = Core.Name "trim"
+_StringFunctionFeatures_upper = Core.Name "upper"
+-- | Temporal duration functions
+data TemporalDurationFunctionFeatures =
+  TemporalDurationFunctionFeatures {
+    -- | The duration() function. Constructs a DURATION value.
+    temporalDurationFunctionFeaturesDuration :: Bool,
+    -- | The duration.between() function. Computes the DURATION between the from instant (inclusive) and the to instant (exclusive) in logical units.
+    temporalDurationFunctionFeaturesDurationBetween :: Bool,
+    -- | The duration.inDays() function. Computes the DURATION between the from instant (inclusive) and the to instant (exclusive) in days.
+    temporalDurationFunctionFeaturesDurationInDays :: Bool,
+    -- | The duration.inMonths() function. Computes the DURATION between the from instant (inclusive) and the to instant (exclusive) in months.
+    temporalDurationFunctionFeaturesDurationInMonths :: Bool,
+    -- | The duration.inSeconds() function. Computes the DURATION between the from instant (inclusive) and the to instant (exclusive) in seconds.
+    temporalDurationFunctionFeaturesDurationInSeconds :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_TemporalDurationFunctionFeatures = Core.Name "hydra.cypher.features.TemporalDurationFunctionFeatures"
+_TemporalDurationFunctionFeatures_duration = Core.Name "duration"
+_TemporalDurationFunctionFeatures_durationBetween = Core.Name "durationBetween"
+_TemporalDurationFunctionFeatures_durationInDays = Core.Name "durationInDays"
+_TemporalDurationFunctionFeatures_durationInMonths = Core.Name "durationInMonths"
+_TemporalDurationFunctionFeatures_durationInSeconds = Core.Name "durationInSeconds"
+-- | Temporal instant functions
+data TemporalInstantFunctionFeatures =
+  TemporalInstantFunctionFeatures {
+    -- | The date() function. Creates a DATE instant.
+    temporalInstantFunctionFeaturesDate :: Bool,
+    -- | The date.realtime() function. Returns the current DATE instant using the realtime clock.
+    temporalInstantFunctionFeaturesDateRealtime :: Bool,
+    -- | The date.statement() function. Returns the current DATE instant using the statement clock.
+    temporalInstantFunctionFeaturesDateStatement :: Bool,
+    -- | The date.transaction() function. Returns the current DATE instant using the transaction clock.
+    temporalInstantFunctionFeaturesDateTransaction :: Bool,
+    -- | The date.truncate() function. Truncates the given temporal value to a DATE instant using the specified unit.
+    temporalInstantFunctionFeaturesDateTruncate :: Bool,
+    -- | The datetime() function. Creates a ZONED DATETIME instant.
+    temporalInstantFunctionFeaturesDatetime :: Bool,
+    -- | The datetime.fromepoch() function. Creates a ZONED DATETIME given the seconds and nanoseconds since the start of the epoch.
+    temporalInstantFunctionFeaturesDatetimeFromepoch :: Bool,
+    -- | The datetime.fromepochmillis() function. Creates a ZONED DATETIME given the milliseconds since the start of the epoch.
+    temporalInstantFunctionFeaturesDatetimeFromepochmillis :: Bool,
+    -- | The datetime.realtime() function. Returns the current ZONED DATETIME instant using the realtime clock.
+    temporalInstantFunctionFeaturesDatetimeRealtime :: Bool,
+    -- | The datetime.statement() function. Returns the current ZONED DATETIME instant using the statement clock.
+    temporalInstantFunctionFeaturesDatetimeStatement :: Bool,
+    -- | The datetime.transaction() function. Returns the current ZONED DATETIME instant using the transaction clock.
+    temporalInstantFunctionFeaturesDatetimeTransaction :: Bool,
+    -- | The datetime.truncate() function. Truncates the given temporal value to a ZONED DATETIME instant using the specified unit.
+    temporalInstantFunctionFeaturesDatetimeTruncate :: Bool,
+    -- | The localdatetime() function. Creates a LOCAL DATETIME instant.
+    temporalInstantFunctionFeaturesLocaldatetime :: Bool,
+    -- | The localdatetime.realtime() function. Returns the current LOCAL DATETIME instant using the realtime clock.
+    temporalInstantFunctionFeaturesLocaldatetimeRealtime :: Bool,
+    -- | The localdatetime.statement() function. Returns the current LOCAL DATETIME instant using the statement clock.
+    temporalInstantFunctionFeaturesLocaldatetimeStatement :: Bool,
+    -- | The localdatetime.transaction() function. Returns the current LOCAL DATETIME instant using the transaction clock.
+    temporalInstantFunctionFeaturesLocaldatetimeTransaction :: Bool,
+    -- | The localdatetime.truncate() function. Truncates the given temporal value to a LOCAL DATETIME instant using the specified unit.
+    temporalInstantFunctionFeaturesLocaldatetimeTruncate :: Bool,
+    -- | The localtime() function. Creates a LOCAL TIME instant.
+    temporalInstantFunctionFeaturesLocaltime :: Bool,
+    -- | The localtime.realtime() function. Returns the current LOCAL TIME instant using the realtime clock.
+    temporalInstantFunctionFeaturesLocaltimeRealtime :: Bool,
+    -- | The localtime.statement() function. Returns the current LOCAL TIME instant using the statement clock.
+    temporalInstantFunctionFeaturesLocaltimeStatement :: Bool,
+    -- | The localtime.transaction() function. Returns the current LOCAL TIME instant using the transaction clock.
+    temporalInstantFunctionFeaturesLocaltimeTransaction :: Bool,
+    -- | The localtime.truncate() function. Truncates the given temporal value to a LOCAL TIME instant using the specified unit.
+    temporalInstantFunctionFeaturesLocaltimeTruncate :: Bool,
+    -- | The time() function. Creates a ZONED TIME instant.
+    temporalInstantFunctionFeaturesTime :: Bool,
+    -- | The time.realtime() function. Returns the current ZONED TIME instant using the realtime clock.
+    temporalInstantFunctionFeaturesTimeRealtime :: Bool,
+    -- | The time.statement() function. Returns the current ZONED TIME instant using the statement clock.
+    temporalInstantFunctionFeaturesTimeStatement :: Bool,
+    -- | The time.transaction() function. Returns the current ZONED TIME instant using the transaction clock.
+    temporalInstantFunctionFeaturesTimeTransaction :: Bool,
+    -- | The time.truncate() function. Truncates the given temporal value to a ZONED TIME instant using the specified unit.
+    temporalInstantFunctionFeaturesTimeTruncate :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_TemporalInstantFunctionFeatures = Core.Name "hydra.cypher.features.TemporalInstantFunctionFeatures"
+_TemporalInstantFunctionFeatures_date = Core.Name "date"
+_TemporalInstantFunctionFeatures_dateRealtime = Core.Name "dateRealtime"
+_TemporalInstantFunctionFeatures_dateStatement = Core.Name "dateStatement"
+_TemporalInstantFunctionFeatures_dateTransaction = Core.Name "dateTransaction"
+_TemporalInstantFunctionFeatures_dateTruncate = Core.Name "dateTruncate"
+_TemporalInstantFunctionFeatures_datetime = Core.Name "datetime"
+_TemporalInstantFunctionFeatures_datetimeFromepoch = Core.Name "datetimeFromepoch"
+_TemporalInstantFunctionFeatures_datetimeFromepochmillis = Core.Name "datetimeFromepochmillis"
+_TemporalInstantFunctionFeatures_datetimeRealtime = Core.Name "datetimeRealtime"
+_TemporalInstantFunctionFeatures_datetimeStatement = Core.Name "datetimeStatement"
+_TemporalInstantFunctionFeatures_datetimeTransaction = Core.Name "datetimeTransaction"
+_TemporalInstantFunctionFeatures_datetimeTruncate = Core.Name "datetimeTruncate"
+_TemporalInstantFunctionFeatures_localdatetime = Core.Name "localdatetime"
+_TemporalInstantFunctionFeatures_localdatetimeRealtime = Core.Name "localdatetimeRealtime"
+_TemporalInstantFunctionFeatures_localdatetimeStatement = Core.Name "localdatetimeStatement"
+_TemporalInstantFunctionFeatures_localdatetimeTransaction = Core.Name "localdatetimeTransaction"
+_TemporalInstantFunctionFeatures_localdatetimeTruncate = Core.Name "localdatetimeTruncate"
+_TemporalInstantFunctionFeatures_localtime = Core.Name "localtime"
+_TemporalInstantFunctionFeatures_localtimeRealtime = Core.Name "localtimeRealtime"
+_TemporalInstantFunctionFeatures_localtimeStatement = Core.Name "localtimeStatement"
+_TemporalInstantFunctionFeatures_localtimeTransaction = Core.Name "localtimeTransaction"
+_TemporalInstantFunctionFeatures_localtimeTruncate = Core.Name "localtimeTruncate"
+_TemporalInstantFunctionFeatures_time = Core.Name "time"
+_TemporalInstantFunctionFeatures_timeRealtime = Core.Name "timeRealtime"
+_TemporalInstantFunctionFeatures_timeStatement = Core.Name "timeStatement"
+_TemporalInstantFunctionFeatures_timeTransaction = Core.Name "timeTransaction"
+_TemporalInstantFunctionFeatures_timeTruncate = Core.Name "timeTruncate"
+-- | Trigonometric functions
+data TrigonometricFunctionFeatures =
+  TrigonometricFunctionFeatures {
+    -- | The acos() function. Returns the arccosine of a FLOAT in radians.
+    trigonometricFunctionFeaturesAcos :: Bool,
+    -- | The asin() function. Returns the arcsine of a FLOAT in radians.
+    trigonometricFunctionFeaturesAsin :: Bool,
+    -- | The atan() function. Returns the arctangent of a FLOAT in radians.
+    trigonometricFunctionFeaturesAtan :: Bool,
+    -- | The atan2() function. Returns the arctangent2 of a set of coordinates in radians.
+    trigonometricFunctionFeaturesAtan2 :: Bool,
+    -- | The cos() function. Returns the cosine of a FLOAT.
+    trigonometricFunctionFeaturesCos :: Bool,
+    -- | The cot() function. Returns the cotangent of a FLOAT.
+    trigonometricFunctionFeaturesCot :: Bool,
+    -- | The degrees() function. Converts radians to degrees.
+    trigonometricFunctionFeaturesDegrees :: Bool,
+    -- | The haversin() function. Returns half the versine of a number.
+    trigonometricFunctionFeaturesHaversin :: Bool,
+    -- | The pi() function. Returns the mathematical constant pi.
+    trigonometricFunctionFeaturesPi :: Bool,
+    -- | The radians() function. Converts degrees to radians.
+    trigonometricFunctionFeaturesRadians :: Bool,
+    -- | The sin() function. Returns the sine of a FLOAT.
+    trigonometricFunctionFeaturesSin :: Bool,
+    -- | The tan() function. Returns the tangent of a FLOAT.
+    trigonometricFunctionFeaturesTan :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_TrigonometricFunctionFeatures = Core.Name "hydra.cypher.features.TrigonometricFunctionFeatures"
+_TrigonometricFunctionFeatures_acos = Core.Name "acos"
+_TrigonometricFunctionFeatures_asin = Core.Name "asin"
+_TrigonometricFunctionFeatures_atan = Core.Name "atan"
+_TrigonometricFunctionFeatures_atan2 = Core.Name "atan2"
+_TrigonometricFunctionFeatures_cos = Core.Name "cos"
+_TrigonometricFunctionFeatures_cot = Core.Name "cot"
+_TrigonometricFunctionFeatures_degrees = Core.Name "degrees"
+_TrigonometricFunctionFeatures_haversin = Core.Name "haversin"
+_TrigonometricFunctionFeatures_pi = Core.Name "pi"
+_TrigonometricFunctionFeatures_radians = Core.Name "radians"
+_TrigonometricFunctionFeatures_sin = Core.Name "sin"
+_TrigonometricFunctionFeatures_tan = Core.Name "tan"
+-- | Vector functions
+data VectorFunctionFeatures =
+  VectorFunctionFeatures {
+    -- | The vector.similarity.cosine() function. Returns a FLOAT representing the similarity between the argument vectors based on their cosine.
+    vectorFunctionFeaturesVectorSimilarityCosine :: Bool,
+    -- | The vector.similarity.euclidean() function. Returns a FLOAT representing the similarity between the argument vectors based on their Euclidean distance.
+    vectorFunctionFeaturesVectorSimilarityEuclidean :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_VectorFunctionFeatures = Core.Name "hydra.cypher.features.VectorFunctionFeatures"
+_VectorFunctionFeatures_vectorSimilarityCosine = Core.Name "vectorSimilarityCosine"
+_VectorFunctionFeatures_vectorSimilarityEuclidean = Core.Name "vectorSimilarityEuclidean"
+-- | List functionality
+data ListFeatures =
+  ListFeatures {
+    -- | Basic list comprehensions
+    listFeaturesListComprehension :: Bool,
+    -- | List range comprehensions (e.g. [1..10])
+    listFeaturesListRange :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ListFeatures = Core.Name "hydra.cypher.features.ListFeatures"
+_ListFeatures_listComprehension = Core.Name "listComprehension"
+_ListFeatures_listRange = Core.Name "listRange"
+-- | Various types of literal values
+data LiteralFeatures =
+  LiteralFeatures {
+    -- | Boolean literals (note: included by most if not all implementations).
+    literalFeaturesBoolean :: Bool,
+    -- | Double-precision floating-point literals
+    literalFeaturesDouble :: Bool,
+    -- | Integer literals
+    literalFeaturesInteger :: Bool,
+    -- | List literals
+    literalFeaturesList :: Bool,
+    -- | Map literals
+    literalFeaturesMap :: Bool,
+    -- | The NULL literal
+    literalFeaturesNull :: Bool,
+    -- | String literals (note: included by most if not all implementations).
+    literalFeaturesString :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_LiteralFeatures = Core.Name "hydra.cypher.features.LiteralFeatures"
+_LiteralFeatures_boolean = Core.Name "boolean"
+_LiteralFeatures_double = Core.Name "double"
+_LiteralFeatures_integer = Core.Name "integer"
+_LiteralFeatures_list = Core.Name "list"
+_LiteralFeatures_map = Core.Name "map"
+_LiteralFeatures_null = Core.Name "null"
+_LiteralFeatures_string = Core.Name "string"
+-- | Logical operations
+data LogicalFeatures =
+  LogicalFeatures {
+    -- | The AND operator
+    logicalFeaturesAnd :: Bool,
+    -- | The NOT operator
+    logicalFeaturesNot :: Bool,
+    -- | The OR operator
+    logicalFeaturesOr :: Bool,
+    -- | The XOR operator
+    logicalFeaturesXor :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_LogicalFeatures = Core.Name "hydra.cypher.features.LogicalFeatures"
+_LogicalFeatures_and = Core.Name "and"
+_LogicalFeatures_not = Core.Name "not"
+_LogicalFeatures_or = Core.Name "or"
+_LogicalFeatures_xor = Core.Name "xor"
+-- | Match queries
+data MatchFeatures =
+  MatchFeatures {
+    -- | The basic (non-optional) MATCH clause
+    matchFeaturesMatch :: Bool,
+    -- | OPTIONAL MATCH
+    matchFeaturesOptionalMatch :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_MatchFeatures = Core.Name "hydra.cypher.features.MatchFeatures"
+_MatchFeatures_match = Core.Name "match"
+_MatchFeatures_optionalMatch = Core.Name "optionalMatch"
+-- | Merge operations
+data MergeFeatures =
+  MergeFeatures {
+    -- | The basic MERGE clause
+    mergeFeaturesMerge :: Bool,
+    -- | MERGE with the ON CREATE action
+    mergeFeaturesMergeOnCreate :: Bool,
+    -- | MERGE with the ON MATCH action
+    mergeFeaturesMergeOnMatch :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_MergeFeatures = Core.Name "hydra.cypher.features.MergeFeatures"
+_MergeFeatures_merge = Core.Name "merge"
+_MergeFeatures_mergeOnCreate = Core.Name "mergeOnCreate"
+_MergeFeatures_mergeOnMatch = Core.Name "mergeOnMatch"
+-- | Node patterns
+data NodePatternFeatures =
+  NodePatternFeatures {
+    -- | Specifying multiple labels in a node pattern
+    nodePatternFeaturesMultipleLabels :: Bool,
+    -- | Specifying a parameter as part of a node pattern
+    nodePatternFeaturesParameter :: Bool,
+    -- | Specifying a key/value map of properties in a node pattern
+    nodePatternFeaturesPropertyMap :: Bool,
+    -- | Binding a variable to a node in a node pattern (note: included by most if not all implementations).
+    nodePatternFeaturesVariableNode :: Bool,
+    -- | Omitting labels from a node pattern
+    nodePatternFeaturesWildcardLabel :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_NodePatternFeatures = Core.Name "hydra.cypher.features.NodePatternFeatures"
+_NodePatternFeatures_multipleLabels = Core.Name "multipleLabels"
+_NodePatternFeatures_parameter = Core.Name "parameter"
+_NodePatternFeatures_propertyMap = Core.Name "propertyMap"
+_NodePatternFeatures_variableNode = Core.Name "variableNode"
+_NodePatternFeatures_wildcardLabel = Core.Name "wildcardLabel"
+-- | IS NULL / IS NOT NULL checks
+data NullFeatures =
+  NullFeatures {
+    -- | The IS NULL operator
+    nullFeaturesIsNull :: Bool,
+    -- | The IS NOT NULL operator
+    nullFeaturesIsNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_NullFeatures = Core.Name "hydra.cypher.features.NullFeatures"
+_NullFeatures_isNull = Core.Name "isNull"
+_NullFeatures_isNotNull = Core.Name "isNotNull"
+-- | Path functions only found in OpenCypher
+data PathFeatures =
+  PathFeatures {
+    -- | The shortestPath() function
+    pathFeaturesShortestPath :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_PathFeatures = Core.Name "hydra.cypher.features.PathFeatures"
+_PathFeatures_shortestPath = Core.Name "shortestPath"
+-- | Procedure calls
+data ProcedureCallFeatures =
+  ProcedureCallFeatures {
+    -- | CALL within a query
+    procedureCallFeaturesInQueryCall :: Bool,
+    -- | Standalone / top-level CALL
+    procedureCallFeaturesStandaloneCall :: Bool,
+    -- | The YIELD clause in CALL
+    procedureCallFeaturesYield :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ProcedureCallFeatures = Core.Name "hydra.cypher.features.ProcedureCallFeatures"
+_ProcedureCallFeatures_inQueryCall = Core.Name "inQueryCall"
+_ProcedureCallFeatures_standaloneCall = Core.Name "standaloneCall"
+_ProcedureCallFeatures_yield = Core.Name "yield"
+-- | Projections
+data ProjectionFeatures =
+  ProjectionFeatures {
+    -- | The LIMIT clause
+    projectionFeaturesLimit :: Bool,
+    -- | The ORDER BY clause
+    projectionFeaturesOrderBy :: Bool,
+    -- | The DISTINCT keyword
+    projectionFeaturesProjectDistinct :: Bool,
+    -- | The * projection
+    projectionFeaturesProjectAll :: Bool,
+    -- | The AS keyword
+    projectionFeaturesProjectAs :: Bool,
+    -- | The SKIP clause
+    projectionFeaturesSkip :: Bool,
+    -- | The ASC/ASCENDING and DESC/DESCENDING keywords
+    projectionFeaturesSortOrder :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ProjectionFeatures = Core.Name "hydra.cypher.features.ProjectionFeatures"
+_ProjectionFeatures_limit = Core.Name "limit"
+_ProjectionFeatures_orderBy = Core.Name "orderBy"
+_ProjectionFeatures_projectDistinct = Core.Name "projectDistinct"
+_ProjectionFeatures_projectAll = Core.Name "projectAll"
+_ProjectionFeatures_projectAs = Core.Name "projectAs"
+_ProjectionFeatures_skip = Core.Name "skip"
+_ProjectionFeatures_sortOrder = Core.Name "sortOrder"
+-- | Quantifier expressions
+data QuantifierFeatures =
+  QuantifierFeatures {
+    -- | The ALL quantifier
+    quantifierFeaturesAll :: Bool,
+    -- | The ANY quantifier
+    quantifierFeaturesAny :: Bool,
+    -- | The NONE quantifier
+    quantifierFeaturesNone :: Bool,
+    -- | The SINGLE quantifier
+    quantifierFeaturesSingle :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_QuantifierFeatures = Core.Name "hydra.cypher.features.QuantifierFeatures"
+_QuantifierFeatures_all = Core.Name "all"
+_QuantifierFeatures_any = Core.Name "any"
+_QuantifierFeatures_none = Core.Name "none"
+_QuantifierFeatures_single = Core.Name "single"
+-- | Range literals within relationship patterns
+data RangeLiteralFeatures =
+  RangeLiteralFeatures {
+    -- | Range literals with both lower and upper bounds
+    rangeLiteralFeaturesBounds :: Bool,
+    -- | Range literals providing an exact number of repetitions
+    rangeLiteralFeaturesExactRange :: Bool,
+    -- | Range literals with a lower bound (only)
+    rangeLiteralFeaturesLowerBound :: Bool,
+    -- | The * range literal
+    rangeLiteralFeaturesStarRange :: Bool,
+    -- | Range literals with an upper bound (only)
+    rangeLiteralFeaturesUpperBound :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_RangeLiteralFeatures = Core.Name "hydra.cypher.features.RangeLiteralFeatures"
+_RangeLiteralFeatures_bounds = Core.Name "bounds"
+_RangeLiteralFeatures_exactRange = Core.Name "exactRange"
+_RangeLiteralFeatures_lowerBound = Core.Name "lowerBound"
+_RangeLiteralFeatures_starRange = Core.Name "starRange"
+_RangeLiteralFeatures_upperBound = Core.Name "upperBound"
+-- | Specific syntax related to reading data from the graph.
+data ReadingFeatures =
+  ReadingFeatures {
+    -- | The UNION operator
+    readingFeaturesUnion :: Bool,
+    -- | The UNION ALL operator
+    readingFeaturesUnionAll :: Bool,
+    -- | The UNWIND clause
+    readingFeaturesUnwind :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ReadingFeatures = Core.Name "hydra.cypher.features.ReadingFeatures"
+_ReadingFeatures_union = Core.Name "union"
+_ReadingFeatures_unionAll = Core.Name "unionAll"
+_ReadingFeatures_unwind = Core.Name "unwind"
+-- | Relationship directions / arrow patterns
+data RelationshipDirectionFeatures =
+  RelationshipDirectionFeatures {
+    -- | The two-headed arrow (<-[]->) relationship direction
+    relationshipDirectionFeaturesBoth :: Bool,
+    -- | The left arrow (<-[]-) relationship direction
+    relationshipDirectionFeaturesLeft :: Bool,
+    -- | The headless arrow (-[]-) relationship direction
+    relationshipDirectionFeaturesNeither :: Bool,
+    -- | The right arrow (-[]->) relationship direction
+    relationshipDirectionFeaturesRight :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_RelationshipDirectionFeatures = Core.Name "hydra.cypher.features.RelationshipDirectionFeatures"
+_RelationshipDirectionFeatures_both = Core.Name "both"
+_RelationshipDirectionFeatures_left = Core.Name "left"
+_RelationshipDirectionFeatures_neither = Core.Name "neither"
+_RelationshipDirectionFeatures_right = Core.Name "right"
+-- | Relationship patterns
+data RelationshipPatternFeatures =
+  RelationshipPatternFeatures {
+    -- | Specifying a disjunction of multiple types in a relationship pattern
+    relationshipPatternFeaturesMultipleTypes :: Bool,
+    -- | Binding a variable to a relationship in a relationship pattern (note: included by most if not all implementations).
+    relationshipPatternFeaturesVariableRelationship :: Bool,
+    -- | Omitting types from a relationship pattern
+    relationshipPatternFeaturesWildcardType :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_RelationshipPatternFeatures = Core.Name "hydra.cypher.features.RelationshipPatternFeatures"
+_RelationshipPatternFeatures_multipleTypes = Core.Name "multipleTypes"
+_RelationshipPatternFeatures_variableRelationship = Core.Name "variableRelationship"
+_RelationshipPatternFeatures_wildcardType = Core.Name "wildcardType"
+-- | REMOVE operations
+data RemoveFeatures =
+  RemoveFeatures {
+    -- | REMOVE Variable:NodeLabels
+    removeFeaturesByLabel :: Bool,
+    -- | REMOVE PropertyExpression
+    removeFeaturesByProperty :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_RemoveFeatures = Core.Name "hydra.cypher.features.RemoveFeatures"
+_RemoveFeatures_byLabel = Core.Name "byLabel"
+_RemoveFeatures_byProperty = Core.Name "byProperty"
+-- | Set definitions
+data SetFeatures =
+  SetFeatures {
+    -- | Defining a set using PropertyExpression = Expression
+    setFeaturesPropertyEquals :: Bool,
+    -- | Defining a set using Variable = Expression
+    setFeaturesVariableEquals :: Bool,
+    -- | Defining a set using Variable += Expression
+    setFeaturesVariablePlusEquals :: Bool,
+    -- | Defining a set using Variable:NodeLabels
+    setFeaturesVariableWithNodeLabels :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_SetFeatures = Core.Name "hydra.cypher.features.SetFeatures"
+_SetFeatures_propertyEquals = Core.Name "propertyEquals"
+_SetFeatures_variableEquals = Core.Name "variableEquals"
+_SetFeatures_variablePlusEquals = Core.Name "variablePlusEquals"
+_SetFeatures_variableWithNodeLabels = Core.Name "variableWithNodeLabels"
+-- | String functions/keywords only found in OpenCypher
+data StringFeatures =
+  StringFeatures {
+    -- | The contains() function / CONTAINS
+    stringFeaturesContains :: Bool,
+    -- | The endsWith() function / ENDS WITH
+    stringFeaturesEndsWith :: Bool,
+    -- | The in() function / IN
+    stringFeaturesIn :: Bool,
+    -- | The startsWith() function / STARTS WITH
+    stringFeaturesStartsWith :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_StringFeatures = Core.Name "hydra.cypher.features.StringFeatures"
+_StringFeatures_contains = Core.Name "contains"
+_StringFeatures_endsWith = Core.Name "endsWith"
+_StringFeatures_in = Core.Name "in"
+_StringFeatures_startsWith = Core.Name "startsWith"
+-- | Specific syntax related to updating data in the graph
+data UpdatingFeatures =
+  UpdatingFeatures {
+    -- | The CREATE clause
+    updatingFeaturesCreate :: Bool,
+    -- | The SET clause
+    updatingFeaturesSet :: Bool,
+    -- | Multi-part queries using WITH
+    updatingFeaturesWith :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_UpdatingFeatures = Core.Name "hydra.cypher.features.UpdatingFeatures"
+_UpdatingFeatures_create = Core.Name "create"
+_UpdatingFeatures_set = Core.Name "set"
+_UpdatingFeatures_with = Core.Name "with"
diff --git a/src/main/haskell/Hydra/Cypher/OpenCypher.hs b/src/main/haskell/Hydra/Cypher/OpenCypher.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Cypher/OpenCypher.hs
@@ -0,0 +1,874 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A Cypher model based on the OpenCypher specification (version 23), copyright Neo Technology, available at:
+-- |   https://opencypher.org/resources/
+
+module Hydra.Cypher.OpenCypher where
+import qualified Hydra.Core as Core
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+data Query =
+  QueryRegular RegularQuery |
+  QueryStandalone StandaloneCall
+  deriving (Eq, Ord, Read, Show)
+_Query = Core.Name "hydra.cypher.openCypher.Query"
+_Query_regular = Core.Name "regular"
+_Query_standalone = Core.Name "standalone"
+data RegularQuery =
+  RegularQuery {
+    regularQueryHead :: SingleQuery,
+    regularQueryRest :: [Union]}
+  deriving (Eq, Ord, Read, Show)
+_RegularQuery = Core.Name "hydra.cypher.openCypher.RegularQuery"
+_RegularQuery_head = Core.Name "head"
+_RegularQuery_rest = Core.Name "rest"
+data Union =
+  Union {
+    unionAll :: Bool,
+    unionQuery :: SingleQuery}
+  deriving (Eq, Ord, Read, Show)
+_Union = Core.Name "hydra.cypher.openCypher.Union"
+_Union_all = Core.Name "all"
+_Union_query = Core.Name "query"
+data SingleQuery =
+  SingleQuerySinglePart SinglePartQuery |
+  SingleQueryMultiPart MultiPartQuery
+  deriving (Eq, Ord, Read, Show)
+_SingleQuery = Core.Name "hydra.cypher.openCypher.SingleQuery"
+_SingleQuery_singlePart = Core.Name "singlePart"
+_SingleQuery_multiPart = Core.Name "multiPart"
+data SinglePartQuery =
+  SinglePartQuery {
+    singlePartQueryReading :: [ReadingClause],
+    singlePartQueryUpdating :: [UpdatingClause],
+    singlePartQueryReturn :: (Maybe Return)}
+  deriving (Eq, Ord, Read, Show)
+_SinglePartQuery = Core.Name "hydra.cypher.openCypher.SinglePartQuery"
+_SinglePartQuery_reading = Core.Name "reading"
+_SinglePartQuery_updating = Core.Name "updating"
+_SinglePartQuery_return = Core.Name "return"
+data WithClause =
+  WithClause {
+    withClauseReading :: [ReadingClause],
+    withClauseUpdating :: [UpdatingClause],
+    withClauseWith :: With}
+  deriving (Eq, Ord, Read, Show)
+_WithClause = Core.Name "hydra.cypher.openCypher.WithClause"
+_WithClause_reading = Core.Name "reading"
+_WithClause_updating = Core.Name "updating"
+_WithClause_with = Core.Name "with"
+data MultiPartQuery =
+  MultiPartQuery {
+    multiPartQueryWith :: [WithClause],
+    multiPartQueryBody :: SinglePartQuery}
+  deriving (Eq, Ord, Read, Show)
+_MultiPartQuery = Core.Name "hydra.cypher.openCypher.MultiPartQuery"
+_MultiPartQuery_with = Core.Name "with"
+_MultiPartQuery_body = Core.Name "body"
+data UpdatingClause =
+  UpdatingClauseCreate Create |
+  UpdatingClauseMerge Merge |
+  UpdatingClauseDelete Delete |
+  UpdatingClauseSet Set |
+  UpdatingClauseRemove Remove
+  deriving (Eq, Ord, Read, Show)
+_UpdatingClause = Core.Name "hydra.cypher.openCypher.UpdatingClause"
+_UpdatingClause_create = Core.Name "create"
+_UpdatingClause_merge = Core.Name "merge"
+_UpdatingClause_delete = Core.Name "delete"
+_UpdatingClause_set = Core.Name "set"
+_UpdatingClause_remove = Core.Name "remove"
+data ReadingClause =
+  ReadingClauseMatch Match |
+  ReadingClauseUnwind Unwind |
+  ReadingClauseInQueryCall InQueryCall
+  deriving (Eq, Ord, Read, Show)
+_ReadingClause = Core.Name "hydra.cypher.openCypher.ReadingClause"
+_ReadingClause_match = Core.Name "match"
+_ReadingClause_unwind = Core.Name "unwind"
+_ReadingClause_inQueryCall = Core.Name "inQueryCall"
+data Match =
+  Match {
+    matchOptional :: Bool,
+    matchPattern :: Pattern,
+    matchWhere :: (Maybe Where)}
+  deriving (Eq, Ord, Read, Show)
+_Match = Core.Name "hydra.cypher.openCypher.Match"
+_Match_optional = Core.Name "optional"
+_Match_pattern = Core.Name "pattern"
+_Match_where = Core.Name "where"
+data Unwind =
+  Unwind {
+    unwindExpression :: Expression,
+    unwindVariable :: Variable}
+  deriving (Eq, Ord, Read, Show)
+_Unwind = Core.Name "hydra.cypher.openCypher.Unwind"
+_Unwind_expression = Core.Name "expression"
+_Unwind_variable = Core.Name "variable"
+data Merge =
+  Merge {
+    mergePatternPart :: PatternPart,
+    mergeActions :: [MergeAction]}
+  deriving (Eq, Ord, Read, Show)
+_Merge = Core.Name "hydra.cypher.openCypher.Merge"
+_Merge_patternPart = Core.Name "patternPart"
+_Merge_actions = Core.Name "actions"
+data MatchOrCreate =
+  MatchOrCreateMatch |
+  MatchOrCreateCreate
+  deriving (Eq, Ord, Read, Show)
+_MatchOrCreate = Core.Name "hydra.cypher.openCypher.MatchOrCreate"
+_MatchOrCreate_match = Core.Name "match"
+_MatchOrCreate_create = Core.Name "create"
+data MergeAction =
+  MergeAction {
+    mergeActionAction :: MatchOrCreate,
+    mergeActionSet :: Set}
+  deriving (Eq, Ord, Read, Show)
+_MergeAction = Core.Name "hydra.cypher.openCypher.MergeAction"
+_MergeAction_action = Core.Name "action"
+_MergeAction_set = Core.Name "set"
+newtype Create =
+  Create {
+    unCreate :: Pattern}
+  deriving (Eq, Ord, Read, Show)
+_Create = Core.Name "hydra.cypher.openCypher.Create"
+newtype Set =
+  Set {
+    unSet :: [SetItem]}
+  deriving (Eq, Ord, Read, Show)
+_Set = Core.Name "hydra.cypher.openCypher.Set"
+data SetItem =
+  SetItemProperty PropertyEquals |
+  SetItemVariableEqual VariableEquals |
+  SetItemVariablePlusEqual VariablePlusEquals |
+  SetItemVariableLabels VariableAndNodeLabels
+  deriving (Eq, Ord, Read, Show)
+_SetItem = Core.Name "hydra.cypher.openCypher.SetItem"
+_SetItem_property = Core.Name "property"
+_SetItem_variableEqual = Core.Name "variableEqual"
+_SetItem_variablePlusEqual = Core.Name "variablePlusEqual"
+_SetItem_variableLabels = Core.Name "variableLabels"
+data PropertyEquals =
+  PropertyEquals {
+    propertyEqualsLhs :: PropertyExpression,
+    propertyEqualsRhs :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_PropertyEquals = Core.Name "hydra.cypher.openCypher.PropertyEquals"
+_PropertyEquals_lhs = Core.Name "lhs"
+_PropertyEquals_rhs = Core.Name "rhs"
+data VariableEquals =
+  VariableEquals {
+    variableEqualsLhs :: Variable,
+    variableEqualsRhs :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_VariableEquals = Core.Name "hydra.cypher.openCypher.VariableEquals"
+_VariableEquals_lhs = Core.Name "lhs"
+_VariableEquals_rhs = Core.Name "rhs"
+data VariablePlusEquals =
+  VariablePlusEquals {
+    variablePlusEqualsLhs :: Variable,
+    variablePlusEqualsRhs :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_VariablePlusEquals = Core.Name "hydra.cypher.openCypher.VariablePlusEquals"
+_VariablePlusEquals_lhs = Core.Name "lhs"
+_VariablePlusEquals_rhs = Core.Name "rhs"
+data VariableAndNodeLabels =
+  VariableAndNodeLabels {
+    variableAndNodeLabelsVariable :: Variable,
+    variableAndNodeLabelsLabels :: NodeLabels}
+  deriving (Eq, Ord, Read, Show)
+_VariableAndNodeLabels = Core.Name "hydra.cypher.openCypher.VariableAndNodeLabels"
+_VariableAndNodeLabels_variable = Core.Name "variable"
+_VariableAndNodeLabels_labels = Core.Name "labels"
+data Delete =
+  Delete {
+    deleteDetach :: Bool,
+    deleteExpressions :: [Expression]}
+  deriving (Eq, Ord, Read, Show)
+_Delete = Core.Name "hydra.cypher.openCypher.Delete"
+_Delete_detach = Core.Name "detach"
+_Delete_expressions = Core.Name "expressions"
+newtype Remove =
+  Remove {
+    unRemove :: [RemoveItem]}
+  deriving (Eq, Ord, Read, Show)
+_Remove = Core.Name "hydra.cypher.openCypher.Remove"
+data RemoveItem =
+  RemoveItemVariableLabels VariableAndNodeLabels |
+  RemoveItemProperty PropertyExpression
+  deriving (Eq, Ord, Read, Show)
+_RemoveItem = Core.Name "hydra.cypher.openCypher.RemoveItem"
+_RemoveItem_variableLabels = Core.Name "variableLabels"
+_RemoveItem_property = Core.Name "property"
+data InQueryCall =
+  InQueryCall {
+    inQueryCallCall :: ExplicitProcedureInvocation,
+    inQueryCallYieldItems :: (Maybe YieldItems)}
+  deriving (Eq, Ord, Read, Show)
+_InQueryCall = Core.Name "hydra.cypher.openCypher.InQueryCall"
+_InQueryCall_call = Core.Name "call"
+_InQueryCall_yieldItems = Core.Name "yieldItems"
+data ProcedureInvocation =
+  ProcedureInvocationExplicit ExplicitProcedureInvocation |
+  ProcedureInvocationImplicit ImplicitProcedureInvocation
+  deriving (Eq, Ord, Read, Show)
+_ProcedureInvocation = Core.Name "hydra.cypher.openCypher.ProcedureInvocation"
+_ProcedureInvocation_explicit = Core.Name "explicit"
+_ProcedureInvocation_implicit = Core.Name "implicit"
+data StarOrYieldItems =
+  StarOrYieldItemsStar |
+  StarOrYieldItemsItems YieldItems
+  deriving (Eq, Ord, Read, Show)
+_StarOrYieldItems = Core.Name "hydra.cypher.openCypher.StarOrYieldItems"
+_StarOrYieldItems_star = Core.Name "star"
+_StarOrYieldItems_items = Core.Name "items"
+data StandaloneCall =
+  StandaloneCall {
+    standaloneCallCall :: ProcedureInvocation,
+    standaloneCallYieldItems :: (Maybe StarOrYieldItems)}
+  deriving (Eq, Ord, Read, Show)
+_StandaloneCall = Core.Name "hydra.cypher.openCypher.StandaloneCall"
+_StandaloneCall_call = Core.Name "call"
+_StandaloneCall_yieldItems = Core.Name "yieldItems"
+data YieldItems =
+  YieldItems {
+    yieldItemsItems :: [YieldItem],
+    yieldItemsWhere :: (Maybe Where)}
+  deriving (Eq, Ord, Read, Show)
+_YieldItems = Core.Name "hydra.cypher.openCypher.YieldItems"
+_YieldItems_items = Core.Name "items"
+_YieldItems_where = Core.Name "where"
+data YieldItem =
+  YieldItem {
+    yieldItemField :: (Maybe ProcedureResultField),
+    yieldItemVariable :: Variable}
+  deriving (Eq, Ord, Read, Show)
+_YieldItem = Core.Name "hydra.cypher.openCypher.YieldItem"
+_YieldItem_field = Core.Name "field"
+_YieldItem_variable = Core.Name "variable"
+data With =
+  With {
+    withProjection :: ProjectionBody,
+    withWhere :: (Maybe Where)}
+  deriving (Eq, Ord, Read, Show)
+_With = Core.Name "hydra.cypher.openCypher.With"
+_With_projection = Core.Name "projection"
+_With_where = Core.Name "where"
+newtype Return =
+  Return {
+    unReturn :: ProjectionBody}
+  deriving (Eq, Ord, Read, Show)
+_Return = Core.Name "hydra.cypher.openCypher.Return"
+data ProjectionBody =
+  ProjectionBody {
+    projectionBodyDistinct :: Bool,
+    projectionBodyProjectionItems :: ProjectionItems,
+    projectionBodyOrder :: (Maybe Order),
+    projectionBodySkip :: (Maybe Skip),
+    projectionBodyLimit :: (Maybe Limit)}
+  deriving (Eq, Ord, Read, Show)
+_ProjectionBody = Core.Name "hydra.cypher.openCypher.ProjectionBody"
+_ProjectionBody_distinct = Core.Name "distinct"
+_ProjectionBody_projectionItems = Core.Name "projectionItems"
+_ProjectionBody_order = Core.Name "order"
+_ProjectionBody_skip = Core.Name "skip"
+_ProjectionBody_limit = Core.Name "limit"
+data ProjectionItems =
+  ProjectionItems {
+    projectionItemsStar :: Bool,
+    projectionItemsExplicit :: [ProjectionItem]}
+  deriving (Eq, Ord, Read, Show)
+_ProjectionItems = Core.Name "hydra.cypher.openCypher.ProjectionItems"
+_ProjectionItems_star = Core.Name "star"
+_ProjectionItems_explicit = Core.Name "explicit"
+data ProjectionItem =
+  ProjectionItem {
+    projectionItemExpression :: Expression,
+    projectionItemVariable :: (Maybe Variable)}
+  deriving (Eq, Ord, Read, Show)
+_ProjectionItem = Core.Name "hydra.cypher.openCypher.ProjectionItem"
+_ProjectionItem_expression = Core.Name "expression"
+_ProjectionItem_variable = Core.Name "variable"
+newtype Order =
+  Order {
+    unOrder :: [SortItem]}
+  deriving (Eq, Ord, Read, Show)
+_Order = Core.Name "hydra.cypher.openCypher.Order"
+newtype Skip =
+  Skip {
+    unSkip :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_Skip = Core.Name "hydra.cypher.openCypher.Skip"
+newtype Limit =
+  Limit {
+    unLimit :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_Limit = Core.Name "hydra.cypher.openCypher.Limit"
+data SortOrder =
+  SortOrderAscending |
+  SortOrderDescending
+  deriving (Eq, Ord, Read, Show)
+_SortOrder = Core.Name "hydra.cypher.openCypher.SortOrder"
+_SortOrder_ascending = Core.Name "ascending"
+_SortOrder_descending = Core.Name "descending"
+data SortItem =
+  SortItem {
+    sortItemExpression :: Expression,
+    sortItemOrder :: (Maybe SortOrder)}
+  deriving (Eq, Ord, Read, Show)
+_SortItem = Core.Name "hydra.cypher.openCypher.SortItem"
+_SortItem_expression = Core.Name "expression"
+_SortItem_order = Core.Name "order"
+newtype Where =
+  Where {
+    unWhere :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_Where = Core.Name "hydra.cypher.openCypher.Where"
+newtype Pattern =
+  Pattern {
+    unPattern :: [PatternPart]}
+  deriving (Eq, Ord, Read, Show)
+_Pattern = Core.Name "hydra.cypher.openCypher.Pattern"
+data PatternPart =
+  PatternPart {
+    patternPartVariable :: (Maybe Variable),
+    patternPartPattern :: AnonymousPatternPart}
+  deriving (Eq, Ord, Read, Show)
+_PatternPart = Core.Name "hydra.cypher.openCypher.PatternPart"
+_PatternPart_variable = Core.Name "variable"
+_PatternPart_pattern = Core.Name "pattern"
+newtype AnonymousPatternPart =
+  AnonymousPatternPart {
+    unAnonymousPatternPart :: PatternElement}
+  deriving (Eq, Ord, Read, Show)
+_AnonymousPatternPart = Core.Name "hydra.cypher.openCypher.AnonymousPatternPart"
+data NodePatternChain =
+  NodePatternChain {
+    nodePatternChainNodePattern :: NodePattern,
+    nodePatternChainChain :: [PatternElementChain]}
+  deriving (Eq, Ord, Read, Show)
+_NodePatternChain = Core.Name "hydra.cypher.openCypher.NodePatternChain"
+_NodePatternChain_nodePattern = Core.Name "nodePattern"
+_NodePatternChain_chain = Core.Name "chain"
+data PatternElement =
+  PatternElementChained NodePatternChain |
+  PatternElementParenthesized PatternElement
+  deriving (Eq, Ord, Read, Show)
+_PatternElement = Core.Name "hydra.cypher.openCypher.PatternElement"
+_PatternElement_chained = Core.Name "chained"
+_PatternElement_parenthesized = Core.Name "parenthesized"
+data RelationshipsPattern =
+  RelationshipsPattern {
+    relationshipsPatternNodePattern :: NodePattern,
+    relationshipsPatternChain :: [PatternElementChain]}
+  deriving (Eq, Ord, Read, Show)
+_RelationshipsPattern = Core.Name "hydra.cypher.openCypher.RelationshipsPattern"
+_RelationshipsPattern_nodePattern = Core.Name "nodePattern"
+_RelationshipsPattern_chain = Core.Name "chain"
+data NodePattern =
+  NodePattern {
+    nodePatternVariable :: (Maybe Variable),
+    nodePatternLabels :: (Maybe NodeLabels),
+    nodePatternProperties :: (Maybe Properties)}
+  deriving (Eq, Ord, Read, Show)
+_NodePattern = Core.Name "hydra.cypher.openCypher.NodePattern"
+_NodePattern_variable = Core.Name "variable"
+_NodePattern_labels = Core.Name "labels"
+_NodePattern_properties = Core.Name "properties"
+data PatternElementChain =
+  PatternElementChain {
+    patternElementChainRelationship :: RelationshipPattern,
+    patternElementChainNode :: NodePattern}
+  deriving (Eq, Ord, Read, Show)
+_PatternElementChain = Core.Name "hydra.cypher.openCypher.PatternElementChain"
+_PatternElementChain_relationship = Core.Name "relationship"
+_PatternElementChain_node = Core.Name "node"
+data RelationshipPattern =
+  RelationshipPattern {
+    relationshipPatternLeftArrow :: Bool,
+    relationshipPatternDetail :: (Maybe RelationshipDetail),
+    relationshipPatternRightArrow :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_RelationshipPattern = Core.Name "hydra.cypher.openCypher.RelationshipPattern"
+_RelationshipPattern_leftArrow = Core.Name "leftArrow"
+_RelationshipPattern_detail = Core.Name "detail"
+_RelationshipPattern_rightArrow = Core.Name "rightArrow"
+data RelationshipDetail =
+  RelationshipDetail {
+    relationshipDetailVariable :: (Maybe Variable),
+    relationshipDetailTypes :: (Maybe RelationshipTypes),
+    relationshipDetailRange :: (Maybe RangeLiteral),
+    relationshipDetailProperties :: (Maybe Properties)}
+  deriving (Eq, Ord, Read, Show)
+_RelationshipDetail = Core.Name "hydra.cypher.openCypher.RelationshipDetail"
+_RelationshipDetail_variable = Core.Name "variable"
+_RelationshipDetail_types = Core.Name "types"
+_RelationshipDetail_range = Core.Name "range"
+_RelationshipDetail_properties = Core.Name "properties"
+data Properties =
+  PropertiesMap MapLiteral |
+  PropertiesParameter Parameter
+  deriving (Eq, Ord, Read, Show)
+_Properties = Core.Name "hydra.cypher.openCypher.Properties"
+_Properties_map = Core.Name "map"
+_Properties_parameter = Core.Name "parameter"
+newtype RelationshipTypes =
+  RelationshipTypes {
+    unRelationshipTypes :: [RelTypeName]}
+  deriving (Eq, Ord, Read, Show)
+_RelationshipTypes = Core.Name "hydra.cypher.openCypher.RelationshipTypes"
+newtype NodeLabels =
+  NodeLabels {
+    unNodeLabels :: [NodeLabel]}
+  deriving (Eq, Ord, Read, Show)
+_NodeLabels = Core.Name "hydra.cypher.openCypher.NodeLabels"
+newtype NodeLabel =
+  NodeLabel {
+    unNodeLabel :: String}
+  deriving (Eq, Ord, Read, Show)
+_NodeLabel = Core.Name "hydra.cypher.openCypher.NodeLabel"
+data RangeLiteral =
+  RangeLiteral {
+    rangeLiteralStart :: (Maybe Integer),
+    rangeLiteralEnd :: (Maybe Integer)}
+  deriving (Eq, Ord, Read, Show)
+_RangeLiteral = Core.Name "hydra.cypher.openCypher.RangeLiteral"
+_RangeLiteral_start = Core.Name "start"
+_RangeLiteral_end = Core.Name "end"
+newtype RelTypeName =
+  RelTypeName {
+    unRelTypeName :: String}
+  deriving (Eq, Ord, Read, Show)
+_RelTypeName = Core.Name "hydra.cypher.openCypher.RelTypeName"
+data PropertyExpression =
+  PropertyExpression {
+    propertyExpressionAtom :: Atom,
+    propertyExpressionLookups :: [PropertyLookup]}
+  deriving (Eq, Ord, Read, Show)
+_PropertyExpression = Core.Name "hydra.cypher.openCypher.PropertyExpression"
+_PropertyExpression_atom = Core.Name "atom"
+_PropertyExpression_lookups = Core.Name "lookups"
+newtype Expression =
+  Expression {
+    unExpression :: OrExpression}
+  deriving (Eq, Ord, Read, Show)
+_Expression = Core.Name "hydra.cypher.openCypher.Expression"
+newtype OrExpression =
+  OrExpression {
+    unOrExpression :: [XorExpression]}
+  deriving (Eq, Ord, Read, Show)
+_OrExpression = Core.Name "hydra.cypher.openCypher.OrExpression"
+newtype XorExpression =
+  XorExpression {
+    unXorExpression :: [AndExpression]}
+  deriving (Eq, Ord, Read, Show)
+_XorExpression = Core.Name "hydra.cypher.openCypher.XorExpression"
+newtype AndExpression =
+  AndExpression {
+    unAndExpression :: [NotExpression]}
+  deriving (Eq, Ord, Read, Show)
+_AndExpression = Core.Name "hydra.cypher.openCypher.AndExpression"
+data NotExpression =
+  NotExpression {
+    notExpressionNot :: Bool,
+    notExpressionExpression :: ComparisonExpression}
+  deriving (Eq, Ord, Read, Show)
+_NotExpression = Core.Name "hydra.cypher.openCypher.NotExpression"
+_NotExpression_not = Core.Name "not"
+_NotExpression_expression = Core.Name "expression"
+data ComparisonExpression =
+  ComparisonExpression {
+    comparisonExpressionLeft :: StringListNullPredicateExpression,
+    comparisonExpressionRight :: [PartialComparisonExpression]}
+  deriving (Eq, Ord, Read, Show)
+_ComparisonExpression = Core.Name "hydra.cypher.openCypher.ComparisonExpression"
+_ComparisonExpression_left = Core.Name "left"
+_ComparisonExpression_right = Core.Name "right"
+data ComparisonOperator =
+  ComparisonOperatorEq |
+  ComparisonOperatorNeq |
+  ComparisonOperatorLt |
+  ComparisonOperatorGt |
+  ComparisonOperatorLte |
+  ComparisonOperatorGte
+  deriving (Eq, Ord, Read, Show)
+_ComparisonOperator = Core.Name "hydra.cypher.openCypher.ComparisonOperator"
+_ComparisonOperator_eq = Core.Name "eq"
+_ComparisonOperator_neq = Core.Name "neq"
+_ComparisonOperator_lt = Core.Name "lt"
+_ComparisonOperator_gt = Core.Name "gt"
+_ComparisonOperator_lte = Core.Name "lte"
+_ComparisonOperator_gte = Core.Name "gte"
+data PartialComparisonExpression =
+  PartialComparisonExpression {
+    partialComparisonExpressionOperator :: ComparisonOperator,
+    partialComparisonExpressionRight :: StringListNullPredicateExpression}
+  deriving (Eq, Ord, Read, Show)
+_PartialComparisonExpression = Core.Name "hydra.cypher.openCypher.PartialComparisonExpression"
+_PartialComparisonExpression_operator = Core.Name "operator"
+_PartialComparisonExpression_right = Core.Name "right"
+data StringListNullPredicateExpression =
+  StringListNullPredicateExpression {
+    stringListNullPredicateExpressionLeft :: AddOrSubtractExpression,
+    stringListNullPredicateExpressionRight :: [StringListNullPredicateRightHandSide]}
+  deriving (Eq, Ord, Read, Show)
+_StringListNullPredicateExpression = Core.Name "hydra.cypher.openCypher.StringListNullPredicateExpression"
+_StringListNullPredicateExpression_left = Core.Name "left"
+_StringListNullPredicateExpression_right = Core.Name "right"
+data StringListNullPredicateRightHandSide =
+  StringListNullPredicateRightHandSideString StringPredicateExpression |
+  StringListNullPredicateRightHandSideList ListPredicateExpression |
+  StringListNullPredicateRightHandSideNull NullPredicateExpression
+  deriving (Eq, Ord, Read, Show)
+_StringListNullPredicateRightHandSide = Core.Name "hydra.cypher.openCypher.StringListNullPredicateRightHandSide"
+_StringListNullPredicateRightHandSide_string = Core.Name "string"
+_StringListNullPredicateRightHandSide_list = Core.Name "list"
+_StringListNullPredicateRightHandSide_null = Core.Name "null"
+data StringPredicateExpression =
+  StringPredicateExpression {
+    stringPredicateExpressionOperator :: StringPredicateOperator,
+    stringPredicateExpressionExpression :: AddOrSubtractExpression}
+  deriving (Eq, Ord, Read, Show)
+_StringPredicateExpression = Core.Name "hydra.cypher.openCypher.StringPredicateExpression"
+_StringPredicateExpression_operator = Core.Name "operator"
+_StringPredicateExpression_expression = Core.Name "expression"
+data StringPredicateOperator =
+  StringPredicateOperatorStartsWith |
+  StringPredicateOperatorEndsWith |
+  StringPredicateOperatorContains
+  deriving (Eq, Ord, Read, Show)
+_StringPredicateOperator = Core.Name "hydra.cypher.openCypher.StringPredicateOperator"
+_StringPredicateOperator_startsWith = Core.Name "startsWith"
+_StringPredicateOperator_endsWith = Core.Name "endsWith"
+_StringPredicateOperator_contains = Core.Name "contains"
+newtype ListPredicateExpression =
+  ListPredicateExpression {
+    unListPredicateExpression :: AddOrSubtractExpression}
+  deriving (Eq, Ord, Read, Show)
+_ListPredicateExpression = Core.Name "hydra.cypher.openCypher.ListPredicateExpression"
+newtype NullPredicateExpression =
+  NullPredicateExpression {
+    unNullPredicateExpression :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_NullPredicateExpression = Core.Name "hydra.cypher.openCypher.NullPredicateExpression"
+data AddOrSubtractExpression =
+  AddOrSubtractExpression {
+    addOrSubtractExpressionLeft :: MultiplyDivideModuloExpression,
+    addOrSubtractExpressionRight :: [AddOrSubtractRightHandSide]}
+  deriving (Eq, Ord, Read, Show)
+_AddOrSubtractExpression = Core.Name "hydra.cypher.openCypher.AddOrSubtractExpression"
+_AddOrSubtractExpression_left = Core.Name "left"
+_AddOrSubtractExpression_right = Core.Name "right"
+data AddOrSubtractRightHandSide =
+  AddOrSubtractRightHandSide {
+    addOrSubtractRightHandSideOperator :: AddOrSubtractOperator,
+    addOrSubtractRightHandSideExpression :: MultiplyDivideModuloExpression}
+  deriving (Eq, Ord, Read, Show)
+_AddOrSubtractRightHandSide = Core.Name "hydra.cypher.openCypher.AddOrSubtractRightHandSide"
+_AddOrSubtractRightHandSide_operator = Core.Name "operator"
+_AddOrSubtractRightHandSide_expression = Core.Name "expression"
+data AddOrSubtractOperator =
+  AddOrSubtractOperatorAdd |
+  AddOrSubtractOperatorSubtract
+  deriving (Eq, Ord, Read, Show)
+_AddOrSubtractOperator = Core.Name "hydra.cypher.openCypher.AddOrSubtractOperator"
+_AddOrSubtractOperator_add = Core.Name "add"
+_AddOrSubtractOperator_subtract = Core.Name "subtract"
+data MultiplyDivideModuloExpression =
+  MultiplyDivideModuloExpression {
+    multiplyDivideModuloExpressionLeft :: PowerOfExpression,
+    multiplyDivideModuloExpressionRight :: [MultiplyDivideModuloRightHandSide]}
+  deriving (Eq, Ord, Read, Show)
+_MultiplyDivideModuloExpression = Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloExpression"
+_MultiplyDivideModuloExpression_left = Core.Name "left"
+_MultiplyDivideModuloExpression_right = Core.Name "right"
+data MultiplyDivideModuloRightHandSide =
+  MultiplyDivideModuloRightHandSide {
+    multiplyDivideModuloRightHandSideOperator :: MultiplyDivideModuloOperator,
+    multiplyDivideModuloRightHandSideExpression :: PowerOfExpression}
+  deriving (Eq, Ord, Read, Show)
+_MultiplyDivideModuloRightHandSide = Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloRightHandSide"
+_MultiplyDivideModuloRightHandSide_operator = Core.Name "operator"
+_MultiplyDivideModuloRightHandSide_expression = Core.Name "expression"
+data MultiplyDivideModuloOperator =
+  MultiplyDivideModuloOperatorMultiply |
+  MultiplyDivideModuloOperatorDivide |
+  MultiplyDivideModuloOperatorModulo
+  deriving (Eq, Ord, Read, Show)
+_MultiplyDivideModuloOperator = Core.Name "hydra.cypher.openCypher.MultiplyDivideModuloOperator"
+_MultiplyDivideModuloOperator_multiply = Core.Name "multiply"
+_MultiplyDivideModuloOperator_divide = Core.Name "divide"
+_MultiplyDivideModuloOperator_modulo = Core.Name "modulo"
+newtype PowerOfExpression =
+  PowerOfExpression {
+    unPowerOfExpression :: [UnaryAddOrSubtractExpression]}
+  deriving (Eq, Ord, Read, Show)
+_PowerOfExpression = Core.Name "hydra.cypher.openCypher.PowerOfExpression"
+data UnaryAddOrSubtractExpression =
+  UnaryAddOrSubtractExpression {
+    unaryAddOrSubtractExpressionOperator :: (Maybe AddOrSubtractOperator),
+    unaryAddOrSubtractExpressionExpression :: NonArithmeticOperatorExpression}
+  deriving (Eq, Ord, Read, Show)
+_UnaryAddOrSubtractExpression = Core.Name "hydra.cypher.openCypher.UnaryAddOrSubtractExpression"
+_UnaryAddOrSubtractExpression_operator = Core.Name "operator"
+_UnaryAddOrSubtractExpression_expression = Core.Name "expression"
+data ListOperatorExpressionOrPropertyLookup =
+  ListOperatorExpressionOrPropertyLookupList ListOperatorExpression |
+  ListOperatorExpressionOrPropertyLookupProperty PropertyLookup
+  deriving (Eq, Ord, Read, Show)
+_ListOperatorExpressionOrPropertyLookup = Core.Name "hydra.cypher.openCypher.ListOperatorExpressionOrPropertyLookup"
+_ListOperatorExpressionOrPropertyLookup_list = Core.Name "list"
+_ListOperatorExpressionOrPropertyLookup_property = Core.Name "property"
+data NonArithmeticOperatorExpression =
+  NonArithmeticOperatorExpression {
+    nonArithmeticOperatorExpressionAtom :: Atom,
+    nonArithmeticOperatorExpressionListsAndLookups :: [ListOperatorExpressionOrPropertyLookup],
+    nonArithmeticOperatorExpressionLabels :: (Maybe NodeLabels)}
+  deriving (Eq, Ord, Read, Show)
+_NonArithmeticOperatorExpression = Core.Name "hydra.cypher.openCypher.NonArithmeticOperatorExpression"
+_NonArithmeticOperatorExpression_atom = Core.Name "atom"
+_NonArithmeticOperatorExpression_listsAndLookups = Core.Name "listsAndLookups"
+_NonArithmeticOperatorExpression_labels = Core.Name "labels"
+data RangeExpression =
+  RangeExpression {
+    rangeExpressionStart :: (Maybe Expression),
+    rangeExpressionEnd :: (Maybe Expression)}
+  deriving (Eq, Ord, Read, Show)
+_RangeExpression = Core.Name "hydra.cypher.openCypher.RangeExpression"
+_RangeExpression_start = Core.Name "start"
+_RangeExpression_end = Core.Name "end"
+data ListOperatorExpression =
+  ListOperatorExpressionSingle Expression |
+  ListOperatorExpressionRange RangeExpression
+  deriving (Eq, Ord, Read, Show)
+_ListOperatorExpression = Core.Name "hydra.cypher.openCypher.ListOperatorExpression"
+_ListOperatorExpression_single = Core.Name "single"
+_ListOperatorExpression_range = Core.Name "range"
+newtype PropertyLookup =
+  PropertyLookup {
+    unPropertyLookup :: PropertyKeyName}
+  deriving (Eq, Ord, Read, Show)
+_PropertyLookup = Core.Name "hydra.cypher.openCypher.PropertyLookup"
+data Atom =
+  AtomLiteral Literal |
+  AtomParameter Parameter |
+  AtomCase CaseExpression |
+  AtomCountStar |
+  AtomListComprehension ListComprehension |
+  AtomPatternComprehension PatternComprehension |
+  AtomQuantifier Quantifier |
+  AtomPatternPredicate PatternPredicate |
+  AtomParenthesized ParenthesizedExpression |
+  AtomFunctionInvocation FunctionInvocation |
+  AtomExistentialSubquery ExistentialSubquery |
+  AtomVariable Variable
+  deriving (Eq, Ord, Read, Show)
+_Atom = Core.Name "hydra.cypher.openCypher.Atom"
+_Atom_literal = Core.Name "literal"
+_Atom_parameter = Core.Name "parameter"
+_Atom_case = Core.Name "case"
+_Atom_countStar = Core.Name "countStar"
+_Atom_listComprehension = Core.Name "listComprehension"
+_Atom_patternComprehension = Core.Name "patternComprehension"
+_Atom_quantifier = Core.Name "quantifier"
+_Atom_patternPredicate = Core.Name "patternPredicate"
+_Atom_parenthesized = Core.Name "parenthesized"
+_Atom_functionInvocation = Core.Name "functionInvocation"
+_Atom_existentialSubquery = Core.Name "existentialSubquery"
+_Atom_variable = Core.Name "variable"
+data CaseExpression =
+  CaseExpression {
+    caseExpressionExpression :: (Maybe Expression),
+    caseExpressionAlternatives :: [CaseAlternative],
+    caseExpressionElse :: (Maybe Expression)}
+  deriving (Eq, Ord, Read, Show)
+_CaseExpression = Core.Name "hydra.cypher.openCypher.CaseExpression"
+_CaseExpression_expression = Core.Name "expression"
+_CaseExpression_alternatives = Core.Name "alternatives"
+_CaseExpression_else = Core.Name "else"
+data CaseAlternative =
+  CaseAlternative {
+    caseAlternativeCondition :: Expression,
+    caseAlternativeResult :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_CaseAlternative = Core.Name "hydra.cypher.openCypher.CaseAlternative"
+_CaseAlternative_condition = Core.Name "condition"
+_CaseAlternative_result = Core.Name "result"
+data ListComprehension =
+  ListComprehension {
+    listComprehensionLeft :: FilterExpression,
+    listComprehensionRight :: (Maybe Expression)}
+  deriving (Eq, Ord, Read, Show)
+_ListComprehension = Core.Name "hydra.cypher.openCypher.ListComprehension"
+_ListComprehension_left = Core.Name "left"
+_ListComprehension_right = Core.Name "right"
+data PatternComprehension =
+  PatternComprehension {
+    patternComprehensionVariable :: (Maybe Variable),
+    patternComprehensionPattern :: RelationshipsPattern,
+    patternComprehensionWhere :: (Maybe Where),
+    patternComprehensionRight :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_PatternComprehension = Core.Name "hydra.cypher.openCypher.PatternComprehension"
+_PatternComprehension_variable = Core.Name "variable"
+_PatternComprehension_pattern = Core.Name "pattern"
+_PatternComprehension_where = Core.Name "where"
+_PatternComprehension_right = Core.Name "right"
+data Quantifier =
+  Quantifier {
+    quantifierOperator :: QuantifierOperator,
+    quantifierExpression :: FilterExpression}
+  deriving (Eq, Ord, Read, Show)
+_Quantifier = Core.Name "hydra.cypher.openCypher.Quantifier"
+_Quantifier_operator = Core.Name "operator"
+_Quantifier_expression = Core.Name "expression"
+data QuantifierOperator =
+  QuantifierOperatorAll |
+  QuantifierOperatorAny |
+  QuantifierOperatorNone |
+  QuantifierOperatorSingle
+  deriving (Eq, Ord, Read, Show)
+_QuantifierOperator = Core.Name "hydra.cypher.openCypher.QuantifierOperator"
+_QuantifierOperator_all = Core.Name "all"
+_QuantifierOperator_any = Core.Name "any"
+_QuantifierOperator_none = Core.Name "none"
+_QuantifierOperator_single = Core.Name "single"
+data FilterExpression =
+  FilterExpression {
+    filterExpressionIdInColl :: IdInColl,
+    filterExpressionWhere :: (Maybe Where)}
+  deriving (Eq, Ord, Read, Show)
+_FilterExpression = Core.Name "hydra.cypher.openCypher.FilterExpression"
+_FilterExpression_idInColl = Core.Name "idInColl"
+_FilterExpression_where = Core.Name "where"
+newtype PatternPredicate =
+  PatternPredicate {
+    unPatternPredicate :: RelationshipsPattern}
+  deriving (Eq, Ord, Read, Show)
+_PatternPredicate = Core.Name "hydra.cypher.openCypher.PatternPredicate"
+newtype ParenthesizedExpression =
+  ParenthesizedExpression {
+    unParenthesizedExpression :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_ParenthesizedExpression = Core.Name "hydra.cypher.openCypher.ParenthesizedExpression"
+data IdInColl =
+  IdInColl {
+    idInCollVariable :: Variable,
+    idInCollExpression :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_IdInColl = Core.Name "hydra.cypher.openCypher.IdInColl"
+_IdInColl_variable = Core.Name "variable"
+_IdInColl_expression = Core.Name "expression"
+data FunctionInvocation =
+  FunctionInvocation {
+    functionInvocationName :: QualifiedName,
+    functionInvocationDistinct :: Bool,
+    functionInvocationArguments :: [Expression]}
+  deriving (Eq, Ord, Read, Show)
+_FunctionInvocation = Core.Name "hydra.cypher.openCypher.FunctionInvocation"
+_FunctionInvocation_name = Core.Name "name"
+_FunctionInvocation_distinct = Core.Name "distinct"
+_FunctionInvocation_arguments = Core.Name "arguments"
+data QualifiedName =
+  QualifiedName {
+    qualifiedNameNamespace :: String,
+    qualifiedNameLocal :: String}
+  deriving (Eq, Ord, Read, Show)
+_QualifiedName = Core.Name "hydra.cypher.openCypher.QualifiedName"
+_QualifiedName_namespace = Core.Name "namespace"
+_QualifiedName_local = Core.Name "local"
+data PatternWhere =
+  PatternWhere {
+    patternWherePattern :: Pattern,
+    patternWhereWhere :: (Maybe Where)}
+  deriving (Eq, Ord, Read, Show)
+_PatternWhere = Core.Name "hydra.cypher.openCypher.PatternWhere"
+_PatternWhere_pattern = Core.Name "pattern"
+_PatternWhere_where = Core.Name "where"
+data ExistentialSubquery =
+  ExistentialSubqueryRegular RegularQuery |
+  ExistentialSubqueryPattern PatternWhere
+  deriving (Eq, Ord, Read, Show)
+_ExistentialSubquery = Core.Name "hydra.cypher.openCypher.ExistentialSubquery"
+_ExistentialSubquery_regular = Core.Name "regular"
+_ExistentialSubquery_pattern = Core.Name "pattern"
+data ExplicitProcedureInvocation =
+  ExplicitProcedureInvocation {
+    explicitProcedureInvocationName :: QualifiedName,
+    explicitProcedureInvocationArguments :: [Expression]}
+  deriving (Eq, Ord, Read, Show)
+_ExplicitProcedureInvocation = Core.Name "hydra.cypher.openCypher.ExplicitProcedureInvocation"
+_ExplicitProcedureInvocation_name = Core.Name "name"
+_ExplicitProcedureInvocation_arguments = Core.Name "arguments"
+newtype ImplicitProcedureInvocation =
+  ImplicitProcedureInvocation {
+    unImplicitProcedureInvocation :: QualifiedName}
+  deriving (Eq, Ord, Read, Show)
+_ImplicitProcedureInvocation = Core.Name "hydra.cypher.openCypher.ImplicitProcedureInvocation"
+newtype ProcedureResultField =
+  ProcedureResultField {
+    unProcedureResultField :: String}
+  deriving (Eq, Ord, Read, Show)
+_ProcedureResultField = Core.Name "hydra.cypher.openCypher.ProcedureResultField"
+newtype Variable =
+  Variable {
+    unVariable :: String}
+  deriving (Eq, Ord, Read, Show)
+_Variable = Core.Name "hydra.cypher.openCypher.Variable"
+data Literal =
+  LiteralBoolean Bool |
+  LiteralNull |
+  LiteralNumber NumberLiteral |
+  LiteralString StringLiteral |
+  LiteralList ListLiteral |
+  LiteralMap MapLiteral
+  deriving (Eq, Ord, Read, Show)
+_Literal = Core.Name "hydra.cypher.openCypher.Literal"
+_Literal_boolean = Core.Name "boolean"
+_Literal_null = Core.Name "null"
+_Literal_number = Core.Name "number"
+_Literal_string = Core.Name "string"
+_Literal_list = Core.Name "list"
+_Literal_map = Core.Name "map"
+data NumberLiteral =
+  NumberLiteralDouble Double |
+  NumberLiteralInteger Integer
+  deriving (Eq, Ord, Read, Show)
+_NumberLiteral = Core.Name "hydra.cypher.openCypher.NumberLiteral"
+_NumberLiteral_double = Core.Name "double"
+_NumberLiteral_integer = Core.Name "integer"
+newtype StringLiteral =
+  StringLiteral {
+    unStringLiteral :: String}
+  deriving (Eq, Ord, Read, Show)
+_StringLiteral = Core.Name "hydra.cypher.openCypher.StringLiteral"
+newtype ListLiteral =
+  ListLiteral {
+    unListLiteral :: [Expression]}
+  deriving (Eq, Ord, Read, Show)
+_ListLiteral = Core.Name "hydra.cypher.openCypher.ListLiteral"
+newtype MapLiteral =
+  MapLiteral {
+    unMapLiteral :: [KeyValuePair]}
+  deriving (Eq, Ord, Read, Show)
+_MapLiteral = Core.Name "hydra.cypher.openCypher.MapLiteral"
+data KeyValuePair =
+  KeyValuePair {
+    keyValuePairKey :: PropertyKeyName,
+    keyValuePairValue :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_KeyValuePair = Core.Name "hydra.cypher.openCypher.KeyValuePair"
+_KeyValuePair_key = Core.Name "key"
+_KeyValuePair_value = Core.Name "value"
+newtype PropertyKeyName =
+  PropertyKeyName {
+    unPropertyKeyName :: String}
+  deriving (Eq, Ord, Read, Show)
+_PropertyKeyName = Core.Name "hydra.cypher.openCypher.PropertyKeyName"
+data Parameter =
+  ParameterSymbolic String |
+  ParameterInteger Integer
+  deriving (Eq, Ord, Read, Show)
+_Parameter = Core.Name "hydra.cypher.openCypher.Parameter"
+_Parameter_symbolic = Core.Name "symbolic"
+_Parameter_integer = Core.Name "integer"
diff --git a/src/main/haskell/Hydra/Decode/Neo4j/Model.hs b/src/main/haskell/Hydra/Decode/Neo4j/Model.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Decode/Neo4j/Model.hs
@@ -0,0 +1,541 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Term decoders for hydra.neo4j.model
+
+module Hydra.Decode.Neo4j.Model where
+import qualified Hydra.Core as Core
+import qualified Hydra.Decode.Core as DecodeCore
+import qualified Hydra.Errors as Errors
+import qualified Hydra.Extract.Core as ExtractCore
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Lexical as Lexical
+import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings
+import qualified Hydra.Neo4j.Model as Model
+import qualified Hydra.Rewriting as Rewriting
+import qualified Hydra.Util as Util
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Decoder for hydra.neo4j.model.Constraint
+constraint :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.Constraint
+constraint cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermInject v0 ->
+        let field = Core.injectionField v0
+            fname = Core.fieldName field
+            fterm = Core.fieldTerm field
+            variantMap =
+                    Maps.fromList [
+                      (Core.Name "key", (\input -> Eithers.map (\t -> Model.ConstraintKey t) (keyConstraint cx input))),
+                      (
+                        Core.Name "propertyExistence",
+                        (\input -> Eithers.map (\t -> Model.ConstraintPropertyExistence t) (propertyExistenceConstraint cx input))),
+                      (
+                        Core.Name "propertyType",
+                        (\input -> Eithers.map (\t -> Model.ConstraintPropertyType t) (propertyTypeConstraint cx input))),
+                      (
+                        Core.Name "propertyUniqueness",
+                        (\input -> Eithers.map (\t -> Model.ConstraintPropertyUniqueness t) (propertyUniquenessConstraint cx input)))]
+        in (Optionals.cases (Maps.lookup fname variantMap) (Left (Errors.DecodingError (Strings.cat [
+          "no such field ",
+          (Core.unName fname),
+          " in union"]))) (\f -> f fterm))
+      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.ConstraintDefinition
+constraintDefinition :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.ConstraintDefinition
+constraintDefinition cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "name" (ExtractCore.decodeMaybe (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2))) fieldMap cx) (\field_name -> Eithers.bind (ExtractCore.requireField "body" constraint fieldMap cx) (\field_body -> Right (Model.ConstraintDefinition {
+          Model.constraintDefinitionName = field_name,
+          Model.constraintDefinitionBody = field_body}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.ConstraintDefinition")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.Element
+element :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.Element
+element cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermInject v0 ->
+        let field = Core.injectionField v0
+            fname = Core.fieldName field
+            fterm = Core.fieldTerm field
+            variantMap =
+                    Maps.fromList [
+                      (Core.Name "node", (\input -> Eithers.map (\t -> Model.ElementNode t) (node cx input))),
+                      (Core.Name "relationship", (\input -> Eithers.map (\t -> Model.ElementRelationship t) (relationship cx input)))]
+        in (Optionals.cases (Maps.lookup fname variantMap) (Left (Errors.DecodingError (Strings.cat [
+          "no such field ",
+          (Core.unName fname),
+          " in union"]))) (\f -> f fterm))
+      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.ElementId
+elementId :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.ElementId
+elementId cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermWrap v0 -> Eithers.map (\b -> Model.ElementId b) ((\raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+        Core.TermLiteral v1 -> case v1 of
+          Core.LiteralString v2 -> Right v2
+          _ -> Left (Errors.DecodingError "expected string literal")
+        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx raw2)) (Core.wrappedTermBody v0))
+      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.GraphType
+graphType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.GraphType
+graphType cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "nodes" (ExtractCore.decodeList nodeElementType) fieldMap cx) (\field_nodes -> Eithers.bind (ExtractCore.requireField "relationships" (ExtractCore.decodeList relationshipElementType) fieldMap cx) (\field_relationships -> Right (Model.GraphType {
+          Model.graphTypeNodes = field_nodes,
+          Model.graphTypeRelationships = field_relationships}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.GraphType")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.IsoDuration
+isoDuration :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.IsoDuration
+isoDuration cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "months" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralInteger v2 -> case v2 of
+              Core.IntegerValueInt64 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected int64 value")
+            _ -> Left (Errors.DecodingError "expected int64 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_months -> Eithers.bind (ExtractCore.requireField "days" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralInteger v2 -> case v2 of
+              Core.IntegerValueInt64 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected int64 value")
+            _ -> Left (Errors.DecodingError "expected int64 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_days -> Eithers.bind (ExtractCore.requireField "seconds" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralInteger v2 -> case v2 of
+              Core.IntegerValueInt64 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected int64 value")
+            _ -> Left (Errors.DecodingError "expected int64 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_seconds -> Eithers.bind (ExtractCore.requireField "nanoseconds" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralInteger v2 -> case v2 of
+              Core.IntegerValueInt32 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected int32 value")
+            _ -> Left (Errors.DecodingError "expected int32 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_nanoseconds -> Right (Model.IsoDuration {
+          Model.isoDurationMonths = field_months,
+          Model.isoDurationDays = field_days,
+          Model.isoDurationSeconds = field_seconds,
+          Model.isoDurationNanoseconds = field_nanoseconds}))))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.IsoDuration")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.Key
+key :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.Key
+key cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermWrap v0 -> Eithers.map (\b -> Model.Key b) ((\raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+        Core.TermLiteral v1 -> case v1 of
+          Core.LiteralString v2 -> Right v2
+          _ -> Left (Errors.DecodingError "expected string literal")
+        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx raw2)) (Core.wrappedTermBody v0))
+      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.KeyConstraint
+keyConstraint :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.KeyConstraint
+keyConstraint cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "properties" (ExtractCore.decodeList key) fieldMap cx) (\field_properties -> Right (Model.KeyConstraint {
+          Model.keyConstraintProperties = field_properties})))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.KeyConstraint")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.LocalDate
+localDate :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.LocalDate
+localDate cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "year" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralInteger v2 -> case v2 of
+              Core.IntegerValueInt32 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected int32 value")
+            _ -> Left (Errors.DecodingError "expected int32 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_year -> Eithers.bind (ExtractCore.requireField "month" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralInteger v2 -> case v2 of
+              Core.IntegerValueInt32 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected int32 value")
+            _ -> Left (Errors.DecodingError "expected int32 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_month -> Eithers.bind (ExtractCore.requireField "day" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralInteger v2 -> case v2 of
+              Core.IntegerValueInt32 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected int32 value")
+            _ -> Left (Errors.DecodingError "expected int32 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_day -> Right (Model.LocalDate {
+          Model.localDateYear = field_year,
+          Model.localDateMonth = field_month,
+          Model.localDateDay = field_day})))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.LocalDate")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.LocalDateTime
+localDateTime :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.LocalDateTime
+localDateTime cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "date" localDate fieldMap cx) (\field_date -> Eithers.bind (ExtractCore.requireField "time" localTime fieldMap cx) (\field_time -> Right (Model.LocalDateTime {
+          Model.localDateTimeDate = field_date,
+          Model.localDateTimeTime = field_time}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.LocalDateTime")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.LocalTime
+localTime :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.LocalTime
+localTime cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "hour" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralInteger v2 -> case v2 of
+              Core.IntegerValueInt32 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected int32 value")
+            _ -> Left (Errors.DecodingError "expected int32 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_hour -> Eithers.bind (ExtractCore.requireField "minute" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralInteger v2 -> case v2 of
+              Core.IntegerValueInt32 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected int32 value")
+            _ -> Left (Errors.DecodingError "expected int32 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_minute -> Eithers.bind (ExtractCore.requireField "second" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralInteger v2 -> case v2 of
+              Core.IntegerValueInt32 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected int32 value")
+            _ -> Left (Errors.DecodingError "expected int32 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_second -> Eithers.bind (ExtractCore.requireField "nanosecond" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralInteger v2 -> case v2 of
+              Core.IntegerValueInt32 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected int32 value")
+            _ -> Left (Errors.DecodingError "expected int32 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_nanosecond -> Right (Model.LocalTime {
+          Model.localTimeHour = field_hour,
+          Model.localTimeMinute = field_minute,
+          Model.localTimeSecond = field_second,
+          Model.localTimeNanosecond = field_nanosecond}))))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.LocalTime")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.Node
+node :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.Node
+node cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "id" elementId fieldMap cx) (\field_id -> Eithers.bind (ExtractCore.requireField "labels" (ExtractCore.decodeSet nodeLabel) fieldMap cx) (\field_labels -> Eithers.bind (ExtractCore.requireField "properties" (ExtractCore.decodeMap key value) fieldMap cx) (\field_properties -> Right (Model.Node {
+          Model.nodeId = field_id,
+          Model.nodeLabels = field_labels,
+          Model.nodeProperties = field_properties})))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.Node")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.NodeElementType
+nodeElementType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.NodeElementType
+nodeElementType cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "identifyingLabel" nodeLabel fieldMap cx) (\field_identifyingLabel -> Eithers.bind (ExtractCore.requireField "impliedLabels" (ExtractCore.decodeSet nodeLabel) fieldMap cx) (\field_impliedLabels -> Eithers.bind (ExtractCore.requireField "constraints" (ExtractCore.decodeList constraintDefinition) fieldMap cx) (\field_constraints -> Right (Model.NodeElementType {
+          Model.nodeElementTypeIdentifyingLabel = field_identifyingLabel,
+          Model.nodeElementTypeImpliedLabels = field_impliedLabels,
+          Model.nodeElementTypeConstraints = field_constraints})))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.NodeElementType")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.NodeLabel
+nodeLabel :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.NodeLabel
+nodeLabel cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermWrap v0 -> Eithers.map (\b -> Model.NodeLabel b) ((\raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+        Core.TermLiteral v1 -> case v1 of
+          Core.LiteralString v2 -> Right v2
+          _ -> Left (Errors.DecodingError "expected string literal")
+        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx raw2)) (Core.wrappedTermBody v0))
+      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.OffsetTime
+offsetTime :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.OffsetTime
+offsetTime cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "time" localTime fieldMap cx) (\field_time -> Eithers.bind (ExtractCore.requireField "offset" zoneOffset fieldMap cx) (\field_offset -> Right (Model.OffsetTime {
+          Model.offsetTimeTime = field_time,
+          Model.offsetTimeOffset = field_offset}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.OffsetTime")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.Path
+path :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.Path
+path cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "start" node fieldMap cx) (\field_start -> Eithers.bind (ExtractCore.requireField "segments" (ExtractCore.decodeList segment) fieldMap cx) (\field_segments -> Right (Model.Path {
+          Model.pathStart = field_start,
+          Model.pathSegments = field_segments}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.Path")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.Point
+point :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.Point
+point cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "srid" spatialReferenceIdentifier fieldMap cx) (\field_srid -> Eithers.bind (ExtractCore.requireField "x" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralFloat v2 -> case v2 of
+              Core.FloatValueFloat64 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected float64 value")
+            _ -> Left (Errors.DecodingError "expected float64 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_x -> Eithers.bind (ExtractCore.requireField "y" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralFloat v2 -> case v2 of
+              Core.FloatValueFloat64 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected float64 value")
+            _ -> Left (Errors.DecodingError "expected float64 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_y -> Eithers.bind (ExtractCore.requireField "z" (ExtractCore.decodeMaybe (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralFloat v2 -> case v2 of
+              Core.FloatValueFloat64 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected float64 value")
+            _ -> Left (Errors.DecodingError "expected float64 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2))) fieldMap cx) (\field_z -> Right (Model.Point {
+          Model.pointSrid = field_srid,
+          Model.pointX = field_x,
+          Model.pointY = field_y,
+          Model.pointZ = field_z}))))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.Point")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.PropertyExistenceConstraint
+propertyExistenceConstraint :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.PropertyExistenceConstraint
+propertyExistenceConstraint cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "property" key fieldMap cx) (\field_property -> Right (Model.PropertyExistenceConstraint {
+          Model.propertyExistenceConstraintProperty = field_property})))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.PropertyExistenceConstraint")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.PropertyTypeConstraint
+propertyTypeConstraint :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.PropertyTypeConstraint
+propertyTypeConstraint cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "property" key fieldMap cx) (\field_property -> Eithers.bind (ExtractCore.requireField "type" valueType fieldMap cx) (\field_type -> Right (Model.PropertyTypeConstraint {
+          Model.propertyTypeConstraintProperty = field_property,
+          Model.propertyTypeConstraintType = field_type}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.PropertyTypeConstraint")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.PropertyUniquenessConstraint
+propertyUniquenessConstraint :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.PropertyUniquenessConstraint
+propertyUniquenessConstraint cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "properties" (ExtractCore.decodeList key) fieldMap cx) (\field_properties -> Right (Model.PropertyUniquenessConstraint {
+          Model.propertyUniquenessConstraintProperties = field_properties})))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.PropertyUniquenessConstraint")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.Relationship
+relationship :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.Relationship
+relationship cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "id" elementId fieldMap cx) (\field_id -> Eithers.bind (ExtractCore.requireField "properties" (ExtractCore.decodeMap key value) fieldMap cx) (\field_properties -> Eithers.bind (ExtractCore.requireField "type" relationshipType fieldMap cx) (\field_type -> Eithers.bind (ExtractCore.requireField "start" elementId fieldMap cx) (\field_start -> Eithers.bind (ExtractCore.requireField "end" elementId fieldMap cx) (\field_end -> Right (Model.Relationship {
+          Model.relationshipId = field_id,
+          Model.relationshipProperties = field_properties,
+          Model.relationshipType = field_type,
+          Model.relationshipStart = field_start,
+          Model.relationshipEnd = field_end})))))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.Relationship")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.RelationshipElementType
+relationshipElementType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.RelationshipElementType
+relationshipElementType cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "type" relationshipType fieldMap cx) (\field_type -> Eithers.bind (ExtractCore.requireField "startLabel" nodeLabel fieldMap cx) (\field_startLabel -> Eithers.bind (ExtractCore.requireField "endLabel" nodeLabel fieldMap cx) (\field_endLabel -> Eithers.bind (ExtractCore.requireField "constraints" (ExtractCore.decodeList constraintDefinition) fieldMap cx) (\field_constraints -> Right (Model.RelationshipElementType {
+          Model.relationshipElementTypeType = field_type,
+          Model.relationshipElementTypeStartLabel = field_startLabel,
+          Model.relationshipElementTypeEndLabel = field_endLabel,
+          Model.relationshipElementTypeConstraints = field_constraints}))))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.RelationshipElementType")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.RelationshipType
+relationshipType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.RelationshipType
+relationshipType cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermWrap v0 -> Eithers.map (\b -> Model.RelationshipType b) ((\raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+        Core.TermLiteral v1 -> case v1 of
+          Core.LiteralString v2 -> Right v2
+          _ -> Left (Errors.DecodingError "expected string literal")
+        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx raw2)) (Core.wrappedTermBody v0))
+      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.Segment
+segment :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.Segment
+segment cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "relationship" relationship fieldMap cx) (\field_relationship -> Eithers.bind (ExtractCore.requireField "end" node fieldMap cx) (\field_end -> Right (Model.Segment {
+          Model.segmentRelationship = field_relationship,
+          Model.segmentEnd = field_end}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.Segment")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.SpatialReferenceIdentifier
+spatialReferenceIdentifier :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.SpatialReferenceIdentifier
+spatialReferenceIdentifier cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermWrap v0 -> Eithers.map (\b -> Model.SpatialReferenceIdentifier b) ((\raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+        Core.TermLiteral v1 -> case v1 of
+          Core.LiteralInteger v2 -> case v2 of
+            Core.IntegerValueInt32 v3 -> Right v3
+            _ -> Left (Errors.DecodingError "expected int32 value")
+          _ -> Left (Errors.DecodingError "expected int32 literal")
+        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx raw2)) (Core.wrappedTermBody v0))
+      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.Value
+value :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.Value
+value cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermInject v0 ->
+        let field = Core.injectionField v0
+            fname = Core.fieldName field
+            fterm = Core.fieldTerm field
+            variantMap =
+                    Maps.fromList [
+                      (
+                        Core.Name "boolean",
+                        (\input -> Eithers.map (\t -> Model.ValueBoolean t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+                          Core.TermLiteral v1 -> case v1 of
+                            Core.LiteralBoolean v2 -> Right v2
+                            _ -> Left (Errors.DecodingError "expected boolean literal")
+                          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
+                      (
+                        Core.Name "bytes",
+                        (\input -> Eithers.map (\t -> Model.ValueBytes t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+                          Core.TermLiteral v1 -> case v1 of
+                            Core.LiteralBinary v2 -> Right v2
+                            _ -> Left (Errors.DecodingError "expected binary literal")
+                          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
+                      (Core.Name "date", (\input -> Eithers.map (\t -> Model.ValueDate t) (localDate cx input))),
+                      (Core.Name "dateTime", (\input -> Eithers.map (\t -> Model.ValueDateTime t) (zonedDateTime cx input))),
+                      (Core.Name "duration", (\input -> Eithers.map (\t -> Model.ValueDuration t) (isoDuration cx input))),
+                      (
+                        Core.Name "float",
+                        (\input -> Eithers.map (\t -> Model.ValueFloat t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+                          Core.TermLiteral v1 -> case v1 of
+                            Core.LiteralFloat v2 -> case v2 of
+                              Core.FloatValueFloat64 v3 -> Right v3
+                              _ -> Left (Errors.DecodingError "expected float64 value")
+                            _ -> Left (Errors.DecodingError "expected float64 literal")
+                          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
+                      (
+                        Core.Name "integer",
+                        (\input -> Eithers.map (\t -> Model.ValueInteger t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+                          Core.TermLiteral v1 -> case v1 of
+                            Core.LiteralInteger v2 -> case v2 of
+                              Core.IntegerValueInt64 v3 -> Right v3
+                              _ -> Left (Errors.DecodingError "expected int64 value")
+                            _ -> Left (Errors.DecodingError "expected int64 literal")
+                          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
+                      (Core.Name "list", (\input -> Eithers.map (\t -> Model.ValueList t) (ExtractCore.decodeList value cx input))),
+                      (Core.Name "localDateTime", (\input -> Eithers.map (\t -> Model.ValueLocalDateTime t) (localDateTime cx input))),
+                      (Core.Name "localTime", (\input -> Eithers.map (\t -> Model.ValueLocalTime t) (localTime cx input))),
+                      (Core.Name "map", (\input -> Eithers.map (\t -> Model.ValueMap t) (ExtractCore.decodeMap key value cx input))),
+                      (Core.Name "node", (\input -> Eithers.map (\t -> Model.ValueNode t) (node cx input))),
+                      (Core.Name "null", (\input -> Eithers.map (\t -> Model.ValueNull) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "path", (\input -> Eithers.map (\t -> Model.ValuePath t) (path cx input))),
+                      (Core.Name "point", (\input -> Eithers.map (\t -> Model.ValuePoint t) (point cx input))),
+                      (Core.Name "relationship", (\input -> Eithers.map (\t -> Model.ValueRelationship t) (relationship cx input))),
+                      (
+                        Core.Name "string",
+                        (\input -> Eithers.map (\t -> Model.ValueString t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+                          Core.TermLiteral v1 -> case v1 of
+                            Core.LiteralString v2 -> Right v2
+                            _ -> Left (Errors.DecodingError "expected string literal")
+                          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input)))),
+                      (Core.Name "time", (\input -> Eithers.map (\t -> Model.ValueTime t) (offsetTime cx input)))]
+        in (Optionals.cases (Maps.lookup fname variantMap) (Left (Errors.DecodingError (Strings.cat [
+          "no such field ",
+          (Core.unName fname),
+          " in union"]))) (\f -> f fterm))
+      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.ValueType
+valueType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.ValueType
+valueType cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermInject v0 ->
+        let field = Core.injectionField v0
+            fname = Core.fieldName field
+            fterm = Core.fieldTerm field
+            variantMap =
+                    Maps.fromList [
+                      (Core.Name "boolean", (\input -> Eithers.map (\t -> Model.ValueTypeBoolean) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "string", (\input -> Eithers.map (\t -> Model.ValueTypeString) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "integer", (\input -> Eithers.map (\t -> Model.ValueTypeInteger) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "float", (\input -> Eithers.map (\t -> Model.ValueTypeFloat) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "date", (\input -> Eithers.map (\t -> Model.ValueTypeDate) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "localTime", (\input -> Eithers.map (\t -> Model.ValueTypeLocalTime) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "zonedTime", (\input -> Eithers.map (\t -> Model.ValueTypeZonedTime) (ExtractCore.decodeUnit cx input))),
+                      (
+                        Core.Name "localDateTime",
+                        (\input -> Eithers.map (\t -> Model.ValueTypeLocalDateTime) (ExtractCore.decodeUnit cx input))),
+                      (
+                        Core.Name "zonedDateTime",
+                        (\input -> Eithers.map (\t -> Model.ValueTypeZonedDateTime) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "duration", (\input -> Eithers.map (\t -> Model.ValueTypeDuration) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "point", (\input -> Eithers.map (\t -> Model.ValueTypePoint) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "list", (\input -> Eithers.map (\t -> Model.ValueTypeList t) (valueType cx input))),
+                      (Core.Name "vector", (\input -> Eithers.map (\t -> Model.ValueTypeVector t) (vectorType cx input))),
+                      (Core.Name "union", (\input -> Eithers.map (\t -> Model.ValueTypeUnion t) (ExtractCore.decodeList valueType cx input)))]
+        in (Optionals.cases (Maps.lookup fname variantMap) (Left (Errors.DecodingError (Strings.cat [
+          "no such field ",
+          (Core.unName fname),
+          " in union"]))) (\f -> f fterm))
+      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.VectorType
+vectorType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.VectorType
+vectorType cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "element" valueType fieldMap cx) (\field_element -> Eithers.bind (ExtractCore.requireField "dimension" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralInteger v2 -> case v2 of
+              Core.IntegerValueInt32 v3 -> Right v3
+              _ -> Left (Errors.DecodingError "expected int32 value")
+            _ -> Left (Errors.DecodingError "expected int32 literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_dimension -> Right (Model.VectorType {
+          Model.vectorTypeElement = field_element,
+          Model.vectorTypeDimension = field_dimension}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.VectorType")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.ZoneId
+zoneId :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.ZoneId
+zoneId cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermWrap v0 -> Eithers.map (\b -> Model.ZoneId b) ((\raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+        Core.TermLiteral v1 -> case v1 of
+          Core.LiteralString v2 -> Right v2
+          _ -> Left (Errors.DecodingError "expected string literal")
+        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx raw2)) (Core.wrappedTermBody v0))
+      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.ZoneOffset
+zoneOffset :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.ZoneOffset
+zoneOffset cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermWrap v0 -> Eithers.map (\b -> Model.ZoneOffset b) ((\raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+        Core.TermLiteral v1 -> case v1 of
+          Core.LiteralInteger v2 -> case v2 of
+            Core.IntegerValueInt32 v3 -> Right v3
+            _ -> Left (Errors.DecodingError "expected int32 value")
+          _ -> Left (Errors.DecodingError "expected int32 literal")
+        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx raw2)) (Core.wrappedTermBody v0))
+      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.neo4j.model.ZonedDateTime
+zonedDateTime :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.ZonedDateTime
+zonedDateTime cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "dateTime" localDateTime fieldMap cx) (\field_dateTime -> Eithers.bind (ExtractCore.requireField "offset" zoneOffset fieldMap cx) (\field_offset -> Eithers.bind (ExtractCore.requireField "zone" zoneId fieldMap cx) (\field_zone -> Right (Model.ZonedDateTime {
+          Model.zonedDateTimeDateTime = field_dateTime,
+          Model.zonedDateTimeOffset = field_offset,
+          Model.zonedDateTimeZone = field_zone})))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.neo4j.model.ZonedDateTime")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Pg/Mapping.hs b/src/main/haskell/Hydra/Decode/Pg/Mapping.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Decode/Pg/Mapping.hs
@@ -0,0 +1,178 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Term decoders for hydra.pg.mapping
+
+module Hydra.Decode.Pg.Mapping where
+import qualified Hydra.Core as Core
+import qualified Hydra.Decode.Coders as Coders
+import qualified Hydra.Decode.Core as DecodeCore
+import qualified Hydra.Decode.Pg.Model as Model
+import qualified Hydra.Errors as Errors
+import qualified Hydra.Extract.Core as ExtractCore
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Lexical as Lexical
+import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings
+import qualified Hydra.Pg.Mapping as Mapping
+import qualified Hydra.Rewriting as Rewriting
+import qualified Hydra.Util as Util
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Decoder for hydra.pg.mapping.AnnotationSchema
+annotationSchema :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Mapping.AnnotationSchema
+annotationSchema cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "vertexLabel" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_vertexLabel -> Eithers.bind (ExtractCore.requireField "edgeLabel" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_edgeLabel -> Eithers.bind (ExtractCore.requireField "vertexId" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_vertexId -> Eithers.bind (ExtractCore.requireField "edgeId" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_edgeId -> Eithers.bind (ExtractCore.requireField "propertyKey" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_propertyKey -> Eithers.bind (ExtractCore.requireField "propertyValue" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_propertyValue -> Eithers.bind (ExtractCore.requireField "outVertex" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_outVertex -> Eithers.bind (ExtractCore.requireField "outVertexLabel" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_outVertexLabel -> Eithers.bind (ExtractCore.requireField "inVertex" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_inVertex -> Eithers.bind (ExtractCore.requireField "inVertexLabel" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_inVertexLabel -> Eithers.bind (ExtractCore.requireField "outEdge" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_outEdge -> Eithers.bind (ExtractCore.requireField "outEdgeLabel" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_outEdgeLabel -> Eithers.bind (ExtractCore.requireField "inEdge" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_inEdge -> Eithers.bind (ExtractCore.requireField "inEdgeLabel" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_inEdgeLabel -> Eithers.bind (ExtractCore.requireField "ignore" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralString v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected string literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_ignore -> Right (Mapping.AnnotationSchema {
+          Mapping.annotationSchemaVertexLabel = field_vertexLabel,
+          Mapping.annotationSchemaEdgeLabel = field_edgeLabel,
+          Mapping.annotationSchemaVertexId = field_vertexId,
+          Mapping.annotationSchemaEdgeId = field_edgeId,
+          Mapping.annotationSchemaPropertyKey = field_propertyKey,
+          Mapping.annotationSchemaPropertyValue = field_propertyValue,
+          Mapping.annotationSchemaOutVertex = field_outVertex,
+          Mapping.annotationSchemaOutVertexLabel = field_outVertexLabel,
+          Mapping.annotationSchemaInVertex = field_inVertex,
+          Mapping.annotationSchemaInVertexLabel = field_inVertexLabel,
+          Mapping.annotationSchemaOutEdge = field_outEdge,
+          Mapping.annotationSchemaOutEdgeLabel = field_outEdgeLabel,
+          Mapping.annotationSchemaInEdge = field_inEdge,
+          Mapping.annotationSchemaInEdgeLabel = field_inEdgeLabel,
+          Mapping.annotationSchemaIgnore = field_ignore})))))))))))))))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.mapping.AnnotationSchema")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.mapping.EdgeSpec
+edgeSpec :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Mapping.EdgeSpec
+edgeSpec cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "label" Model.edgeLabel fieldMap cx) (\field_label -> Eithers.bind (ExtractCore.requireField "id" valueSpec fieldMap cx) (\field_id -> Eithers.bind (ExtractCore.requireField "out" valueSpec fieldMap cx) (\field_out -> Eithers.bind (ExtractCore.requireField "in" valueSpec fieldMap cx) (\field_in -> Eithers.bind (ExtractCore.requireField "properties" (ExtractCore.decodeList propertySpec) fieldMap cx) (\field_properties -> Right (Mapping.EdgeSpec {
+          Mapping.edgeSpecLabel = field_label,
+          Mapping.edgeSpecId = field_id,
+          Mapping.edgeSpecOut = field_out,
+          Mapping.edgeSpecIn = field_in,
+          Mapping.edgeSpecProperties = field_properties})))))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.mapping.EdgeSpec")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.mapping.ElementSpec
+elementSpec :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Mapping.ElementSpec
+elementSpec cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermInject v0 ->
+        let field = Core.injectionField v0
+            fname = Core.fieldName field
+            fterm = Core.fieldTerm field
+            variantMap =
+                    Maps.fromList [
+                      (Core.Name "vertex", (\input -> Eithers.map (\t -> Mapping.ElementSpecVertex t) (vertexSpec cx input))),
+                      (Core.Name "edge", (\input -> Eithers.map (\t -> Mapping.ElementSpecEdge t) (edgeSpec cx input)))]
+        in (Optionals.cases (Maps.lookup fname variantMap) (Left (Errors.DecodingError (Strings.cat [
+          "no such field ",
+          (Core.unName fname),
+          " in union"]))) (\f -> f fterm))
+      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.mapping.PropertySpec
+propertySpec :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Mapping.PropertySpec
+propertySpec cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "key" Model.propertyKey fieldMap cx) (\field_key -> Eithers.bind (ExtractCore.requireField "value" valueSpec fieldMap cx) (\field_value -> Right (Mapping.PropertySpec {
+          Mapping.propertySpecKey = field_key,
+          Mapping.propertySpecValue = field_value}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.mapping.PropertySpec")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.mapping.ValueSpec
+valueSpec :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Mapping.ValueSpec
+valueSpec cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermInject v0 ->
+        let field = Core.injectionField v0
+            fname = Core.fieldName field
+            fterm = Core.fieldTerm field
+            variantMap =
+                    Maps.fromList [
+                      (Core.Name "value", (\input -> Eithers.map (\t -> Mapping.ValueSpecValue) (ExtractCore.decodeUnit cx input))),
+                      (
+                        Core.Name "pattern",
+                        (\input -> Eithers.map (\t -> Mapping.ValueSpecPattern t) (Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+                          Core.TermLiteral v1 -> case v1 of
+                            Core.LiteralString v2 -> Right v2
+                            _ -> Left (Errors.DecodingError "expected string literal")
+                          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx input))))]
+        in (Optionals.cases (Maps.lookup fname variantMap) (Left (Errors.DecodingError (Strings.cat [
+          "no such field ",
+          (Core.unName fname),
+          " in union"]))) (\f -> f fterm))
+      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.mapping.VertexSpec
+vertexSpec :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Mapping.VertexSpec
+vertexSpec cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "label" Model.vertexLabel fieldMap cx) (\field_label -> Eithers.bind (ExtractCore.requireField "id" valueSpec fieldMap cx) (\field_id -> Eithers.bind (ExtractCore.requireField "properties" (ExtractCore.decodeList propertySpec) fieldMap cx) (\field_properties -> Right (Mapping.VertexSpec {
+          Mapping.vertexSpecLabel = field_label,
+          Mapping.vertexSpecId = field_id,
+          Mapping.vertexSpecProperties = field_properties})))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.mapping.VertexSpec")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Decode/Pg/Model.hs b/src/main/haskell/Hydra/Decode/Pg/Model.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Decode/Pg/Model.hs
@@ -0,0 +1,282 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Term decoders for hydra.pg.model
+
+module Hydra.Decode.Pg.Model where
+import qualified Hydra.Core as Core
+import qualified Hydra.Decode.Core as DecodeCore
+import qualified Hydra.Errors as Errors
+import qualified Hydra.Extract.Core as ExtractCore
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Lexical as Lexical
+import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings
+import qualified Hydra.Pg.Model as Model
+import qualified Hydra.Rewriting as Rewriting
+import qualified Hydra.Util as Util
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Decoder for hydra.pg.model.AdjacentEdge
+adjacentEdge :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError v) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.AdjacentEdge v)
+adjacentEdge v cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "label" edgeLabel fieldMap cx) (\field_label -> Eithers.bind (ExtractCore.requireField "id" v fieldMap cx) (\field_id -> Eithers.bind (ExtractCore.requireField "vertex" v fieldMap cx) (\field_vertex -> Eithers.bind (ExtractCore.requireField "properties" (ExtractCore.decodeMap propertyKey v) fieldMap cx) (\field_properties -> Right (Model.AdjacentEdge {
+          Model.adjacentEdgeLabel = field_label,
+          Model.adjacentEdgeId = field_id,
+          Model.adjacentEdgeVertex = field_vertex,
+          Model.adjacentEdgeProperties = field_properties}))))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.AdjacentEdge")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.Direction
+direction :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.Direction
+direction cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermInject v0 ->
+        let field = Core.injectionField v0
+            fname = Core.fieldName field
+            fterm = Core.fieldTerm field
+            variantMap =
+                    Maps.fromList [
+                      (Core.Name "out", (\input -> Eithers.map (\t -> Model.DirectionOut) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "in", (\input -> Eithers.map (\t -> Model.DirectionIn) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "both", (\input -> Eithers.map (\t -> Model.DirectionBoth) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "undirected", (\input -> Eithers.map (\t -> Model.DirectionUndirected) (ExtractCore.decodeUnit cx input)))]
+        in (Optionals.cases (Maps.lookup fname variantMap) (Left (Errors.DecodingError (Strings.cat [
+          "no such field ",
+          (Core.unName fname),
+          " in union"]))) (\f -> f fterm))
+      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.Edge
+edge :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError v) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.Edge v)
+edge v cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "label" edgeLabel fieldMap cx) (\field_label -> Eithers.bind (ExtractCore.requireField "id" v fieldMap cx) (\field_id -> Eithers.bind (ExtractCore.requireField "out" v fieldMap cx) (\field_out -> Eithers.bind (ExtractCore.requireField "in" v fieldMap cx) (\field_in -> Eithers.bind (ExtractCore.requireField "properties" (ExtractCore.decodeMap propertyKey v) fieldMap cx) (\field_properties -> Right (Model.Edge {
+          Model.edgeLabel = field_label,
+          Model.edgeId = field_id,
+          Model.edgeOut = field_out,
+          Model.edgeIn = field_in,
+          Model.edgeProperties = field_properties})))))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.Edge")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.EdgeLabel
+edgeLabel :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.EdgeLabel
+edgeLabel cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermWrap v0 -> Eithers.map (\b -> Model.EdgeLabel b) ((\raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+        Core.TermLiteral v1 -> case v1 of
+          Core.LiteralString v2 -> Right v2
+          _ -> Left (Errors.DecodingError "expected string literal")
+        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx raw2)) (Core.wrappedTermBody v0))
+      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.EdgeType
+edgeType :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.EdgeType t)
+edgeType t cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "label" edgeLabel fieldMap cx) (\field_label -> Eithers.bind (ExtractCore.requireField "id" t fieldMap cx) (\field_id -> Eithers.bind (ExtractCore.requireField "out" vertexLabel fieldMap cx) (\field_out -> Eithers.bind (ExtractCore.requireField "in" vertexLabel fieldMap cx) (\field_in -> Eithers.bind (ExtractCore.requireField "properties" (ExtractCore.decodeList (propertyType t)) fieldMap cx) (\field_properties -> Right (Model.EdgeType {
+          Model.edgeTypeLabel = field_label,
+          Model.edgeTypeId = field_id,
+          Model.edgeTypeOut = field_out,
+          Model.edgeTypeIn = field_in,
+          Model.edgeTypeProperties = field_properties})))))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.EdgeType")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.Element
+element :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError v) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.Element v)
+element v cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermInject v0 ->
+        let field = Core.injectionField v0
+            fname = Core.fieldName field
+            fterm = Core.fieldTerm field
+            variantMap =
+                    Maps.fromList [
+                      (Core.Name "vertex", (\input -> Eithers.map (\t -> Model.ElementVertex t) (vertex v cx input))),
+                      (Core.Name "edge", (\input -> Eithers.map (\t -> Model.ElementEdge t) (edge v cx input)))]
+        in (Optionals.cases (Maps.lookup fname variantMap) (Left (Errors.DecodingError (Strings.cat [
+          "no such field ",
+          (Core.unName fname),
+          " in union"]))) (\f -> f fterm))
+      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.ElementKind
+elementKind :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.ElementKind
+elementKind cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermInject v0 ->
+        let field = Core.injectionField v0
+            fname = Core.fieldName field
+            fterm = Core.fieldTerm field
+            variantMap =
+                    Maps.fromList [
+                      (Core.Name "vertex", (\input -> Eithers.map (\t -> Model.ElementKindVertex) (ExtractCore.decodeUnit cx input))),
+                      (Core.Name "edge", (\input -> Eithers.map (\t -> Model.ElementKindEdge) (ExtractCore.decodeUnit cx input)))]
+        in (Optionals.cases (Maps.lookup fname variantMap) (Left (Errors.DecodingError (Strings.cat [
+          "no such field ",
+          (Core.unName fname),
+          " in union"]))) (\f -> f fterm))
+      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.ElementTree
+elementTree :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError v) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.ElementTree v)
+elementTree v cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "self" (element v) fieldMap cx) (\field_self -> Eithers.bind (ExtractCore.requireField "dependencies" (ExtractCore.decodeList (elementTree v)) fieldMap cx) (\field_dependencies -> Right (Model.ElementTree {
+          Model.elementTreeSelf = field_self,
+          Model.elementTreeDependencies = field_dependencies}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.ElementTree")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.ElementType
+elementType :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.ElementType t)
+elementType t cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermInject v0 ->
+        let field = Core.injectionField v0
+            fname = Core.fieldName field
+            fterm = Core.fieldTerm field
+            variantMap =
+                    Maps.fromList [
+                      (Core.Name "vertex", (\input -> Eithers.map (\t2 -> Model.ElementTypeVertex t2) (vertexType t cx input))),
+                      (Core.Name "edge", (\input -> Eithers.map (\t2 -> Model.ElementTypeEdge t2) (edgeType t cx input)))]
+        in (Optionals.cases (Maps.lookup fname variantMap) (Left (Errors.DecodingError (Strings.cat [
+          "no such field ",
+          (Core.unName fname),
+          " in union"]))) (\f -> f fterm))
+      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.ElementTypeTree
+elementTypeTree :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.ElementTypeTree t)
+elementTypeTree t cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "self" (elementType t) fieldMap cx) (\field_self -> Eithers.bind (ExtractCore.requireField "dependencies" (ExtractCore.decodeList (elementTypeTree t)) fieldMap cx) (\field_dependencies -> Right (Model.ElementTypeTree {
+          Model.elementTypeTreeSelf = field_self,
+          Model.elementTypeTreeDependencies = field_dependencies}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.ElementTypeTree")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.Graph
+graph :: Ord v => ((Graph.Graph -> Core.Term -> Either Errors.DecodingError v) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.Graph v))
+graph v cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "vertices" (ExtractCore.decodeMap v (vertex v)) fieldMap cx) (\field_vertices -> Eithers.bind (ExtractCore.requireField "edges" (ExtractCore.decodeMap v (edge v)) fieldMap cx) (\field_edges -> Right (Model.Graph {
+          Model.graphVertices = field_vertices,
+          Model.graphEdges = field_edges}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.Graph")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.GraphSchema
+graphSchema :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.GraphSchema t)
+graphSchema t cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "vertices" (ExtractCore.decodeMap vertexLabel (vertexType t)) fieldMap cx) (\field_vertices -> Eithers.bind (ExtractCore.requireField "edges" (ExtractCore.decodeMap edgeLabel (edgeType t)) fieldMap cx) (\field_edges -> Right (Model.GraphSchema {
+          Model.graphSchemaVertices = field_vertices,
+          Model.graphSchemaEdges = field_edges}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.GraphSchema")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.Label
+label :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.Label
+label cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermInject v0 ->
+        let field = Core.injectionField v0
+            fname = Core.fieldName field
+            fterm = Core.fieldTerm field
+            variantMap =
+                    Maps.fromList [
+                      (Core.Name "vertex", (\input -> Eithers.map (\t -> Model.LabelVertex t) (vertexLabel cx input))),
+                      (Core.Name "edge", (\input -> Eithers.map (\t -> Model.LabelEdge t) (edgeLabel cx input)))]
+        in (Optionals.cases (Maps.lookup fname variantMap) (Left (Errors.DecodingError (Strings.cat [
+          "no such field ",
+          (Core.unName fname),
+          " in union"]))) (\f -> f fterm))
+      _ -> Left (Errors.DecodingError "expected union")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.LazyGraph
+lazyGraph :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError v) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.LazyGraph v)
+lazyGraph v cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "vertices" (ExtractCore.decodeList (vertex v)) fieldMap cx) (\field_vertices -> Eithers.bind (ExtractCore.requireField "edges" (ExtractCore.decodeList (edge v)) fieldMap cx) (\field_edges -> Right (Model.LazyGraph {
+          Model.lazyGraphVertices = field_vertices,
+          Model.lazyGraphEdges = field_edges}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.LazyGraph")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.Property
+property :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError v) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.Property v)
+property v cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "key" propertyKey fieldMap cx) (\field_key -> Eithers.bind (ExtractCore.requireField "value" v fieldMap cx) (\field_value -> Right (Model.Property {
+          Model.propertyKey = field_key,
+          Model.propertyValue = field_value}))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.Property")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.PropertyKey
+propertyKey :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.PropertyKey
+propertyKey cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermWrap v0 -> Eithers.map (\b -> Model.PropertyKey b) ((\raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+        Core.TermLiteral v1 -> case v1 of
+          Core.LiteralString v2 -> Right v2
+          _ -> Left (Errors.DecodingError "expected string literal")
+        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx raw2)) (Core.wrappedTermBody v0))
+      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.PropertyType
+propertyType :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.PropertyType t)
+propertyType t cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "key" propertyKey fieldMap cx) (\field_key -> Eithers.bind (ExtractCore.requireField "value" t fieldMap cx) (\field_value -> Eithers.bind (ExtractCore.requireField "required" (\cx2 -> \raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+          Core.TermLiteral v1 -> case v1 of
+            Core.LiteralBoolean v2 -> Right v2
+            _ -> Left (Errors.DecodingError "expected boolean literal")
+          _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx2 raw2)) fieldMap cx) (\field_required -> Right (Model.PropertyType {
+          Model.propertyTypeKey = field_key,
+          Model.propertyTypeValue = field_value,
+          Model.propertyTypeRequired = field_required})))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.PropertyType")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.Vertex
+vertex :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError v) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.Vertex v)
+vertex v cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "label" vertexLabel fieldMap cx) (\field_label -> Eithers.bind (ExtractCore.requireField "id" v fieldMap cx) (\field_id -> Eithers.bind (ExtractCore.requireField "properties" (ExtractCore.decodeMap propertyKey v) fieldMap cx) (\field_properties -> Right (Model.Vertex {
+          Model.vertexLabel = field_label,
+          Model.vertexId = field_id,
+          Model.vertexProperties = field_properties})))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.Vertex")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.VertexLabel
+vertexLabel :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.VertexLabel
+vertexLabel cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermWrap v0 -> Eithers.map (\b -> Model.VertexLabel b) ((\raw2 -> Eithers.either (\err -> Left err) (\stripped2 -> case stripped2 of
+        Core.TermLiteral v1 -> case v1 of
+          Core.LiteralString v2 -> Right v2
+          _ -> Left (Errors.DecodingError "expected string literal")
+        _ -> Left (Errors.DecodingError "expected literal")) (ExtractCore.stripWithDecodingError cx raw2)) (Core.wrappedTermBody v0))
+      _ -> Left (Errors.DecodingError "expected wrapped type")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.VertexType
+vertexType :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.VertexType t)
+vertexType t cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "label" vertexLabel fieldMap cx) (\field_label -> Eithers.bind (ExtractCore.requireField "id" t fieldMap cx) (\field_id -> Eithers.bind (ExtractCore.requireField "properties" (ExtractCore.decodeList (propertyType t)) fieldMap cx) (\field_properties -> Right (Model.VertexType {
+          Model.vertexTypeLabel = field_label,
+          Model.vertexTypeId = field_id,
+          Model.vertexTypeProperties = field_properties})))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.VertexType")) (ExtractCore.stripWithDecodingError cx raw)
+-- | Decoder for hydra.pg.model.VertexWithAdjacentEdges
+vertexWithAdjacentEdges :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError v) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Model.VertexWithAdjacentEdges v)
+vertexWithAdjacentEdges v cx raw =
+    Eithers.either (\err -> Left err) (\stripped -> case stripped of
+      Core.TermRecord v0 ->
+        let fieldMap = ExtractCore.toFieldMap v0
+        in (Eithers.bind (ExtractCore.requireField "vertex" (vertex v) fieldMap cx) (\field_vertex -> Eithers.bind (ExtractCore.requireField "ins" (ExtractCore.decodeList (adjacentEdge v)) fieldMap cx) (\field_ins -> Eithers.bind (ExtractCore.requireField "outs" (ExtractCore.decodeList (adjacentEdge v)) fieldMap cx) (\field_outs -> Right (Model.VertexWithAdjacentEdges {
+          Model.vertexWithAdjacentEdgesVertex = field_vertex,
+          Model.vertexWithAdjacentEdgesIns = field_ins,
+          Model.vertexWithAdjacentEdgesOuts = field_outs})))))
+      _ -> Left (Errors.DecodingError "expected a record of type hydra.pg.model.VertexWithAdjacentEdges")) (ExtractCore.stripWithDecodingError cx raw)
diff --git a/src/main/haskell/Hydra/Demos/Genpg/Transform.hs b/src/main/haskell/Hydra/Demos/Genpg/Transform.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Demos/Genpg/Transform.hs
@@ -0,0 +1,316 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Functions for transforming property graph mappings into property graph elements.
+
+module Hydra.Demos.Genpg.Transform where
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.Extract.Core as ExtractCore
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Json.Model as JsonModel
+import qualified Hydra.Overlay.Haskell.Lib.Chars as Chars
+import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers
+import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Literals as Literals
+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets
+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Pg.Model as PgModel
+import qualified Hydra.Query as Query
+import qualified Hydra.Reduction as Reduction
+import qualified Hydra.Relational as Relational
+import qualified Hydra.Rewriting as Rewriting
+import qualified Hydra.Strip as Strip
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Map as M
+import qualified Data.Set as S
+-- | Concatenate two pairs of lists
+concatPairs :: ([t0], [t1]) -> ([t0], [t1]) -> ([t0], [t1])
+concatPairs acc p = (Lists.concat2 (Pairs.first acc) (Pairs.first p), (Lists.concat2 (Pairs.second acc) (Pairs.second p)))
+-- | Decode a single cell value based on its column type
+decodeCell :: Tabular.ColumnType -> Maybe String -> Either String (Maybe Core.Term)
+decodeCell colType mvalue =
+
+      let cname = Relational.unColumnName (Tabular.columnTypeName colType)
+          typ = Tabular.columnTypeType colType
+          decodeValue =
+                  \value ->
+                    let parseError =
+                            Strings.cat [
+                              "Invalid value for column ",
+                              cname,
+                              ": ",
+                              value]
+                    in case typ of
+                      Core.TypeLiteral v0 -> case v0 of
+                        Core.LiteralTypeBoolean -> Optionals.cases (Literals.readBoolean value) (Left parseError) (\parsed -> Right (Just (Core.TermLiteral (Core.LiteralBoolean parsed))))
+                        Core.LiteralTypeFloat v1 -> case v1 of
+                          Core.FloatTypeFloat32 -> Optionals.cases (Literals.readFloat32 value) (Left parseError) (\parsed -> Right (Just (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 parsed)))))
+                          Core.FloatTypeFloat64 -> Optionals.cases (Literals.readFloat64 value) (Left parseError) (\parsed -> Right (Just (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 parsed)))))
+                          _ -> Left (Strings.cat [
+                            "Unsupported float type for column ",
+                            cname])
+                        Core.LiteralTypeInteger v1 -> case v1 of
+                          Core.IntegerTypeInt32 -> Optionals.cases (Literals.readInt32 value) (Left parseError) (\parsed -> Right (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 parsed)))))
+                          Core.IntegerTypeInt64 -> Optionals.cases (Literals.readInt64 value) (Left parseError) (\parsed -> Right (Just (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 parsed)))))
+                          _ -> Left (Strings.cat [
+                            "Unsupported integer type for column ",
+                            cname])
+                        Core.LiteralTypeString -> Right (Just (Core.TermLiteral (Core.LiteralString value)))
+                        _ -> Left (Strings.cat [
+                          "Unsupported literal type for column ",
+                          cname])
+                      _ -> Left (Strings.cat [
+                        "Unsupported type for column ",
+                        cname])
+      in (Optionals.cases mvalue (Right Nothing) decodeValue)
+-- | Decode a single data row based on column types
+decodeRow :: [Tabular.ColumnType] -> Tabular.DataRow String -> Either String (Tabular.DataRow Core.Term)
+decodeRow colTypes row =
+
+      let cells = Tabular.unDataRow row
+      in (Eithers.map (\decodedCells -> Tabular.DataRow decodedCells) (Eithers.mapList (\pair ->
+        let colType = Pairs.first pair
+            mvalue = Pairs.second pair
+        in (decodeCell colType mvalue)) (Lists.zip colTypes cells)))
+-- | Decode a table of strings into a table of terms based on column type specifications
+decodeTable :: Tabular.TableType -> Tabular.Table String -> Either String (Tabular.Table Core.Term)
+decodeTable tableType table =
+
+      let colTypes = Tabular.tableTypeColumns tableType
+          header = Tabular.tableHeader table
+          rows = Tabular.tableData table
+      in (Eithers.map (\decodedRows -> Tabular.Table {
+        Tabular.tableHeader = header,
+        Tabular.tableData = decodedRows}) (Eithers.mapList (\row -> decodeRow colTypes row) rows))
+-- | Check if an element is an edge
+elementIsEdge :: PgModel.Element t0 -> Bool
+elementIsEdge el =
+    (\x -> case x of
+      PgModel.ElementEdge _ -> True
+      _ -> False) el
+-- | Check if an element is a vertex
+elementIsVertex :: PgModel.Element t0 -> Bool
+elementIsVertex el =
+    (\x -> case x of
+      PgModel.ElementVertex _ -> True
+      _ -> False) el
+-- | Group element specifications by their source table
+elementSpecsByTable :: PgModel.LazyGraph Core.Term -> Either String (M.Map String ([PgModel.Vertex Core.Term], [PgModel.Edge Core.Term]))
+elementSpecsByTable graph =
+
+      let vertices = PgModel.lazyGraphVertices graph
+          edges = PgModel.lazyGraphEdges graph
+      in (Eithers.bind (Eithers.mapList (\v -> Eithers.map (\t -> (t, v)) (tableForVertex v)) vertices) (\vertexPairs -> Eithers.bind (Eithers.mapList (\e -> Eithers.map (\t -> (t, e)) (tableForEdge e)) edges) (\edgePairs ->
+        let addVertex =
+                \m -> \p ->
+                  let table = Pairs.first p
+                      v = Pairs.second p
+                      existing = Maps.lookup table m
+                      current = Optionals.fromOptional ([], []) existing
+                  in (Maps.insert table (Lists.cons v (Pairs.first current), (Pairs.second current)) m)
+            addEdge =
+                    \m -> \p ->
+                      let table = Pairs.first p
+                          e = Pairs.second p
+                          existing = Maps.lookup table m
+                          current = Optionals.fromOptional ([], []) existing
+                      in (Maps.insert table (Pairs.first current, (Lists.cons e (Pairs.second current))) m)
+            vertexMap = Lists.foldl addVertex Maps.empty vertexPairs
+        in (Right (Lists.foldl addEdge vertexMap edgePairs)))))
+-- | Evaluate an edge specification against a record term to produce an optional edge
+evaluateEdge :: t0 -> Graph.Graph -> PgModel.Edge Core.Term -> Core.Term -> Either Errors.Error (Maybe (PgModel.Edge Core.Term))
+evaluateEdge cx g edgeSpec record =
+
+      let label = PgModel.edgeLabel edgeSpec
+          idSpec = PgModel.edgeId edgeSpec
+          outSpec = PgModel.edgeOut edgeSpec
+          inSpec = PgModel.edgeIn edgeSpec
+          propSpecs = PgModel.edgeProperties edgeSpec
+      in (Eithers.bind (Reduction.reduceTerm cx g True (Core.TermApplication (Core.Application {
+        Core.applicationFunction = idSpec,
+        Core.applicationArgument = record}))) (\id -> Eithers.bind (Eithers.bind (Reduction.reduceTerm cx g True (Core.TermApplication (Core.Application {
+        Core.applicationFunction = outSpec,
+        Core.applicationArgument = record}))) (\_term -> ExtractCore.optionalTerm (\t -> Right t) g _term)) (\mOutId -> Eithers.bind (Eithers.bind (Reduction.reduceTerm cx g True (Core.TermApplication (Core.Application {
+        Core.applicationFunction = inSpec,
+        Core.applicationArgument = record}))) (\_term -> ExtractCore.optionalTerm (\t -> Right t) g _term)) (\mInId -> Eithers.bind (evaluateProperties cx g propSpecs record) (\props -> Right (Optionals.bind mOutId (\outId -> Optionals.map (\inId -> PgModel.Edge {
+        PgModel.edgeLabel = label,
+        PgModel.edgeId = id,
+        PgModel.edgeOut = outId,
+        PgModel.edgeIn = inId,
+        PgModel.edgeProperties = props}) mInId)))))))
+-- | Evaluate property specifications against a record term
+evaluateProperties :: Ord t1 => (t0 -> Graph.Graph -> M.Map t1 Core.Term -> Core.Term -> Either Errors.Error (M.Map t1 Core.Term))
+evaluateProperties cx g specs record =
+
+      let extractMaybe =
+              \k -> \term -> case term of
+                Core.TermOptional v0 -> Right (Optionals.map (\v -> (k, v)) v0)
+      in (Eithers.map (\pairs -> Maps.fromList (Optionals.cat pairs)) (Eithers.mapList (\pair ->
+        let k = Pairs.first pair
+            spec = Pairs.second pair
+        in (Eithers.bind (Reduction.reduceTerm cx g True (Core.TermApplication (Core.Application {
+          Core.applicationFunction = spec,
+          Core.applicationArgument = record}))) (\value -> extractMaybe k (Strip.deannotateTerm value)))) (Maps.toList specs)))
+-- | Evaluate a vertex specification against a record term to produce an optional vertex
+evaluateVertex :: t0 -> Graph.Graph -> PgModel.Vertex Core.Term -> Core.Term -> Either Errors.Error (Maybe (PgModel.Vertex Core.Term))
+evaluateVertex cx g vertexSpec record =
+
+      let label = PgModel.vertexLabel vertexSpec
+          idSpec = PgModel.vertexId vertexSpec
+          propSpecs = PgModel.vertexProperties vertexSpec
+      in (Eithers.bind (Eithers.bind (Reduction.reduceTerm cx g True (Core.TermApplication (Core.Application {
+        Core.applicationFunction = idSpec,
+        Core.applicationArgument = record}))) (\_term -> ExtractCore.optionalTerm (\t -> Right t) g _term)) (\mId -> Eithers.bind (evaluateProperties cx g propSpecs record) (\props -> Right (Optionals.map (\id -> PgModel.Vertex {
+        PgModel.vertexLabel = label,
+        PgModel.vertexId = id,
+        PgModel.vertexProperties = props}) mId))))
+-- | Find table names referenced in a term by looking for record projections
+findTablesInTerm :: Core.Term -> S.Set String
+findTablesInTerm term =
+    Rewriting.foldOverTerm Coders.TraversalOrderPre (\names -> \t -> case t of
+      Core.TermProject v0 -> Sets.insert (Core.unName (Core.projectionTypeName v0)) names
+      _ -> names) Sets.empty term
+-- | Find table names referenced in multiple terms
+findTablesInTerms :: [Core.Term] -> S.Set String
+findTablesInTerms terms = Sets.unions (Lists.map findTablesInTerm terms)
+-- | Check if any element in a list satisfies a predicate
+listAny :: (t0 -> Bool) -> [t0] -> Bool
+listAny pred xs = Logic.not (Lists.null (Lists.filter pred xs))
+-- | Construct a LazyGraph from vertices and edges
+makeLazyGraph :: [PgModel.Vertex t0] -> [PgModel.Edge t0] -> PgModel.LazyGraph t0
+makeLazyGraph vertices edges =
+    PgModel.LazyGraph {
+      PgModel.lazyGraphVertices = vertices,
+      PgModel.lazyGraphEdges = edges}
+-- | Normalize a CSV field value - empty becomes Nothing
+normalizeField :: String -> Maybe String
+normalizeField s = Logic.ifElse (Strings.null s) Nothing (Just s)
+-- | Process a single character during CSV parsing
+parseCsvChar :: (([Maybe String], String), Bool) -> Int -> (([Maybe String], String), Bool)
+parseCsvChar state c =
+
+      let acc = Pairs.first (Pairs.first state)
+          field = Pairs.second (Pairs.first state)
+          inQuotes = Pairs.second state
+      in (Logic.ifElse (Equality.equal c 34) (Logic.ifElse inQuotes ((acc, field), False) (Logic.ifElse (Strings.null field) ((acc, field), True) ((acc, (Strings.cat2 field "\"")), inQuotes))) (Logic.ifElse (Logic.and (Equality.equal c 44) (Logic.not inQuotes)) ((Lists.cons (normalizeField field) acc, ""), False) ((acc, (Strings.cat2 field (Strings.fromList [
+        c]))), inQuotes)))
+-- | Parse a CSV line into fields. Empty fields become Nothing.
+parseCsvLine :: String -> Either String [Maybe String]
+parseCsvLine line =
+
+      let chars = Strings.toList line
+          initState = (([], ""), False)
+          finalState = Lists.foldl parseCsvChar initState chars
+          acc = Pairs.first (Pairs.first finalState)
+          field = Pairs.second (Pairs.first finalState)
+          inQuotes = Pairs.second finalState
+      in (Logic.ifElse inQuotes (Left "Unclosed quoted field") (Right (Lists.reverse (Lists.cons (normalizeField field) acc))))
+-- | Parse a single CSV line, returning Nothing for empty lines
+parseSingleLine :: String -> Either String (Maybe [Maybe String])
+parseSingleLine line =
+
+      let trimmed = stripWhitespace line
+      in (Logic.ifElse (Strings.null trimmed) (Right Nothing) (Eithers.map (\x -> Just x) (parseCsvLine trimmed)))
+-- | Parse raw CSV lines into a Table of strings
+parseTableLines :: Bool -> [String] -> Either String (Tabular.Table String)
+parseTableLines hasHeader rawLines =
+    Eithers.bind (Eithers.mapList (\ln -> parseSingleLine ln) rawLines) (\parsedRows ->
+      let rows = Optionals.cat parsedRows
+      in (Logic.ifElse hasHeader (Optionals.cases (Lists.uncons rows) (Left "empty rows: cannot parse header") (\p ->
+        let headerRow = Pairs.first p
+            dataRows = Pairs.second p
+        in (Logic.ifElse (listAny (\m -> Optionals.isNone m) headerRow) (Left "null header column(s)") (Right (Tabular.Table {
+          Tabular.tableHeader = (Just (Tabular.HeaderRow (Optionals.cat headerRow))),
+          Tabular.tableData = (Lists.map (\r -> Tabular.DataRow r) dataRows)}))))) (Right (Tabular.Table {
+        Tabular.tableHeader = Nothing,
+        Tabular.tableData = (Lists.map (\r -> Tabular.DataRow r) rows)}))))
+-- | Strip leading and trailing whitespace from a string
+stripWhitespace :: String -> String
+stripWhitespace s =
+
+      let chars = Strings.toList s
+          isSpaceChar = \c -> Chars.isSpace c
+          trimLeft = Lists.dropWhile isSpaceChar chars
+          trimRight = Lists.reverse (Lists.dropWhile isSpaceChar (Lists.reverse trimLeft))
+      in (Strings.fromList trimRight)
+-- | Get the table name for an edge specification. Returns an error if not exactly one table is referenced.
+tableForEdge :: PgModel.Edge Core.Term -> Either String String
+tableForEdge edge =
+
+      let label = PgModel.edgeLabel edge
+          id = PgModel.edgeId edge
+          outId = PgModel.edgeOut edge
+          inId = PgModel.edgeIn edge
+          props = PgModel.edgeProperties edge
+          tables =
+                  findTablesInTerms (Lists.concat2 [
+                    id,
+                    outId,
+                    inId] (Maps.elems props))
+      in (Logic.ifElse (Equality.equal (Sets.size tables) 1) (Optionals.cases (Lists.maybeHead (Sets.toList tables)) (Left "unreachable: empty tables set") (\x -> Right x)) (Left (Strings.cat [
+        "Specification for ",
+        (PgModel.unEdgeLabel label),
+        " edges has wrong number of tables"])))
+-- | Get the table name for a vertex specification. Returns an error if not exactly one table is referenced.
+tableForVertex :: PgModel.Vertex Core.Term -> Either String String
+tableForVertex vertex =
+
+      let label = PgModel.vertexLabel vertex
+          id = PgModel.vertexId vertex
+          props = PgModel.vertexProperties vertex
+          tables = findTablesInTerms (Lists.cons id (Maps.elems props))
+      in (Logic.ifElse (Equality.equal (Sets.size tables) 1) (Optionals.cases (Lists.maybeHead (Sets.toList tables)) (Left "unreachable: empty tables set") (\x -> Right x)) (Left (Strings.cat [
+        "Specification for ",
+        (PgModel.unVertexLabel label),
+        " vertices has wrong number of tables"])))
+-- | Build a map from table name to table type
+tableTypesByName :: [Tabular.TableType] -> M.Map Relational.RelationName Tabular.TableType
+tableTypesByName tableTypes = Maps.fromList (Lists.map (\t -> (Tabular.tableTypeName t, t)) tableTypes)
+-- | Convert a data row to a record term given a table type
+termRowToRecord :: Tabular.TableType -> Tabular.DataRow Core.Term -> Core.Term
+termRowToRecord tableType row =
+
+      let tname = Relational.unRelationName (Tabular.tableTypeName tableType)
+          colTypes = Tabular.tableTypeColumns tableType
+          cells = Tabular.unDataRow row
+      in (Core.TermRecord (Core.Record {
+        Core.recordTypeName = (Core.Name tname),
+        Core.recordFields = (Lists.zipWith (\colType -> \mvalue ->
+          let cname = Relational.unColumnName (Tabular.columnTypeName colType)
+          in Core.Field {
+            Core.fieldName = (Core.Name cname),
+            Core.fieldTerm = (Core.TermOptional mvalue)}) colTypes cells)}))
+-- | Transform a record through vertex and edge specifications to produce vertices and edges
+transformRecord :: t0 -> Graph.Graph -> [PgModel.Vertex Core.Term] -> [PgModel.Edge Core.Term] -> Core.Term -> Either Errors.Error ([PgModel.Vertex Core.Term], [PgModel.Edge Core.Term])
+transformRecord cx g vspecs especs record =
+    Eithers.bind (Eithers.mapList (\spec -> evaluateVertex cx g spec record) vspecs) (\mVertices -> Eithers.bind (Eithers.mapList (\spec -> evaluateEdge cx g spec record) especs) (\mEdges -> Right (Optionals.cat mVertices, (Optionals.cat mEdges))))
+-- | Transform all rows from a table through vertex/edge specifications
+transformTableRows :: t0 -> Graph.Graph -> [PgModel.Vertex Core.Term] -> [PgModel.Edge Core.Term] -> Tabular.TableType -> [Tabular.DataRow Core.Term] -> Either Errors.Error ([PgModel.Vertex Core.Term], [PgModel.Edge Core.Term])
+transformTableRows cx g vspecs especs tableType rows =
+    Eithers.map (\pairs -> Lists.foldl concatPairs ([], []) pairs) (Eithers.mapList (\row -> transformRecord cx g vspecs especs (termRowToRecord tableType row)) rows)
diff --git a/src/main/haskell/Hydra/Dsl/Pg/Model.hs b/src/main/haskell/Hydra/Dsl/Pg/Model.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Dsl/Pg/Model.hs
@@ -0,0 +1,1597 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | DSL functions for hydra.pg.model
+
+module Hydra.Dsl.Pg.Model where
+import qualified Hydra.Core as Core
+import qualified Hydra.Dsl.Core as DslCore
+import qualified Hydra.Pg.Model as Model
+import qualified Hydra.Typed as Typed
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Map as M
+-- | DSL constructor for hydra.pg.model.AdjacentEdge
+adjacentEdge :: Typed.TypedTerm Model.EdgeLabel -> Typed.TypedTerm v -> Typed.TypedTerm v -> Typed.TypedTerm (M.Map Model.PropertyKey v) -> Typed.TypedTerm (Model.AdjacentEdge v)
+adjacentEdge label id vertex properties =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Typed.unTypedTerm label)},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Typed.unTypedTerm id)},
+        Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (Typed.unTypedTerm vertex)},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Typed.unTypedTerm properties)}]}))
+-- | DSL accessor for the id field of hydra.pg.model.AdjacentEdge
+adjacentEdgeId :: Typed.TypedTerm (Model.AdjacentEdge v) -> Typed.TypedTerm v
+adjacentEdgeId x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+        Core.projectionFieldName = (Core.Name "id")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the label field of hydra.pg.model.AdjacentEdge
+adjacentEdgeLabel :: Typed.TypedTerm (Model.AdjacentEdge v) -> Typed.TypedTerm Model.EdgeLabel
+adjacentEdgeLabel x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+        Core.projectionFieldName = (Core.Name "label")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the properties field of hydra.pg.model.AdjacentEdge
+adjacentEdgeProperties :: Typed.TypedTerm (Model.AdjacentEdge v) -> Typed.TypedTerm (M.Map Model.PropertyKey v)
+adjacentEdgeProperties x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+        Core.projectionFieldName = (Core.Name "properties")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the vertex field of hydra.pg.model.AdjacentEdge
+adjacentEdgeVertex :: Typed.TypedTerm (Model.AdjacentEdge v) -> Typed.TypedTerm v
+adjacentEdgeVertex x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+        Core.projectionFieldName = (Core.Name "vertex")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL updater for the id field of hydra.pg.model.AdjacentEdge
+adjacentEdgeWithId :: Typed.TypedTerm (Model.AdjacentEdge v) -> Typed.TypedTerm v -> Typed.TypedTerm (Model.AdjacentEdge v)
+adjacentEdgeWithId original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+              Core.projectionFieldName = (Core.Name "vertex")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the label field of hydra.pg.model.AdjacentEdge
+adjacentEdgeWithLabel :: Typed.TypedTerm (Model.AdjacentEdge v) -> Typed.TypedTerm Model.EdgeLabel -> Typed.TypedTerm (Model.AdjacentEdge v)
+adjacentEdgeWithLabel original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+              Core.projectionFieldName = (Core.Name "vertex")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the properties field of hydra.pg.model.AdjacentEdge
+adjacentEdgeWithProperties :: Typed.TypedTerm (Model.AdjacentEdge v) -> Typed.TypedTerm (M.Map Model.PropertyKey v) -> Typed.TypedTerm (Model.AdjacentEdge v)
+adjacentEdgeWithProperties original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+              Core.projectionFieldName = (Core.Name "vertex")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
+-- | DSL updater for the vertex field of hydra.pg.model.AdjacentEdge
+adjacentEdgeWithVertex :: Typed.TypedTerm (Model.AdjacentEdge v) -> Typed.TypedTerm v -> Typed.TypedTerm (Model.AdjacentEdge v)
+adjacentEdgeWithVertex original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL injection for the both variant of hydra.pg.model.Direction
+directionBoth :: Typed.TypedTerm Model.Direction
+directionBoth =
+    Typed.TypedTerm (Core.TermInject (Core.Injection {
+      Core.injectionTypeName = (Core.Name "hydra.pg.model.Direction"),
+      Core.injectionField = Core.Field {
+        Core.fieldName = (Core.Name "both"),
+        Core.fieldTerm = Core.TermUnit}}))
+-- | DSL injection for the in variant of hydra.pg.model.Direction
+directionIn :: Typed.TypedTerm Model.Direction
+directionIn =
+    Typed.TypedTerm (Core.TermInject (Core.Injection {
+      Core.injectionTypeName = (Core.Name "hydra.pg.model.Direction"),
+      Core.injectionField = Core.Field {
+        Core.fieldName = (Core.Name "in"),
+        Core.fieldTerm = Core.TermUnit}}))
+-- | DSL injection for the out variant of hydra.pg.model.Direction
+directionOut :: Typed.TypedTerm Model.Direction
+directionOut =
+    Typed.TypedTerm (Core.TermInject (Core.Injection {
+      Core.injectionTypeName = (Core.Name "hydra.pg.model.Direction"),
+      Core.injectionField = Core.Field {
+        Core.fieldName = (Core.Name "out"),
+        Core.fieldTerm = Core.TermUnit}}))
+-- | DSL injection for the undirected variant of hydra.pg.model.Direction
+directionUndirected :: Typed.TypedTerm Model.Direction
+directionUndirected =
+    Typed.TypedTerm (Core.TermInject (Core.Injection {
+      Core.injectionTypeName = (Core.Name "hydra.pg.model.Direction"),
+      Core.injectionField = Core.Field {
+        Core.fieldName = (Core.Name "undirected"),
+        Core.fieldTerm = Core.TermUnit}}))
+-- | DSL constructor for hydra.pg.model.Edge
+edge :: Typed.TypedTerm Model.EdgeLabel -> Typed.TypedTerm v -> Typed.TypedTerm v -> Typed.TypedTerm v -> Typed.TypedTerm (M.Map Model.PropertyKey v) -> Typed.TypedTerm (Model.Edge v)
+edge label id out in_ properties =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Edge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Typed.unTypedTerm label)},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Typed.unTypedTerm id)},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (Typed.unTypedTerm out)},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (Typed.unTypedTerm in_)},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Typed.unTypedTerm properties)}]}))
+-- | DSL accessor for the id field of hydra.pg.model.Edge
+edgeId :: Typed.TypedTerm (Model.Edge v) -> Typed.TypedTerm v
+edgeId x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+        Core.projectionFieldName = (Core.Name "id")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the in field of hydra.pg.model.Edge
+edgeIn :: Typed.TypedTerm (Model.Edge v) -> Typed.TypedTerm v
+edgeIn x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+        Core.projectionFieldName = (Core.Name "in")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the label field of hydra.pg.model.Edge
+edgeLabel :: Typed.TypedTerm (Model.Edge v) -> Typed.TypedTerm Model.EdgeLabel
+edgeLabel x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+        Core.projectionFieldName = (Core.Name "label")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL constructor for the hydra.pg.model.EdgeLabel wrapper
+edgeLabel2 :: Typed.TypedTerm String -> Typed.TypedTerm Model.EdgeLabel
+edgeLabel2 x =
+    Typed.TypedTerm (Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.pg.model.EdgeLabel"),
+      Core.wrappedTermBody = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the out field of hydra.pg.model.Edge
+edgeOut :: Typed.TypedTerm (Model.Edge v) -> Typed.TypedTerm v
+edgeOut x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+        Core.projectionFieldName = (Core.Name "out")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the properties field of hydra.pg.model.Edge
+edgeProperties :: Typed.TypedTerm (Model.Edge v) -> Typed.TypedTerm (M.Map Model.PropertyKey v)
+edgeProperties x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+        Core.projectionFieldName = (Core.Name "properties")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL constructor for hydra.pg.model.EdgeType
+edgeType :: Typed.TypedTerm Model.EdgeLabel -> Typed.TypedTerm t -> Typed.TypedTerm Model.VertexLabel -> Typed.TypedTerm Model.VertexLabel -> Typed.TypedTerm [Model.PropertyType t] -> Typed.TypedTerm (Model.EdgeType t)
+edgeType label id out in_ properties =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Typed.unTypedTerm label)},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Typed.unTypedTerm id)},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (Typed.unTypedTerm out)},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (Typed.unTypedTerm in_)},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Typed.unTypedTerm properties)}]}))
+-- | DSL accessor for the id field of hydra.pg.model.EdgeType
+edgeTypeId :: Typed.TypedTerm (Model.EdgeType t) -> Typed.TypedTerm t
+edgeTypeId x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+        Core.projectionFieldName = (Core.Name "id")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the in field of hydra.pg.model.EdgeType
+edgeTypeIn :: Typed.TypedTerm (Model.EdgeType t) -> Typed.TypedTerm Model.VertexLabel
+edgeTypeIn x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+        Core.projectionFieldName = (Core.Name "in")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the label field of hydra.pg.model.EdgeType
+edgeTypeLabel :: Typed.TypedTerm (Model.EdgeType t) -> Typed.TypedTerm Model.EdgeLabel
+edgeTypeLabel x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+        Core.projectionFieldName = (Core.Name "label")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the out field of hydra.pg.model.EdgeType
+edgeTypeOut :: Typed.TypedTerm (Model.EdgeType t) -> Typed.TypedTerm Model.VertexLabel
+edgeTypeOut x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+        Core.projectionFieldName = (Core.Name "out")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the properties field of hydra.pg.model.EdgeType
+edgeTypeProperties :: Typed.TypedTerm (Model.EdgeType t) -> Typed.TypedTerm [Model.PropertyType t]
+edgeTypeProperties x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+        Core.projectionFieldName = (Core.Name "properties")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL updater for the id field of hydra.pg.model.EdgeType
+edgeTypeWithId :: Typed.TypedTerm (Model.EdgeType t) -> Typed.TypedTerm t -> Typed.TypedTerm (Model.EdgeType t)
+edgeTypeWithId original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "out")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "in")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the in field of hydra.pg.model.EdgeType
+edgeTypeWithIn :: Typed.TypedTerm (Model.EdgeType t) -> Typed.TypedTerm Model.VertexLabel -> Typed.TypedTerm (Model.EdgeType t)
+edgeTypeWithIn original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "out")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the label field of hydra.pg.model.EdgeType
+edgeTypeWithLabel :: Typed.TypedTerm (Model.EdgeType t) -> Typed.TypedTerm Model.EdgeLabel -> Typed.TypedTerm (Model.EdgeType t)
+edgeTypeWithLabel original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "out")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "in")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the out field of hydra.pg.model.EdgeType
+edgeTypeWithOut :: Typed.TypedTerm (Model.EdgeType t) -> Typed.TypedTerm Model.VertexLabel -> Typed.TypedTerm (Model.EdgeType t)
+edgeTypeWithOut original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "in")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the properties field of hydra.pg.model.EdgeType
+edgeTypeWithProperties :: Typed.TypedTerm (Model.EdgeType t) -> Typed.TypedTerm [Model.PropertyType t] -> Typed.TypedTerm (Model.EdgeType t)
+edgeTypeWithProperties original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "out")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+              Core.projectionFieldName = (Core.Name "in")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
+-- | DSL updater for the id field of hydra.pg.model.Edge
+edgeWithId :: Typed.TypedTerm (Model.Edge v) -> Typed.TypedTerm v -> Typed.TypedTerm (Model.Edge v)
+edgeWithId original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Edge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "out")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "in")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the in field of hydra.pg.model.Edge
+edgeWithIn :: Typed.TypedTerm (Model.Edge v) -> Typed.TypedTerm v -> Typed.TypedTerm (Model.Edge v)
+edgeWithIn original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Edge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "out")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the label field of hydra.pg.model.Edge
+edgeWithLabel :: Typed.TypedTerm (Model.Edge v) -> Typed.TypedTerm Model.EdgeLabel -> Typed.TypedTerm (Model.Edge v)
+edgeWithLabel original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Edge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "out")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "in")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the out field of hydra.pg.model.Edge
+edgeWithOut :: Typed.TypedTerm (Model.Edge v) -> Typed.TypedTerm v -> Typed.TypedTerm (Model.Edge v)
+edgeWithOut original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Edge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "in")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the properties field of hydra.pg.model.Edge
+edgeWithProperties :: Typed.TypedTerm (Model.Edge v) -> Typed.TypedTerm (M.Map Model.PropertyKey v) -> Typed.TypedTerm (Model.Edge v)
+edgeWithProperties original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Edge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "out")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Edge"),
+              Core.projectionFieldName = (Core.Name "in")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
+-- | DSL injection for the edge variant of hydra.pg.model.Element
+elementEdge :: Typed.TypedTerm (Model.Edge v) -> Typed.TypedTerm (Model.Element v)
+elementEdge x =
+    Typed.TypedTerm (Core.TermInject (Core.Injection {
+      Core.injectionTypeName = (Core.Name "hydra.pg.model.Element"),
+      Core.injectionField = Core.Field {
+        Core.fieldName = (Core.Name "edge"),
+        Core.fieldTerm = (Typed.unTypedTerm x)}}))
+-- | DSL injection for the edge variant of hydra.pg.model.ElementKind
+elementKindEdge :: Typed.TypedTerm Model.ElementKind
+elementKindEdge =
+    Typed.TypedTerm (Core.TermInject (Core.Injection {
+      Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementKind"),
+      Core.injectionField = Core.Field {
+        Core.fieldName = (Core.Name "edge"),
+        Core.fieldTerm = Core.TermUnit}}))
+-- | DSL injection for the vertex variant of hydra.pg.model.ElementKind
+elementKindVertex :: Typed.TypedTerm Model.ElementKind
+elementKindVertex =
+    Typed.TypedTerm (Core.TermInject (Core.Injection {
+      Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementKind"),
+      Core.injectionField = Core.Field {
+        Core.fieldName = (Core.Name "vertex"),
+        Core.fieldTerm = Core.TermUnit}}))
+-- | DSL constructor for hydra.pg.model.ElementTree
+elementTree :: Typed.TypedTerm (Model.Element v) -> Typed.TypedTerm [Model.ElementTree v] -> Typed.TypedTerm (Model.ElementTree v)
+elementTree self dependencies =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTree"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "self"),
+          Core.fieldTerm = (Typed.unTypedTerm self)},
+        Core.Field {
+          Core.fieldName = (Core.Name "dependencies"),
+          Core.fieldTerm = (Typed.unTypedTerm dependencies)}]}))
+-- | DSL accessor for the dependencies field of hydra.pg.model.ElementTree
+elementTreeDependencies :: Typed.TypedTerm (Model.ElementTree v) -> Typed.TypedTerm [Model.ElementTree v]
+elementTreeDependencies x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTree"),
+        Core.projectionFieldName = (Core.Name "dependencies")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the self field of hydra.pg.model.ElementTree
+elementTreeSelf :: Typed.TypedTerm (Model.ElementTree v) -> Typed.TypedTerm (Model.Element v)
+elementTreeSelf x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTree"),
+        Core.projectionFieldName = (Core.Name "self")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL updater for the dependencies field of hydra.pg.model.ElementTree
+elementTreeWithDependencies :: Typed.TypedTerm (Model.ElementTree v) -> Typed.TypedTerm [Model.ElementTree v] -> Typed.TypedTerm (Model.ElementTree v)
+elementTreeWithDependencies original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTree"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "self"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTree"),
+              Core.projectionFieldName = (Core.Name "self")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "dependencies"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
+-- | DSL updater for the self field of hydra.pg.model.ElementTree
+elementTreeWithSelf :: Typed.TypedTerm (Model.ElementTree v) -> Typed.TypedTerm (Model.Element v) -> Typed.TypedTerm (Model.ElementTree v)
+elementTreeWithSelf original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTree"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "self"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "dependencies"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTree"),
+              Core.projectionFieldName = (Core.Name "dependencies")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL injection for the edge variant of hydra.pg.model.ElementType
+elementTypeEdge :: Typed.TypedTerm (Model.EdgeType t) -> Typed.TypedTerm (Model.ElementType t)
+elementTypeEdge x =
+    Typed.TypedTerm (Core.TermInject (Core.Injection {
+      Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementType"),
+      Core.injectionField = Core.Field {
+        Core.fieldName = (Core.Name "edge"),
+        Core.fieldTerm = (Typed.unTypedTerm x)}}))
+-- | DSL constructor for hydra.pg.model.ElementTypeTree
+elementTypeTree :: Typed.TypedTerm (Model.ElementType t) -> Typed.TypedTerm [Model.ElementTypeTree t] -> Typed.TypedTerm (Model.ElementTypeTree t)
+elementTypeTree self dependencies =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "self"),
+          Core.fieldTerm = (Typed.unTypedTerm self)},
+        Core.Field {
+          Core.fieldName = (Core.Name "dependencies"),
+          Core.fieldTerm = (Typed.unTypedTerm dependencies)}]}))
+-- | DSL accessor for the dependencies field of hydra.pg.model.ElementTypeTree
+elementTypeTreeDependencies :: Typed.TypedTerm (Model.ElementTypeTree t) -> Typed.TypedTerm [Model.ElementTypeTree t]
+elementTypeTreeDependencies x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
+        Core.projectionFieldName = (Core.Name "dependencies")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the self field of hydra.pg.model.ElementTypeTree
+elementTypeTreeSelf :: Typed.TypedTerm (Model.ElementTypeTree t) -> Typed.TypedTerm (Model.ElementType t)
+elementTypeTreeSelf x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
+        Core.projectionFieldName = (Core.Name "self")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL updater for the dependencies field of hydra.pg.model.ElementTypeTree
+elementTypeTreeWithDependencies :: Typed.TypedTerm (Model.ElementTypeTree t) -> Typed.TypedTerm [Model.ElementTypeTree t] -> Typed.TypedTerm (Model.ElementTypeTree t)
+elementTypeTreeWithDependencies original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "self"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
+              Core.projectionFieldName = (Core.Name "self")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "dependencies"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
+-- | DSL updater for the self field of hydra.pg.model.ElementTypeTree
+elementTypeTreeWithSelf :: Typed.TypedTerm (Model.ElementTypeTree t) -> Typed.TypedTerm (Model.ElementType t) -> Typed.TypedTerm (Model.ElementTypeTree t)
+elementTypeTreeWithSelf original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "self"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "dependencies"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
+              Core.projectionFieldName = (Core.Name "dependencies")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL injection for the vertex variant of hydra.pg.model.ElementType
+elementTypeVertex :: Typed.TypedTerm (Model.VertexType t) -> Typed.TypedTerm (Model.ElementType t)
+elementTypeVertex x =
+    Typed.TypedTerm (Core.TermInject (Core.Injection {
+      Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementType"),
+      Core.injectionField = Core.Field {
+        Core.fieldName = (Core.Name "vertex"),
+        Core.fieldTerm = (Typed.unTypedTerm x)}}))
+-- | DSL injection for the vertex variant of hydra.pg.model.Element
+elementVertex :: Typed.TypedTerm (Model.Vertex v) -> Typed.TypedTerm (Model.Element v)
+elementVertex x =
+    Typed.TypedTerm (Core.TermInject (Core.Injection {
+      Core.injectionTypeName = (Core.Name "hydra.pg.model.Element"),
+      Core.injectionField = Core.Field {
+        Core.fieldName = (Core.Name "vertex"),
+        Core.fieldTerm = (Typed.unTypedTerm x)}}))
+-- | DSL constructor for hydra.pg.model.Graph
+graph :: Ord v => (Typed.TypedTerm (M.Map v (Model.Vertex v)) -> Typed.TypedTerm (M.Map v (Model.Edge v)) -> Typed.TypedTerm (Model.Graph v))
+graph vertices edges =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Graph"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertices"),
+          Core.fieldTerm = (Typed.unTypedTerm vertices)},
+        Core.Field {
+          Core.fieldName = (Core.Name "edges"),
+          Core.fieldTerm = (Typed.unTypedTerm edges)}]}))
+-- | DSL accessor for the edges field of hydra.pg.model.Graph
+graphEdges :: Ord v => (Typed.TypedTerm (Model.Graph v) -> Typed.TypedTerm (M.Map v (Model.Edge v)))
+graphEdges x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.Graph"),
+        Core.projectionFieldName = (Core.Name "edges")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL constructor for hydra.pg.model.GraphSchema
+graphSchema :: Typed.TypedTerm (M.Map Model.VertexLabel (Model.VertexType t)) -> Typed.TypedTerm (M.Map Model.EdgeLabel (Model.EdgeType t)) -> Typed.TypedTerm (Model.GraphSchema t)
+graphSchema vertices edges =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertices"),
+          Core.fieldTerm = (Typed.unTypedTerm vertices)},
+        Core.Field {
+          Core.fieldName = (Core.Name "edges"),
+          Core.fieldTerm = (Typed.unTypedTerm edges)}]}))
+-- | DSL accessor for the edges field of hydra.pg.model.GraphSchema
+graphSchemaEdges :: Typed.TypedTerm (Model.GraphSchema t) -> Typed.TypedTerm (M.Map Model.EdgeLabel (Model.EdgeType t))
+graphSchemaEdges x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
+        Core.projectionFieldName = (Core.Name "edges")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the vertices field of hydra.pg.model.GraphSchema
+graphSchemaVertices :: Typed.TypedTerm (Model.GraphSchema t) -> Typed.TypedTerm (M.Map Model.VertexLabel (Model.VertexType t))
+graphSchemaVertices x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
+        Core.projectionFieldName = (Core.Name "vertices")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL updater for the edges field of hydra.pg.model.GraphSchema
+graphSchemaWithEdges :: Typed.TypedTerm (Model.GraphSchema t) -> Typed.TypedTerm (M.Map Model.EdgeLabel (Model.EdgeType t)) -> Typed.TypedTerm (Model.GraphSchema t)
+graphSchemaWithEdges original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertices"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
+              Core.projectionFieldName = (Core.Name "vertices")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "edges"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
+-- | DSL updater for the vertices field of hydra.pg.model.GraphSchema
+graphSchemaWithVertices :: Typed.TypedTerm (Model.GraphSchema t) -> Typed.TypedTerm (M.Map Model.VertexLabel (Model.VertexType t)) -> Typed.TypedTerm (Model.GraphSchema t)
+graphSchemaWithVertices original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertices"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "edges"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
+              Core.projectionFieldName = (Core.Name "edges")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL accessor for the vertices field of hydra.pg.model.Graph
+graphVertices :: Ord v => (Typed.TypedTerm (Model.Graph v) -> Typed.TypedTerm (M.Map v (Model.Vertex v)))
+graphVertices x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.Graph"),
+        Core.projectionFieldName = (Core.Name "vertices")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL updater for the edges field of hydra.pg.model.Graph
+graphWithEdges :: Ord v => (Typed.TypedTerm (Model.Graph v) -> Typed.TypedTerm (M.Map v (Model.Edge v)) -> Typed.TypedTerm (Model.Graph v))
+graphWithEdges original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Graph"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertices"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Graph"),
+              Core.projectionFieldName = (Core.Name "vertices")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "edges"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
+-- | DSL updater for the vertices field of hydra.pg.model.Graph
+graphWithVertices :: Ord v => (Typed.TypedTerm (Model.Graph v) -> Typed.TypedTerm (M.Map v (Model.Vertex v)) -> Typed.TypedTerm (Model.Graph v))
+graphWithVertices original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Graph"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertices"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "edges"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Graph"),
+              Core.projectionFieldName = (Core.Name "edges")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL injection for the edge variant of hydra.pg.model.Label
+labelEdge :: Typed.TypedTerm Model.EdgeLabel -> Typed.TypedTerm Model.Label
+labelEdge x =
+    Typed.TypedTerm (Core.TermInject (Core.Injection {
+      Core.injectionTypeName = (Core.Name "hydra.pg.model.Label"),
+      Core.injectionField = Core.Field {
+        Core.fieldName = (Core.Name "edge"),
+        Core.fieldTerm = (Typed.unTypedTerm x)}}))
+-- | DSL injection for the vertex variant of hydra.pg.model.Label
+labelVertex :: Typed.TypedTerm Model.VertexLabel -> Typed.TypedTerm Model.Label
+labelVertex x =
+    Typed.TypedTerm (Core.TermInject (Core.Injection {
+      Core.injectionTypeName = (Core.Name "hydra.pg.model.Label"),
+      Core.injectionField = Core.Field {
+        Core.fieldName = (Core.Name "vertex"),
+        Core.fieldTerm = (Typed.unTypedTerm x)}}))
+-- | DSL constructor for hydra.pg.model.LazyGraph
+lazyGraph :: Typed.TypedTerm [Model.Vertex v] -> Typed.TypedTerm [Model.Edge v] -> Typed.TypedTerm (Model.LazyGraph v)
+lazyGraph vertices edges =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertices"),
+          Core.fieldTerm = (Typed.unTypedTerm vertices)},
+        Core.Field {
+          Core.fieldName = (Core.Name "edges"),
+          Core.fieldTerm = (Typed.unTypedTerm edges)}]}))
+-- | DSL accessor for the edges field of hydra.pg.model.LazyGraph
+lazyGraphEdges :: Typed.TypedTerm (Model.LazyGraph v) -> Typed.TypedTerm [Model.Edge v]
+lazyGraphEdges x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
+        Core.projectionFieldName = (Core.Name "edges")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the vertices field of hydra.pg.model.LazyGraph
+lazyGraphVertices :: Typed.TypedTerm (Model.LazyGraph v) -> Typed.TypedTerm [Model.Vertex v]
+lazyGraphVertices x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
+        Core.projectionFieldName = (Core.Name "vertices")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL updater for the edges field of hydra.pg.model.LazyGraph
+lazyGraphWithEdges :: Typed.TypedTerm (Model.LazyGraph v) -> Typed.TypedTerm [Model.Edge v] -> Typed.TypedTerm (Model.LazyGraph v)
+lazyGraphWithEdges original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertices"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
+              Core.projectionFieldName = (Core.Name "vertices")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "edges"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
+-- | DSL updater for the vertices field of hydra.pg.model.LazyGraph
+lazyGraphWithVertices :: Typed.TypedTerm (Model.LazyGraph v) -> Typed.TypedTerm [Model.Vertex v] -> Typed.TypedTerm (Model.LazyGraph v)
+lazyGraphWithVertices original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertices"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "edges"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
+              Core.projectionFieldName = (Core.Name "edges")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL constructor for hydra.pg.model.Property
+property :: Typed.TypedTerm Model.PropertyKey -> Typed.TypedTerm v -> Typed.TypedTerm (Model.Property v)
+property key value =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Property"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "key"),
+          Core.fieldTerm = (Typed.unTypedTerm key)},
+        Core.Field {
+          Core.fieldName = (Core.Name "value"),
+          Core.fieldTerm = (Typed.unTypedTerm value)}]}))
+-- | DSL accessor for the key field of hydra.pg.model.Property
+propertyKey :: Typed.TypedTerm (Model.Property v) -> Typed.TypedTerm Model.PropertyKey
+propertyKey x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.Property"),
+        Core.projectionFieldName = (Core.Name "key")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL constructor for the hydra.pg.model.PropertyKey wrapper
+propertyKey2 :: Typed.TypedTerm String -> Typed.TypedTerm Model.PropertyKey
+propertyKey2 x =
+    Typed.TypedTerm (Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.pg.model.PropertyKey"),
+      Core.wrappedTermBody = (Typed.unTypedTerm x)}))
+-- | DSL constructor for hydra.pg.model.PropertyType
+propertyType :: Typed.TypedTerm Model.PropertyKey -> Typed.TypedTerm t -> Typed.TypedTerm Bool -> Typed.TypedTerm (Model.PropertyType t)
+propertyType key value required =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "key"),
+          Core.fieldTerm = (Typed.unTypedTerm key)},
+        Core.Field {
+          Core.fieldName = (Core.Name "value"),
+          Core.fieldTerm = (Typed.unTypedTerm value)},
+        Core.Field {
+          Core.fieldName = (Core.Name "required"),
+          Core.fieldTerm = (Typed.unTypedTerm required)}]}))
+-- | DSL accessor for the key field of hydra.pg.model.PropertyType
+propertyTypeKey :: Typed.TypedTerm (Model.PropertyType t) -> Typed.TypedTerm Model.PropertyKey
+propertyTypeKey x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+        Core.projectionFieldName = (Core.Name "key")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the required field of hydra.pg.model.PropertyType
+propertyTypeRequired :: Typed.TypedTerm (Model.PropertyType t) -> Typed.TypedTerm Bool
+propertyTypeRequired x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+        Core.projectionFieldName = (Core.Name "required")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the value field of hydra.pg.model.PropertyType
+propertyTypeValue :: Typed.TypedTerm (Model.PropertyType t) -> Typed.TypedTerm t
+propertyTypeValue x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+        Core.projectionFieldName = (Core.Name "value")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL updater for the key field of hydra.pg.model.PropertyType
+propertyTypeWithKey :: Typed.TypedTerm (Model.PropertyType t) -> Typed.TypedTerm Model.PropertyKey -> Typed.TypedTerm (Model.PropertyType t)
+propertyTypeWithKey original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "key"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "value"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+              Core.projectionFieldName = (Core.Name "value")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "required"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+              Core.projectionFieldName = (Core.Name "required")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the required field of hydra.pg.model.PropertyType
+propertyTypeWithRequired :: Typed.TypedTerm (Model.PropertyType t) -> Typed.TypedTerm Bool -> Typed.TypedTerm (Model.PropertyType t)
+propertyTypeWithRequired original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "key"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+              Core.projectionFieldName = (Core.Name "key")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "value"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+              Core.projectionFieldName = (Core.Name "value")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "required"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
+-- | DSL updater for the value field of hydra.pg.model.PropertyType
+propertyTypeWithValue :: Typed.TypedTerm (Model.PropertyType t) -> Typed.TypedTerm t -> Typed.TypedTerm (Model.PropertyType t)
+propertyTypeWithValue original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "key"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+              Core.projectionFieldName = (Core.Name "key")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "value"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "required"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+              Core.projectionFieldName = (Core.Name "required")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL accessor for the value field of hydra.pg.model.Property
+propertyValue :: Typed.TypedTerm (Model.Property v) -> Typed.TypedTerm v
+propertyValue x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.Property"),
+        Core.projectionFieldName = (Core.Name "value")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL updater for the key field of hydra.pg.model.Property
+propertyWithKey :: Typed.TypedTerm (Model.Property v) -> Typed.TypedTerm Model.PropertyKey -> Typed.TypedTerm (Model.Property v)
+propertyWithKey original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Property"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "key"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "value"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Property"),
+              Core.projectionFieldName = (Core.Name "value")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the value field of hydra.pg.model.Property
+propertyWithValue :: Typed.TypedTerm (Model.Property v) -> Typed.TypedTerm v -> Typed.TypedTerm (Model.Property v)
+propertyWithValue original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Property"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "key"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Property"),
+              Core.projectionFieldName = (Core.Name "key")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "value"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
+-- | DSL accessor for the body of hydra.pg.model.EdgeLabel
+unEdgeLabel :: Typed.TypedTerm Model.EdgeLabel -> Typed.TypedTerm String
+unEdgeLabel x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.model.EdgeLabel")),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the body of hydra.pg.model.PropertyKey
+unPropertyKey :: Typed.TypedTerm Model.PropertyKey -> Typed.TypedTerm String
+unPropertyKey x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.model.PropertyKey")),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the body of hydra.pg.model.VertexLabel
+unVertexLabel :: Typed.TypedTerm Model.VertexLabel -> Typed.TypedTerm String
+unVertexLabel x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermUnwrap (Core.Name "hydra.pg.model.VertexLabel")),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL constructor for hydra.pg.model.Vertex
+vertex :: Typed.TypedTerm Model.VertexLabel -> Typed.TypedTerm v -> Typed.TypedTerm (M.Map Model.PropertyKey v) -> Typed.TypedTerm (Model.Vertex v)
+vertex label id properties =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Vertex"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Typed.unTypedTerm label)},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Typed.unTypedTerm id)},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Typed.unTypedTerm properties)}]}))
+-- | DSL accessor for the id field of hydra.pg.model.Vertex
+vertexId :: Typed.TypedTerm (Model.Vertex v) -> Typed.TypedTerm v
+vertexId x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
+        Core.projectionFieldName = (Core.Name "id")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the label field of hydra.pg.model.Vertex
+vertexLabel :: Typed.TypedTerm (Model.Vertex v) -> Typed.TypedTerm Model.VertexLabel
+vertexLabel x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
+        Core.projectionFieldName = (Core.Name "label")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL constructor for the hydra.pg.model.VertexLabel wrapper
+vertexLabel2 :: Typed.TypedTerm String -> Typed.TypedTerm Model.VertexLabel
+vertexLabel2 x =
+    Typed.TypedTerm (Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.pg.model.VertexLabel"),
+      Core.wrappedTermBody = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the properties field of hydra.pg.model.Vertex
+vertexProperties :: Typed.TypedTerm (Model.Vertex v) -> Typed.TypedTerm (M.Map Model.PropertyKey v)
+vertexProperties x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
+        Core.projectionFieldName = (Core.Name "properties")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL constructor for hydra.pg.model.VertexType
+vertexType :: Typed.TypedTerm Model.VertexLabel -> Typed.TypedTerm t -> Typed.TypedTerm [Model.PropertyType t] -> Typed.TypedTerm (Model.VertexType t)
+vertexType label id properties =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Typed.unTypedTerm label)},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Typed.unTypedTerm id)},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Typed.unTypedTerm properties)}]}))
+-- | DSL accessor for the id field of hydra.pg.model.VertexType
+vertexTypeId :: Typed.TypedTerm (Model.VertexType t) -> Typed.TypedTerm t
+vertexTypeId x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
+        Core.projectionFieldName = (Core.Name "id")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the label field of hydra.pg.model.VertexType
+vertexTypeLabel :: Typed.TypedTerm (Model.VertexType t) -> Typed.TypedTerm Model.VertexLabel
+vertexTypeLabel x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
+        Core.projectionFieldName = (Core.Name "label")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the properties field of hydra.pg.model.VertexType
+vertexTypeProperties :: Typed.TypedTerm (Model.VertexType t) -> Typed.TypedTerm [Model.PropertyType t]
+vertexTypeProperties x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
+        Core.projectionFieldName = (Core.Name "properties")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL updater for the id field of hydra.pg.model.VertexType
+vertexTypeWithId :: Typed.TypedTerm (Model.VertexType t) -> Typed.TypedTerm t -> Typed.TypedTerm (Model.VertexType t)
+vertexTypeWithId original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the label field of hydra.pg.model.VertexType
+vertexTypeWithLabel :: Typed.TypedTerm (Model.VertexType t) -> Typed.TypedTerm Model.VertexLabel -> Typed.TypedTerm (Model.VertexType t)
+vertexTypeWithLabel original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the properties field of hydra.pg.model.VertexType
+vertexTypeWithProperties :: Typed.TypedTerm (Model.VertexType t) -> Typed.TypedTerm [Model.PropertyType t] -> Typed.TypedTerm (Model.VertexType t)
+vertexTypeWithProperties original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexType"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
+-- | DSL constructor for hydra.pg.model.VertexWithAdjacentEdges
+vertexWithAdjacentEdges :: Typed.TypedTerm (Model.Vertex v) -> Typed.TypedTerm [Model.AdjacentEdge v] -> Typed.TypedTerm [Model.AdjacentEdge v] -> Typed.TypedTerm (Model.VertexWithAdjacentEdges v)
+vertexWithAdjacentEdges vertex ins outs =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (Typed.unTypedTerm vertex)},
+        Core.Field {
+          Core.fieldName = (Core.Name "ins"),
+          Core.fieldTerm = (Typed.unTypedTerm ins)},
+        Core.Field {
+          Core.fieldName = (Core.Name "outs"),
+          Core.fieldTerm = (Typed.unTypedTerm outs)}]}))
+-- | DSL accessor for the ins field of hydra.pg.model.VertexWithAdjacentEdges
+vertexWithAdjacentEdgesIns :: Typed.TypedTerm (Model.VertexWithAdjacentEdges v) -> Typed.TypedTerm [Model.AdjacentEdge v]
+vertexWithAdjacentEdgesIns x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+        Core.projectionFieldName = (Core.Name "ins")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the outs field of hydra.pg.model.VertexWithAdjacentEdges
+vertexWithAdjacentEdgesOuts :: Typed.TypedTerm (Model.VertexWithAdjacentEdges v) -> Typed.TypedTerm [Model.AdjacentEdge v]
+vertexWithAdjacentEdgesOuts x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+        Core.projectionFieldName = (Core.Name "outs")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL accessor for the vertex field of hydra.pg.model.VertexWithAdjacentEdges
+vertexWithAdjacentEdgesVertex :: Typed.TypedTerm (Model.VertexWithAdjacentEdges v) -> Typed.TypedTerm (Model.Vertex v)
+vertexWithAdjacentEdgesVertex x =
+    Typed.TypedTerm (Core.TermApplication (Core.Application {
+      Core.applicationFunction = (Core.TermProject (Core.Projection {
+        Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+        Core.projectionFieldName = (Core.Name "vertex")})),
+      Core.applicationArgument = (Typed.unTypedTerm x)}))
+-- | DSL updater for the ins field of hydra.pg.model.VertexWithAdjacentEdges
+vertexWithAdjacentEdgesWithIns :: Typed.TypedTerm (Model.VertexWithAdjacentEdges v) -> Typed.TypedTerm [Model.AdjacentEdge v] -> Typed.TypedTerm (Model.VertexWithAdjacentEdges v)
+vertexWithAdjacentEdgesWithIns original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+              Core.projectionFieldName = (Core.Name "vertex")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "ins"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "outs"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+              Core.projectionFieldName = (Core.Name "outs")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the outs field of hydra.pg.model.VertexWithAdjacentEdges
+vertexWithAdjacentEdgesWithOuts :: Typed.TypedTerm (Model.VertexWithAdjacentEdges v) -> Typed.TypedTerm [Model.AdjacentEdge v] -> Typed.TypedTerm (Model.VertexWithAdjacentEdges v)
+vertexWithAdjacentEdgesWithOuts original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+              Core.projectionFieldName = (Core.Name "vertex")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "ins"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+              Core.projectionFieldName = (Core.Name "ins")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "outs"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
+-- | DSL updater for the vertex field of hydra.pg.model.VertexWithAdjacentEdges
+vertexWithAdjacentEdgesWithVertex :: Typed.TypedTerm (Model.VertexWithAdjacentEdges v) -> Typed.TypedTerm (Model.Vertex v) -> Typed.TypedTerm (Model.VertexWithAdjacentEdges v)
+vertexWithAdjacentEdgesWithVertex original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "ins"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+              Core.projectionFieldName = (Core.Name "ins")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "outs"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+              Core.projectionFieldName = (Core.Name "outs")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the id field of hydra.pg.model.Vertex
+vertexWithId :: Typed.TypedTerm (Model.Vertex v) -> Typed.TypedTerm v -> Typed.TypedTerm (Model.Vertex v)
+vertexWithId original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Vertex"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the label field of hydra.pg.model.Vertex
+vertexWithLabel :: Typed.TypedTerm (Model.Vertex v) -> Typed.TypedTerm Model.VertexLabel -> Typed.TypedTerm (Model.Vertex v)
+vertexWithLabel original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Vertex"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
+              Core.projectionFieldName = (Core.Name "properties")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))}]}))
+-- | DSL updater for the properties field of hydra.pg.model.Vertex
+vertexWithProperties :: Typed.TypedTerm (Model.Vertex v) -> Typed.TypedTerm (M.Map Model.PropertyKey v) -> Typed.TypedTerm (Model.Vertex v)
+vertexWithProperties original newVal =
+    Typed.TypedTerm (Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Vertex"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
+              Core.projectionFieldName = (Core.Name "label")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (Core.TermApplication (Core.Application {
+            Core.applicationFunction = (Core.TermProject (Core.Projection {
+              Core.projectionTypeName = (Core.Name "hydra.pg.model.Vertex"),
+              Core.projectionFieldName = (Core.Name "id")})),
+            Core.applicationArgument = (Typed.unTypedTerm original)}))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = (Typed.unTypedTerm newVal)}]}))
diff --git a/src/main/haskell/Hydra/Encode/Neo4j/Model.hs b/src/main/haskell/Hydra/Encode/Neo4j/Model.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Encode/Neo4j/Model.hs
@@ -0,0 +1,537 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Term encoders for hydra.neo4j.model
+
+module Hydra.Encode.Neo4j.Model where
+import qualified Hydra.Core as Core
+import qualified Hydra.Encode.Core as EncodeCore
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets
+import qualified Hydra.Neo4j.Model as Model
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Encoder for hydra.neo4j.model.Constraint
+constraint :: Model.Constraint -> Core.Term
+constraint x =
+    case x of
+      Model.ConstraintKey v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Constraint"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "key"),
+          Core.fieldTerm = (keyConstraint v0)}})
+      Model.ConstraintPropertyExistence v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Constraint"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "propertyExistence"),
+          Core.fieldTerm = (propertyExistenceConstraint v0)}})
+      Model.ConstraintPropertyType v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Constraint"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "propertyType"),
+          Core.fieldTerm = (propertyTypeConstraint v0)}})
+      Model.ConstraintPropertyUniqueness v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Constraint"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "propertyUniqueness"),
+          Core.fieldTerm = (propertyUniquenessConstraint v0)}})
+-- | Encoder for hydra.neo4j.model.ConstraintDefinition
+constraintDefinition :: Model.ConstraintDefinition -> Core.Term
+constraintDefinition x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.ConstraintDefinition"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "name"),
+          Core.fieldTerm = ((\opt -> Core.TermOptional (Optionals.map (\x2 -> Core.TermLiteral (Core.LiteralString x2)) opt)) (Model.constraintDefinitionName x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "body"),
+          Core.fieldTerm = (constraint (Model.constraintDefinitionBody x))}]})
+-- | Encoder for hydra.neo4j.model.Element
+element :: Model.Element -> Core.Term
+element x =
+    case x of
+      Model.ElementNode v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Element"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "node"),
+          Core.fieldTerm = (node v0)}})
+      Model.ElementRelationship v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Element"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "relationship"),
+          Core.fieldTerm = (relationship v0)}})
+-- | Encoder for hydra.neo4j.model.ElementId
+elementId :: Model.ElementId -> Core.Term
+elementId x =
+    Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.neo4j.model.ElementId"),
+      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Model.unElementId x))})
+-- | Encoder for hydra.neo4j.model.GraphType
+graphType :: Model.GraphType -> Core.Term
+graphType x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.GraphType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "nodes"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map nodeElementType xs)) (Model.graphTypeNodes x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "relationships"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map relationshipElementType xs)) (Model.graphTypeRelationships x))}]})
+-- | Encoder for hydra.neo4j.model.IsoDuration
+isoDuration :: Model.IsoDuration -> Core.Term
+isoDuration x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.IsoDuration"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "months"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 x2))) (Model.isoDurationMonths x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "days"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 x2))) (Model.isoDurationDays x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "seconds"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 x2))) (Model.isoDurationSeconds x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "nanoseconds"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Model.isoDurationNanoseconds x))}]})
+-- | Encoder for hydra.neo4j.model.Key
+key :: Model.Key -> Core.Term
+key x =
+    Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.neo4j.model.Key"),
+      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Model.unKey x))})
+-- | Encoder for hydra.neo4j.model.KeyConstraint
+keyConstraint :: Model.KeyConstraint -> Core.Term
+keyConstraint x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.KeyConstraint"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map key xs)) (Model.keyConstraintProperties x))}]})
+-- | Encoder for hydra.neo4j.model.LocalDate
+localDate :: Model.LocalDate -> Core.Term
+localDate x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.LocalDate"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "year"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Model.localDateYear x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "month"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Model.localDateMonth x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "day"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Model.localDateDay x))}]})
+-- | Encoder for hydra.neo4j.model.LocalDateTime
+localDateTime :: Model.LocalDateTime -> Core.Term
+localDateTime x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.LocalDateTime"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "date"),
+          Core.fieldTerm = (localDate (Model.localDateTimeDate x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "time"),
+          Core.fieldTerm = (localTime (Model.localDateTimeTime x))}]})
+-- | Encoder for hydra.neo4j.model.LocalTime
+localTime :: Model.LocalTime -> Core.Term
+localTime x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.LocalTime"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "hour"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Model.localTimeHour x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "minute"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Model.localTimeMinute x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "second"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Model.localTimeSecond x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "nanosecond"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Model.localTimeNanosecond x))}]})
+-- | Encoder for hydra.neo4j.model.Node
+node :: Model.Node -> Core.Term
+node x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.Node"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (elementId (Model.nodeId x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "labels"),
+          Core.fieldTerm = ((\s -> Core.TermSet (Sets.map nodeLabel s)) (Model.nodeLabels x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap key value m)) (Model.nodeProperties x))}]})
+-- | Encoder for hydra.neo4j.model.NodeElementType
+nodeElementType :: Model.NodeElementType -> Core.Term
+nodeElementType x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.NodeElementType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "identifyingLabel"),
+          Core.fieldTerm = (nodeLabel (Model.nodeElementTypeIdentifyingLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "impliedLabels"),
+          Core.fieldTerm = ((\s -> Core.TermSet (Sets.map nodeLabel s)) (Model.nodeElementTypeImpliedLabels x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "constraints"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map constraintDefinition xs)) (Model.nodeElementTypeConstraints x))}]})
+-- | Encoder for hydra.neo4j.model.NodeLabel
+nodeLabel :: Model.NodeLabel -> Core.Term
+nodeLabel x =
+    Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.neo4j.model.NodeLabel"),
+      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Model.unNodeLabel x))})
+-- | Encoder for hydra.neo4j.model.OffsetTime
+offsetTime :: Model.OffsetTime -> Core.Term
+offsetTime x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.OffsetTime"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "time"),
+          Core.fieldTerm = (localTime (Model.offsetTimeTime x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "offset"),
+          Core.fieldTerm = (zoneOffset (Model.offsetTimeOffset x))}]})
+-- | Encoder for hydra.neo4j.model.Path
+path :: Model.Path -> Core.Term
+path x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.Path"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "start"),
+          Core.fieldTerm = (node (Model.pathStart x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "segments"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map segment xs)) (Model.pathSegments x))}]})
+-- | Encoder for hydra.neo4j.model.Point
+point :: Model.Point -> Core.Term
+point x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.Point"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "srid"),
+          Core.fieldTerm = (spatialReferenceIdentifier (Model.pointSrid x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "x"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 x2))) (Model.pointX x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "y"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 x2))) (Model.pointY x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "z"),
+          Core.fieldTerm = ((\opt -> Core.TermOptional (Optionals.map (\x2 -> Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 x2))) opt)) (Model.pointZ x))}]})
+-- | Encoder for hydra.neo4j.model.PropertyExistenceConstraint
+propertyExistenceConstraint :: Model.PropertyExistenceConstraint -> Core.Term
+propertyExistenceConstraint x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.PropertyExistenceConstraint"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "property"),
+          Core.fieldTerm = (key (Model.propertyExistenceConstraintProperty x))}]})
+-- | Encoder for hydra.neo4j.model.PropertyTypeConstraint
+propertyTypeConstraint :: Model.PropertyTypeConstraint -> Core.Term
+propertyTypeConstraint x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.PropertyTypeConstraint"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "property"),
+          Core.fieldTerm = (key (Model.propertyTypeConstraintProperty x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "type"),
+          Core.fieldTerm = (valueType (Model.propertyTypeConstraintType x))}]})
+-- | Encoder for hydra.neo4j.model.PropertyUniquenessConstraint
+propertyUniquenessConstraint :: Model.PropertyUniquenessConstraint -> Core.Term
+propertyUniquenessConstraint x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.PropertyUniquenessConstraint"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map key xs)) (Model.propertyUniquenessConstraintProperties x))}]})
+-- | Encoder for hydra.neo4j.model.Relationship
+relationship :: Model.Relationship -> Core.Term
+relationship x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.Relationship"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (elementId (Model.relationshipId x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap key value m)) (Model.relationshipProperties x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "type"),
+          Core.fieldTerm = (relationshipType (Model.relationshipType x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "start"),
+          Core.fieldTerm = (elementId (Model.relationshipStart x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "end"),
+          Core.fieldTerm = (elementId (Model.relationshipEnd x))}]})
+-- | Encoder for hydra.neo4j.model.RelationshipElementType
+relationshipElementType :: Model.RelationshipElementType -> Core.Term
+relationshipElementType x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.RelationshipElementType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "type"),
+          Core.fieldTerm = (relationshipType (Model.relationshipElementTypeType x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "startLabel"),
+          Core.fieldTerm = (nodeLabel (Model.relationshipElementTypeStartLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "endLabel"),
+          Core.fieldTerm = (nodeLabel (Model.relationshipElementTypeEndLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "constraints"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map constraintDefinition xs)) (Model.relationshipElementTypeConstraints x))}]})
+-- | Encoder for hydra.neo4j.model.RelationshipType
+relationshipType :: Model.RelationshipType -> Core.Term
+relationshipType x =
+    Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.neo4j.model.RelationshipType"),
+      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Model.unRelationshipType x))})
+-- | Encoder for hydra.neo4j.model.Segment
+segment :: Model.Segment -> Core.Term
+segment x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.Segment"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "relationship"),
+          Core.fieldTerm = (relationship (Model.segmentRelationship x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "end"),
+          Core.fieldTerm = (node (Model.segmentEnd x))}]})
+-- | Encoder for hydra.neo4j.model.SpatialReferenceIdentifier
+spatialReferenceIdentifier :: Model.SpatialReferenceIdentifier -> Core.Term
+spatialReferenceIdentifier x =
+    Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.neo4j.model.SpatialReferenceIdentifier"),
+      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Model.unSpatialReferenceIdentifier x))})
+-- | Encoder for hydra.neo4j.model.Value
+value :: Model.Value -> Core.Term
+value x =
+    case x of
+      Model.ValueBoolean v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "boolean"),
+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean v0))}})
+      Model.ValueBytes v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "bytes"),
+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralBinary v0))}})
+      Model.ValueDate v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "date"),
+          Core.fieldTerm = (localDate v0)}})
+      Model.ValueDateTime v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "dateTime"),
+          Core.fieldTerm = (zonedDateTime v0)}})
+      Model.ValueDuration v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "duration"),
+          Core.fieldTerm = (isoDuration v0)}})
+      Model.ValueFloat v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "float"),
+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 v0)))}})
+      Model.ValueInteger v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "integer"),
+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 v0)))}})
+      Model.ValueList v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "list"),
+          Core.fieldTerm = (Core.TermList (Lists.map value v0))}})
+      Model.ValueLocalDateTime v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "localDateTime"),
+          Core.fieldTerm = (localDateTime v0)}})
+      Model.ValueLocalTime v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "localTime"),
+          Core.fieldTerm = (localTime v0)}})
+      Model.ValueMap v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "map"),
+          Core.fieldTerm = (Core.TermMap (Maps.bimap key value v0))}})
+      Model.ValueNode v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "node"),
+          Core.fieldTerm = (node v0)}})
+      Model.ValueNull -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "null"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ValuePath v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "path"),
+          Core.fieldTerm = (path v0)}})
+      Model.ValuePoint v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "point"),
+          Core.fieldTerm = (point v0)}})
+      Model.ValueRelationship v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "relationship"),
+          Core.fieldTerm = (relationship v0)}})
+      Model.ValueString v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "string"),
+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v0))}})
+      Model.ValueTime v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.Value"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "time"),
+          Core.fieldTerm = (offsetTime v0)}})
+-- | Encoder for hydra.neo4j.model.ValueType
+valueType :: Model.ValueType -> Core.Term
+valueType x =
+    case x of
+      Model.ValueTypeBoolean -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "boolean"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ValueTypeString -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "string"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ValueTypeInteger -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "integer"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ValueTypeFloat -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "float"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ValueTypeDate -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "date"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ValueTypeLocalTime -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "localTime"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ValueTypeZonedTime -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "zonedTime"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ValueTypeLocalDateTime -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "localDateTime"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ValueTypeZonedDateTime -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "zonedDateTime"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ValueTypeDuration -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "duration"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ValueTypePoint -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "point"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ValueTypeList v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "list"),
+          Core.fieldTerm = (valueType v0)}})
+      Model.ValueTypeVector v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "vector"),
+          Core.fieldTerm = (vectorType v0)}})
+      Model.ValueTypeUnion v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.neo4j.model.ValueType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "union"),
+          Core.fieldTerm = (Core.TermList (Lists.map valueType v0))}})
+-- | Encoder for hydra.neo4j.model.VectorType
+vectorType :: Model.VectorType -> Core.Term
+vectorType x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.VectorType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "element"),
+          Core.fieldTerm = (valueType (Model.vectorTypeElement x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "dimension"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Model.vectorTypeDimension x))}]})
+-- | Encoder for hydra.neo4j.model.ZoneId
+zoneId :: Model.ZoneId -> Core.Term
+zoneId x =
+    Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.neo4j.model.ZoneId"),
+      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Model.unZoneId x))})
+-- | Encoder for hydra.neo4j.model.ZoneOffset
+zoneOffset :: Model.ZoneOffset -> Core.Term
+zoneOffset x =
+    Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.neo4j.model.ZoneOffset"),
+      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x2))) (Model.unZoneOffset x))})
+-- | Encoder for hydra.neo4j.model.ZonedDateTime
+zonedDateTime :: Model.ZonedDateTime -> Core.Term
+zonedDateTime x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.neo4j.model.ZonedDateTime"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "dateTime"),
+          Core.fieldTerm = (localDateTime (Model.zonedDateTimeDateTime x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "offset"),
+          Core.fieldTerm = (zoneOffset (Model.zonedDateTimeOffset x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "zone"),
+          Core.fieldTerm = (zoneId (Model.zonedDateTimeZone x))}]})
diff --git a/src/main/haskell/Hydra/Encode/Pg/Mapping.hs b/src/main/haskell/Hydra/Encode/Pg/Mapping.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Encode/Pg/Mapping.hs
@@ -0,0 +1,139 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Term encoders for hydra.pg.mapping
+
+module Hydra.Encode.Pg.Mapping where
+import qualified Hydra.Core as Core
+import qualified Hydra.Encode.Coders as Coders
+import qualified Hydra.Encode.Core as EncodeCore
+import qualified Hydra.Encode.Pg.Model as Model
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Pg.Mapping as Mapping
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Encoder for hydra.pg.mapping.AnnotationSchema
+annotationSchema :: Mapping.AnnotationSchema -> Core.Term
+annotationSchema x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.mapping.AnnotationSchema"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertexLabel"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaVertexLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "edgeLabel"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaEdgeLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "vertexId"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaVertexId x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "edgeId"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaEdgeId x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "propertyKey"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaPropertyKey x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "propertyValue"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaPropertyValue x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "outVertex"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaOutVertex x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "outVertexLabel"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaOutVertexLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "inVertex"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaInVertex x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "inVertexLabel"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaInVertexLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "outEdge"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaOutEdge x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "outEdgeLabel"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaOutEdgeLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "inEdge"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaInEdge x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "inEdgeLabel"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaInEdgeLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "ignore"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Mapping.annotationSchemaIgnore x))}]})
+-- | Encoder for hydra.pg.mapping.EdgeSpec
+edgeSpec :: Mapping.EdgeSpec -> Core.Term
+edgeSpec x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.mapping.EdgeSpec"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Model.edgeLabel (Mapping.edgeSpecLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (valueSpec (Mapping.edgeSpecId x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (valueSpec (Mapping.edgeSpecOut x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (valueSpec (Mapping.edgeSpecIn x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map propertySpec xs)) (Mapping.edgeSpecProperties x))}]})
+-- | Encoder for hydra.pg.mapping.ElementSpec
+elementSpec :: Mapping.ElementSpec -> Core.Term
+elementSpec x =
+    case x of
+      Mapping.ElementSpecVertex v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.mapping.ElementSpec"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (vertexSpec v0)}})
+      Mapping.ElementSpecEdge v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.mapping.ElementSpec"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "edge"),
+          Core.fieldTerm = (edgeSpec v0)}})
+-- | Encoder for hydra.pg.mapping.PropertySpec
+propertySpec :: Mapping.PropertySpec -> Core.Term
+propertySpec x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.mapping.PropertySpec"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "key"),
+          Core.fieldTerm = (Model.propertyKey (Mapping.propertySpecKey x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "value"),
+          Core.fieldTerm = (valueSpec (Mapping.propertySpecValue x))}]})
+-- | Encoder for hydra.pg.mapping.ValueSpec
+valueSpec :: Mapping.ValueSpec -> Core.Term
+valueSpec x =
+    case x of
+      Mapping.ValueSpecValue -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.mapping.ValueSpec"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "value"),
+          Core.fieldTerm = Core.TermUnit}})
+      Mapping.ValueSpecPattern v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.mapping.ValueSpec"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "pattern"),
+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v0))}})
+-- | Encoder for hydra.pg.mapping.VertexSpec
+vertexSpec :: Mapping.VertexSpec -> Core.Term
+vertexSpec x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.mapping.VertexSpec"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (Model.vertexLabel (Mapping.vertexSpecLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (valueSpec (Mapping.vertexSpecId x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map propertySpec xs)) (Mapping.vertexSpecProperties x))}]})
diff --git a/src/main/haskell/Hydra/Encode/Pg/Model.hs b/src/main/haskell/Hydra/Encode/Pg/Model.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Encode/Pg/Model.hs
@@ -0,0 +1,301 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Term encoders for hydra.pg.model
+
+module Hydra.Encode.Pg.Model where
+import qualified Hydra.Core as Core
+import qualified Hydra.Encode.Core as EncodeCore
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Pg.Model as Model
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Encoder for hydra.pg.model.AdjacentEdge
+adjacentEdge :: (v -> Core.Term) -> Model.AdjacentEdge v -> Core.Term
+adjacentEdge v x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.AdjacentEdge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (edgeLabel (Model.adjacentEdgeLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (v (Model.adjacentEdgeId x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (v (Model.adjacentEdgeVertex x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap propertyKey v m)) (Model.adjacentEdgeProperties x))}]})
+-- | Encoder for hydra.pg.model.Direction
+direction :: Model.Direction -> Core.Term
+direction x =
+    case x of
+      Model.DirectionOut -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.model.Direction"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.DirectionIn -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.model.Direction"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.DirectionBoth -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.model.Direction"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "both"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.DirectionUndirected -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.model.Direction"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "undirected"),
+          Core.fieldTerm = Core.TermUnit}})
+-- | Encoder for hydra.pg.model.Edge
+edge :: (v -> Core.Term) -> Model.Edge v -> Core.Term
+edge v x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Edge"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (edgeLabel (Model.edgeLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (v (Model.edgeId x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (v (Model.edgeOut x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (v (Model.edgeIn x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap propertyKey v m)) (Model.edgeProperties x))}]})
+-- | Encoder for hydra.pg.model.EdgeLabel
+edgeLabel :: Model.EdgeLabel -> Core.Term
+edgeLabel x =
+    Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.pg.model.EdgeLabel"),
+      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Model.unEdgeLabel x))})
+-- | Encoder for hydra.pg.model.EdgeType
+edgeType :: (t -> Core.Term) -> Model.EdgeType t -> Core.Term
+edgeType t x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.EdgeType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (edgeLabel (Model.edgeTypeLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (t (Model.edgeTypeId x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "out"),
+          Core.fieldTerm = (vertexLabel (Model.edgeTypeOut x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "in"),
+          Core.fieldTerm = (vertexLabel (Model.edgeTypeIn x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (propertyType t) xs)) (Model.edgeTypeProperties x))}]})
+-- | Encoder for hydra.pg.model.Element
+element :: (v -> Core.Term) -> Model.Element v -> Core.Term
+element v x =
+    case x of
+      Model.ElementVertex v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.model.Element"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (vertex v v0)}})
+      Model.ElementEdge v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.model.Element"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "edge"),
+          Core.fieldTerm = (edge v v0)}})
+-- | Encoder for hydra.pg.model.ElementKind
+elementKind :: Model.ElementKind -> Core.Term
+elementKind x =
+    case x of
+      Model.ElementKindVertex -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementKind"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = Core.TermUnit}})
+      Model.ElementKindEdge -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementKind"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "edge"),
+          Core.fieldTerm = Core.TermUnit}})
+-- | Encoder for hydra.pg.model.ElementTree
+elementTree :: (v -> Core.Term) -> Model.ElementTree v -> Core.Term
+elementTree v x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTree"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "self"),
+          Core.fieldTerm = (element v (Model.elementTreeSelf x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "dependencies"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (elementTree v) xs)) (Model.elementTreeDependencies x))}]})
+-- | Encoder for hydra.pg.model.ElementType
+elementType :: (t -> Core.Term) -> Model.ElementType t -> Core.Term
+elementType t x =
+    case x of
+      Model.ElementTypeVertex v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (vertexType t v0)}})
+      Model.ElementTypeEdge v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.model.ElementType"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "edge"),
+          Core.fieldTerm = (edgeType t v0)}})
+-- | Encoder for hydra.pg.model.ElementTypeTree
+elementTypeTree :: (t -> Core.Term) -> Model.ElementTypeTree t -> Core.Term
+elementTypeTree t x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.ElementTypeTree"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "self"),
+          Core.fieldTerm = (elementType t (Model.elementTypeTreeSelf x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "dependencies"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (elementTypeTree t) xs)) (Model.elementTypeTreeDependencies x))}]})
+-- | Encoder for hydra.pg.model.Graph
+graph :: Ord v => ((v -> Core.Term) -> Model.Graph v -> Core.Term)
+graph v x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Graph"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertices"),
+          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap v (vertex v) m)) (Model.graphVertices x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "edges"),
+          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap v (edge v) m)) (Model.graphEdges x))}]})
+-- | Encoder for hydra.pg.model.GraphSchema
+graphSchema :: (t -> Core.Term) -> Model.GraphSchema t -> Core.Term
+graphSchema t x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.GraphSchema"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertices"),
+          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap vertexLabel (vertexType t) m)) (Model.graphSchemaVertices x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "edges"),
+          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap edgeLabel (edgeType t) m)) (Model.graphSchemaEdges x))}]})
+-- | Encoder for hydra.pg.model.Label
+label :: Model.Label -> Core.Term
+label x =
+    case x of
+      Model.LabelVertex v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.model.Label"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (vertexLabel v0)}})
+      Model.LabelEdge v0 -> Core.TermInject (Core.Injection {
+        Core.injectionTypeName = (Core.Name "hydra.pg.model.Label"),
+        Core.injectionField = Core.Field {
+          Core.fieldName = (Core.Name "edge"),
+          Core.fieldTerm = (edgeLabel v0)}})
+-- | Encoder for hydra.pg.model.LazyGraph
+lazyGraph :: (v -> Core.Term) -> Model.LazyGraph v -> Core.Term
+lazyGraph v x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.LazyGraph"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertices"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (vertex v) xs)) (Model.lazyGraphVertices x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "edges"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (edge v) xs)) (Model.lazyGraphEdges x))}]})
+-- | Encoder for hydra.pg.model.Property
+property :: (v -> Core.Term) -> Model.Property v -> Core.Term
+property v x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Property"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "key"),
+          Core.fieldTerm = (propertyKey (Model.propertyKey x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "value"),
+          Core.fieldTerm = (v (Model.propertyValue x))}]})
+-- | Encoder for hydra.pg.model.PropertyKey
+propertyKey :: Model.PropertyKey -> Core.Term
+propertyKey x =
+    Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.pg.model.PropertyKey"),
+      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Model.unPropertyKey x))})
+-- | Encoder for hydra.pg.model.PropertyType
+propertyType :: (t -> Core.Term) -> Model.PropertyType t -> Core.Term
+propertyType t x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.PropertyType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "key"),
+          Core.fieldTerm = (propertyKey (Model.propertyTypeKey x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "value"),
+          Core.fieldTerm = (t (Model.propertyTypeValue x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "required"),
+          Core.fieldTerm = ((\x2 -> Core.TermLiteral (Core.LiteralBoolean x2)) (Model.propertyTypeRequired x))}]})
+-- | Encoder for hydra.pg.model.Vertex
+vertex :: (v -> Core.Term) -> Model.Vertex v -> Core.Term
+vertex v x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.Vertex"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (vertexLabel (Model.vertexLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (v (Model.vertexId x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap propertyKey v m)) (Model.vertexProperties x))}]})
+-- | Encoder for hydra.pg.model.VertexLabel
+vertexLabel :: Model.VertexLabel -> Core.Term
+vertexLabel x =
+    Core.TermWrap (Core.WrappedTerm {
+      Core.wrappedTermTypeName = (Core.Name "hydra.pg.model.VertexLabel"),
+      Core.wrappedTermBody = ((\x2 -> Core.TermLiteral (Core.LiteralString x2)) (Model.unVertexLabel x))})
+-- | Encoder for hydra.pg.model.VertexType
+vertexType :: (t -> Core.Term) -> Model.VertexType t -> Core.Term
+vertexType t x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexType"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "label"),
+          Core.fieldTerm = (vertexLabel (Model.vertexTypeLabel x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "id"),
+          Core.fieldTerm = (t (Model.vertexTypeId x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "properties"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (propertyType t) xs)) (Model.vertexTypeProperties x))}]})
+-- | Encoder for hydra.pg.model.VertexWithAdjacentEdges
+vertexWithAdjacentEdges :: (v -> Core.Term) -> Model.VertexWithAdjacentEdges v -> Core.Term
+vertexWithAdjacentEdges v x =
+    Core.TermRecord (Core.Record {
+      Core.recordTypeName = (Core.Name "hydra.pg.model.VertexWithAdjacentEdges"),
+      Core.recordFields = [
+        Core.Field {
+          Core.fieldName = (Core.Name "vertex"),
+          Core.fieldTerm = (vertex v (Model.vertexWithAdjacentEdgesVertex x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "ins"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (adjacentEdge v) xs)) (Model.vertexWithAdjacentEdgesIns x))},
+        Core.Field {
+          Core.fieldName = (Core.Name "outs"),
+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (adjacentEdge v) xs)) (Model.vertexWithAdjacentEdgesOuts x))}]})
diff --git a/src/main/haskell/Hydra/Error/Neo4j.hs b/src/main/haskell/Hydra/Error/Neo4j.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Error/Neo4j.hs
@@ -0,0 +1,177 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Error types for Neo4j property graph validation
+
+module Hydra.Error.Neo4j where
+import qualified Hydra.Core as Core
+import qualified Hydra.Neo4j.Model as Model
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | An error indicating that a Neo4j property graph is invalid
+data InvalidGraphError =
+  -- | A node in the graph is invalid
+  InvalidGraphErrorNode InvalidGraphNodeError |
+  -- | A relationship in the graph is invalid
+  InvalidGraphErrorRelationship InvalidGraphRelationshipError
+  deriving (Eq, Ord, Read, Show)
+_InvalidGraphError = Core.Name "hydra.error.neo4j.InvalidGraphError"
+_InvalidGraphError_node = Core.Name "node"
+_InvalidGraphError_relationship = Core.Name "relationship"
+-- | An invalid node within a graph, identified by its element id
+data InvalidGraphNodeError =
+  InvalidGraphNodeError {
+    -- | The element id of the invalid node
+    invalidGraphNodeErrorId :: Model.ElementId,
+    -- | The specific error
+    invalidGraphNodeErrorError :: InvalidNodeError}
+  deriving (Eq, Ord, Read, Show)
+_InvalidGraphNodeError = Core.Name "hydra.error.neo4j.InvalidGraphNodeError"
+_InvalidGraphNodeError_id = Core.Name "id"
+_InvalidGraphNodeError_error = Core.Name "error"
+-- | An invalid relationship within a graph, identified by its element id
+data InvalidGraphRelationshipError =
+  InvalidGraphRelationshipError {
+    -- | The element id of the invalid relationship
+    invalidGraphRelationshipErrorId :: Model.ElementId,
+    -- | The specific error
+    invalidGraphRelationshipErrorError :: InvalidRelationshipError}
+  deriving (Eq, Ord, Read, Show)
+_InvalidGraphRelationshipError = Core.Name "hydra.error.neo4j.InvalidGraphRelationshipError"
+_InvalidGraphRelationshipError_id = Core.Name "id"
+_InvalidGraphRelationshipError_error = Core.Name "error"
+-- | An error indicating that a node is invalid
+data InvalidNodeError =
+  -- | A key constraint is violated
+  InvalidNodeErrorKeyViolation KeyError |
+  -- | The node is missing a label implied by its node element type
+  InvalidNodeErrorMissingImpliedLabel MissingLabelError |
+  -- | The node is missing a property required by a property existence constraint
+  InvalidNodeErrorMissingProperty PropertyExistenceError |
+  -- | The node's labels do not match any node element type in the graph type
+  InvalidNodeErrorNoSuchLabel NoSuchLabelError |
+  -- | A property uniqueness constraint is violated
+  InvalidNodeErrorUniquenessViolation PropertyUniquenessError |
+  -- | A property of the node violates a property type constraint
+  InvalidNodeErrorWrongPropertyType PropertyTypeError
+  deriving (Eq, Ord, Read, Show)
+_InvalidNodeError = Core.Name "hydra.error.neo4j.InvalidNodeError"
+_InvalidNodeError_keyViolation = Core.Name "keyViolation"
+_InvalidNodeError_missingImpliedLabel = Core.Name "missingImpliedLabel"
+_InvalidNodeError_missingProperty = Core.Name "missingProperty"
+_InvalidNodeError_noSuchLabel = Core.Name "noSuchLabel"
+_InvalidNodeError_uniquenessViolation = Core.Name "uniquenessViolation"
+_InvalidNodeError_wrongPropertyType = Core.Name "wrongPropertyType"
+-- | An error indicating that a relationship is invalid
+data InvalidRelationshipError =
+  -- | The end node does not exist in the graph
+  InvalidRelationshipErrorEndNodeNotFound |
+  -- | A key constraint is violated
+  InvalidRelationshipErrorKeyViolation KeyError |
+  -- | The relationship is missing a property required by a property existence constraint
+  InvalidRelationshipErrorMissingProperty PropertyExistenceError |
+  -- | The relationship's type is declared, but its endpoint labels match none of the declared source/target patterns for that type
+  InvalidRelationshipErrorNoMatchingPattern NoMatchingPatternError |
+  -- | The relationship's type does not match any relationship element type in the graph type
+  InvalidRelationshipErrorNoSuchType NoSuchRelationshipTypeError |
+  -- | The start node does not exist in the graph
+  InvalidRelationshipErrorStartNodeNotFound |
+  -- | A property uniqueness constraint is violated
+  InvalidRelationshipErrorUniquenessViolation PropertyUniquenessError |
+  -- | A property of the relationship violates a property type constraint
+  InvalidRelationshipErrorWrongPropertyType PropertyTypeError
+  deriving (Eq, Ord, Read, Show)
+_InvalidRelationshipError = Core.Name "hydra.error.neo4j.InvalidRelationshipError"
+_InvalidRelationshipError_endNodeNotFound = Core.Name "endNodeNotFound"
+_InvalidRelationshipError_keyViolation = Core.Name "keyViolation"
+_InvalidRelationshipError_missingProperty = Core.Name "missingProperty"
+_InvalidRelationshipError_noMatchingPattern = Core.Name "noMatchingPattern"
+_InvalidRelationshipError_noSuchType = Core.Name "noSuchType"
+_InvalidRelationshipError_startNodeNotFound = Core.Name "startNodeNotFound"
+_InvalidRelationshipError_uniquenessViolation = Core.Name "uniquenessViolation"
+_InvalidRelationshipError_wrongPropertyType = Core.Name "wrongPropertyType"
+-- | An error indicating that a key constraint is violated: the listed properties do not all exist, or their combined values are not unique
+data KeyError =
+  KeyError {
+    -- | The properties that constitute the key
+    keyErrorProperties :: [Model.Key]}
+  deriving (Eq, Ord, Read, Show)
+_KeyError = Core.Name "hydra.error.neo4j.KeyError"
+_KeyError_properties = Core.Name "properties"
+-- | An error indicating that a node is missing a label implied by its node element type
+data MissingLabelError =
+  MissingLabelError {
+    -- | The implied label that was not present on the node
+    missingLabelErrorLabel :: Model.NodeLabel}
+  deriving (Eq, Ord, Read, Show)
+_MissingLabelError = Core.Name "hydra.error.neo4j.MissingLabelError"
+_MissingLabelError_label = Core.Name "label"
+-- | An error indicating that a relationship's endpoint labels match none of the declared source/target patterns for its relationship type
+data NoMatchingPatternError =
+  NoMatchingPatternError {
+    -- | The declared source/target label patterns for the relationship's type
+    noMatchingPatternErrorAllowedPatterns :: [RelationshipPattern],
+    -- | The labels of the relationship's actual start node
+    noMatchingPatternErrorActualStartLabels :: [Model.NodeLabel],
+    -- | The labels of the relationship's actual end node
+    noMatchingPatternErrorActualEndLabels :: [Model.NodeLabel]}
+  deriving (Eq, Ord, Read, Show)
+_NoMatchingPatternError = Core.Name "hydra.error.neo4j.NoMatchingPatternError"
+_NoMatchingPatternError_allowedPatterns = Core.Name "allowedPatterns"
+_NoMatchingPatternError_actualStartLabels = Core.Name "actualStartLabels"
+_NoMatchingPatternError_actualEndLabels = Core.Name "actualEndLabels"
+-- | An error indicating that no node element type matches a node's labels
+data NoSuchLabelError =
+  NoSuchLabelError {
+    -- | The labels of the node for which no node element type was found
+    noSuchLabelErrorLabels :: [Model.NodeLabel]}
+  deriving (Eq, Ord, Read, Show)
+_NoSuchLabelError = Core.Name "hydra.error.neo4j.NoSuchLabelError"
+_NoSuchLabelError_labels = Core.Name "labels"
+-- | An error indicating that a relationship type does not match any relationship element type
+data NoSuchRelationshipTypeError =
+  NoSuchRelationshipTypeError {
+    -- | The relationship type that was not found
+    noSuchRelationshipTypeErrorType :: Model.RelationshipType}
+  deriving (Eq, Ord, Read, Show)
+_NoSuchRelationshipTypeError = Core.Name "hydra.error.neo4j.NoSuchRelationshipTypeError"
+_NoSuchRelationshipTypeError_type = Core.Name "type"
+-- | An error indicating that an element is missing a property required by a property existence constraint
+data PropertyExistenceError =
+  PropertyExistenceError {
+    -- | The key of the missing property
+    propertyExistenceErrorKey :: Model.Key}
+  deriving (Eq, Ord, Read, Show)
+_PropertyExistenceError = Core.Name "hydra.error.neo4j.PropertyExistenceError"
+_PropertyExistenceError_key = Core.Name "key"
+-- | An error indicating that a property's value violates a property type constraint
+data PropertyTypeError =
+  PropertyTypeError {
+    -- | The key of the property
+    propertyTypeErrorKey :: Model.Key,
+    -- | The type the property's value was required to have
+    propertyTypeErrorExpectedType :: Model.ValueType,
+    -- | The actual value of the property
+    propertyTypeErrorValue :: Model.Value}
+  deriving (Eq, Ord, Read, Show)
+_PropertyTypeError = Core.Name "hydra.error.neo4j.PropertyTypeError"
+_PropertyTypeError_key = Core.Name "key"
+_PropertyTypeError_expectedType = Core.Name "expectedType"
+_PropertyTypeError_value = Core.Name "value"
+-- | An error indicating that a property uniqueness constraint is violated: the combined values of the listed properties are not unique
+data PropertyUniquenessError =
+  PropertyUniquenessError {
+    -- | The properties whose combined values must be unique
+    propertyUniquenessErrorProperties :: [Model.Key]}
+  deriving (Eq, Ord, Read, Show)
+_PropertyUniquenessError = Core.Name "hydra.error.neo4j.PropertyUniquenessError"
+_PropertyUniquenessError_properties = Core.Name "properties"
+-- | A declared source/target label pattern for a relationship type, used in NoMatchingPatternError
+data RelationshipPattern =
+  RelationshipPattern {
+    -- | The required start-node label
+    relationshipPatternStartLabel :: Model.NodeLabel,
+    -- | The required end-node label
+    relationshipPatternEndLabel :: Model.NodeLabel}
+  deriving (Eq, Ord, Read, Show)
+_RelationshipPattern = Core.Name "hydra.error.neo4j.RelationshipPattern"
+_RelationshipPattern_startLabel = Core.Name "startLabel"
+_RelationshipPattern_endLabel = Core.Name "endLabel"
diff --git a/src/main/haskell/Hydra/Error/Pg.hs b/src/main/haskell/Hydra/Error/Pg.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Error/Pg.hs
@@ -0,0 +1,140 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Error types for property graph validation
+
+module Hydra.Error.Pg where
+import qualified Hydra.Core as Core
+import qualified Hydra.Pg.Model as Model
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | An error indicating that an edge is invalid
+data InvalidEdgeError =
+  -- | The edge id value is invalid
+  InvalidEdgeErrorId InvalidValueError |
+  -- | The in-vertex has the wrong label
+  InvalidEdgeErrorInVertexLabel WrongVertexLabelError |
+  -- | The in-vertex does not exist in the graph
+  InvalidEdgeErrorInVertexNotFound |
+  -- | The edge label does not exist in the schema
+  InvalidEdgeErrorLabel NoSuchEdgeLabelError |
+  -- | The out-vertex has the wrong label
+  InvalidEdgeErrorOutVertexLabel WrongVertexLabelError |
+  -- | The out-vertex does not exist in the graph
+  InvalidEdgeErrorOutVertexNotFound |
+  -- | A property of the edge is invalid
+  InvalidEdgeErrorProperty InvalidElementPropertyError
+  deriving (Eq, Ord, Read, Show)
+_InvalidEdgeError = Core.Name "hydra.error.pg.InvalidEdgeError"
+_InvalidEdgeError_id = Core.Name "id"
+_InvalidEdgeError_inVertexLabel = Core.Name "inVertexLabel"
+_InvalidEdgeError_inVertexNotFound = Core.Name "inVertexNotFound"
+_InvalidEdgeError_label = Core.Name "label"
+_InvalidEdgeError_outVertexLabel = Core.Name "outVertexLabel"
+_InvalidEdgeError_outVertexNotFound = Core.Name "outVertexNotFound"
+_InvalidEdgeError_property = Core.Name "property"
+-- | An invalid property on a vertex or edge, identified by its key
+data InvalidElementPropertyError =
+  InvalidElementPropertyError {
+    -- | The key of the invalid property
+    invalidElementPropertyErrorKey :: Model.PropertyKey,
+    -- | The specific error
+    invalidElementPropertyErrorError :: InvalidPropertyError}
+  deriving (Eq, Ord, Read, Show)
+_InvalidElementPropertyError = Core.Name "hydra.error.pg.InvalidElementPropertyError"
+_InvalidElementPropertyError_key = Core.Name "key"
+_InvalidElementPropertyError_error = Core.Name "error"
+-- | An invalid edge within a graph, identified by its id
+data InvalidGraphEdgeError v =
+  InvalidGraphEdgeError {
+    -- | The id of the invalid edge
+    invalidGraphEdgeErrorId :: v,
+    -- | The specific error
+    invalidGraphEdgeErrorError :: InvalidEdgeError}
+  deriving (Eq, Ord, Read, Show)
+_InvalidGraphEdgeError = Core.Name "hydra.error.pg.InvalidGraphEdgeError"
+_InvalidGraphEdgeError_id = Core.Name "id"
+_InvalidGraphEdgeError_error = Core.Name "error"
+-- | An error indicating that a property graph is invalid
+data InvalidGraphError v =
+  -- | An edge in the graph is invalid
+  InvalidGraphErrorEdge (InvalidGraphEdgeError v) |
+  -- | A vertex in the graph is invalid
+  InvalidGraphErrorVertex (InvalidGraphVertexError v)
+  deriving (Eq, Ord, Read, Show)
+_InvalidGraphError = Core.Name "hydra.error.pg.InvalidGraphError"
+_InvalidGraphError_edge = Core.Name "edge"
+_InvalidGraphError_vertex = Core.Name "vertex"
+-- | An invalid vertex within a graph, identified by its id
+data InvalidGraphVertexError v =
+  InvalidGraphVertexError {
+    -- | The id of the invalid vertex
+    invalidGraphVertexErrorId :: v,
+    -- | The specific error
+    invalidGraphVertexErrorError :: InvalidVertexError}
+  deriving (Eq, Ord, Read, Show)
+_InvalidGraphVertexError = Core.Name "hydra.error.pg.InvalidGraphVertexError"
+_InvalidGraphVertexError_id = Core.Name "id"
+_InvalidGraphVertexError_error = Core.Name "error"
+-- | An error indicating that a property is invalid
+data InvalidPropertyError =
+  -- | The property value failed type validation
+  InvalidPropertyErrorInvalidValue InvalidValueError |
+  -- | A required property is missing
+  InvalidPropertyErrorMissingRequired Model.PropertyKey |
+  -- | A property has an unexpected key not in the schema
+  InvalidPropertyErrorUnexpectedKey Model.PropertyKey
+  deriving (Eq, Ord, Read, Show)
+_InvalidPropertyError = Core.Name "hydra.error.pg.InvalidPropertyError"
+_InvalidPropertyError_invalidValue = Core.Name "invalidValue"
+_InvalidPropertyError_missingRequired = Core.Name "missingRequired"
+_InvalidPropertyError_unexpectedKey = Core.Name "unexpectedKey"
+-- | An error indicating that a value does not match the expected type
+data InvalidValueError =
+  InvalidValueError {
+    -- | The expected type, as a string
+    invalidValueErrorExpectedType :: String,
+    -- | The actual value, as a string
+    invalidValueErrorValue :: String}
+  deriving (Eq, Ord, Read, Show)
+_InvalidValueError = Core.Name "hydra.error.pg.InvalidValueError"
+_InvalidValueError_expectedType = Core.Name "expectedType"
+_InvalidValueError_value = Core.Name "value"
+-- | An error indicating that a vertex is invalid
+data InvalidVertexError =
+  -- | The vertex id value is invalid
+  InvalidVertexErrorId InvalidValueError |
+  -- | The vertex label does not exist in the schema
+  InvalidVertexErrorLabel NoSuchVertexLabelError |
+  -- | A property of the vertex is invalid
+  InvalidVertexErrorProperty InvalidElementPropertyError
+  deriving (Eq, Ord, Read, Show)
+_InvalidVertexError = Core.Name "hydra.error.pg.InvalidVertexError"
+_InvalidVertexError_id = Core.Name "id"
+_InvalidVertexError_label = Core.Name "label"
+_InvalidVertexError_property = Core.Name "property"
+-- | An error indicating that an edge label does not exist in the schema
+data NoSuchEdgeLabelError =
+  NoSuchEdgeLabelError {
+    -- | The edge label that was not found
+    noSuchEdgeLabelErrorLabel :: Model.EdgeLabel}
+  deriving (Eq, Ord, Read, Show)
+_NoSuchEdgeLabelError = Core.Name "hydra.error.pg.NoSuchEdgeLabelError"
+_NoSuchEdgeLabelError_label = Core.Name "label"
+-- | An error indicating that a vertex label does not exist in the schema
+data NoSuchVertexLabelError =
+  NoSuchVertexLabelError {
+    -- | The vertex label that was not found
+    noSuchVertexLabelErrorLabel :: Model.VertexLabel}
+  deriving (Eq, Ord, Read, Show)
+_NoSuchVertexLabelError = Core.Name "hydra.error.pg.NoSuchVertexLabelError"
+_NoSuchVertexLabelError_label = Core.Name "label"
+-- | An error indicating that a vertex has the wrong label
+data WrongVertexLabelError =
+  WrongVertexLabelError {
+    -- | The expected vertex label
+    wrongVertexLabelErrorExpected :: Model.VertexLabel,
+    -- | The actual vertex label
+    wrongVertexLabelErrorActual :: Model.VertexLabel}
+  deriving (Eq, Ord, Read, Show)
+_WrongVertexLabelError = Core.Name "hydra.error.pg.WrongVertexLabelError"
+_WrongVertexLabelError_expected = Core.Name "expected"
+_WrongVertexLabelError_actual = Core.Name "actual"
diff --git a/src/main/haskell/Hydra/Graphviz/Coder.hs b/src/main/haskell/Hydra/Graphviz/Coder.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Graphviz/Coder.hs
@@ -0,0 +1,323 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Functions for converting Hydra terms to Graphviz DOT graphs
+
+module Hydra.Graphviz.Coder where
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Graphviz.Dot as Dot
+import qualified Hydra.Json.Model as Model
+import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Literals as Literals
+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets
+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings
+import qualified Hydra.Names as Names
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Query as Query
+import qualified Hydra.Relational as Relational
+import qualified Hydra.Rewriting as Rewriting
+import qualified Hydra.Show.Paths as ShowPaths
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Map as M
+-- | Create a DOT label attribute
+labelAttr :: String -> Dot.EqualityPair
+labelAttr lab =
+    Dot.EqualityPair {
+      Dot.equalityPairLeft = (Dot.Id "label"),
+      Dot.equalityPairRight = (Dot.Id lab)}
+-- | Create DOT label attributes with a node style
+labelAttrs :: String -> String -> Dot.AttrList
+labelAttrs style lab =
+
+      let styleAttrs =
+              Logic.ifElse (Equality.equal style nodeStyleSimple) [] (Logic.ifElse (Equality.equal style nodeStyleElement) [
+                Dot.EqualityPair {
+                  Dot.equalityPairLeft = (Dot.Id "style"),
+                  Dot.equalityPairRight = (Dot.Id "filled")},
+                Dot.EqualityPair {
+                  Dot.equalityPairLeft = (Dot.Id "fillcolor"),
+                  Dot.equalityPairRight = (Dot.Id "lightyellow")}] (Logic.ifElse (Equality.equal style nodeStyleVariable) [
+                Dot.EqualityPair {
+                  Dot.equalityPairLeft = (Dot.Id "style"),
+                  Dot.equalityPairRight = (Dot.Id "filled")},
+                Dot.EqualityPair {
+                  Dot.equalityPairLeft = (Dot.Id "fillcolor"),
+                  Dot.equalityPairRight = (Dot.Id "lightcyan")}] [
+                Dot.EqualityPair {
+                  Dot.equalityPairLeft = (Dot.Id "style"),
+                  Dot.equalityPairRight = (Dot.Id "filled")},
+                Dot.EqualityPair {
+                  Dot.equalityPairLeft = (Dot.Id "fillcolor"),
+                  Dot.equalityPairRight = (Dot.Id "linen")}]))
+      in (Dot.AttrList [
+        Lists.concat2 [
+          labelAttr lab] styleAttrs])
+-- | The 'element' node style
+nodeStyleElement :: String
+nodeStyleElement = "element"
+-- | The 'primitive' node style
+nodeStylePrimitive :: String
+nodeStylePrimitive = "primitive"
+-- | The 'simple' node style
+nodeStyleSimple :: String
+nodeStyleSimple = "simple"
+-- | The 'variable' node style
+nodeStyleVariable :: String
+nodeStyleVariable = "variable"
+-- | Construct a map from namespace to prefix for all standard libraries
+standardNamespaces :: M.Map Packaging.ModuleName String
+standardNamespaces =
+    M.fromList [
+      (Packaging.ModuleName "hydra.lib.chars", "chars"),
+      (Packaging.ModuleName "hydra.lib.effects", "effects"),
+      (Packaging.ModuleName "hydra.lib.eithers", "eithers"),
+      (Packaging.ModuleName "hydra.lib.equality", "equality"),
+      (Packaging.ModuleName "hydra.lib.files", "files"),
+      (Packaging.ModuleName "hydra.lib.lists", "lists"),
+      (Packaging.ModuleName "hydra.lib.literals", "literals"),
+      (Packaging.ModuleName "hydra.lib.logic", "logic"),
+      (Packaging.ModuleName "hydra.lib.maps", "maps"),
+      (Packaging.ModuleName "hydra.lib.math", "math"),
+      (Packaging.ModuleName "hydra.lib.optionals", "optionals"),
+      (Packaging.ModuleName "hydra.lib.pairs", "pairs"),
+      (Packaging.ModuleName "hydra.lib.regex", "regex"),
+      (Packaging.ModuleName "hydra.lib.sets", "sets"),
+      (Packaging.ModuleName "hydra.lib.strings", "strings"),
+      (Packaging.ModuleName "hydra.lib.system", "system"),
+      (Packaging.ModuleName "hydra.lib.text", "text")]
+-- | Compute a label and node style for a term
+termLabel :: Bool -> M.Map Packaging.ModuleName String -> Core.Term -> (String, String)
+termLabel compact namespaces term =
+
+      let simpleLabel = \lab -> (lab, nodeStyleSimple)
+      in case term of
+        Core.TermAnnotated _ -> simpleLabel "@{}"
+        Core.TermApplication _ -> simpleLabel (Logic.ifElse compact "$" "apply")
+        Core.TermLambda _ -> simpleLabel (Logic.ifElse compact "\955" "lambda")
+        Core.TermProject v0 -> simpleLabel (Strings.cat [
+          "{",
+          (Names.compactName namespaces (Core.projectionTypeName v0)),
+          "}.",
+          (Core.unName (Core.projectionFieldName v0))])
+        Core.TermCases v0 -> simpleLabel (Strings.cat [
+          "cases_{",
+          (Names.compactName namespaces (Core.caseStatementTypeName v0)),
+          "}"])
+        Core.TermUnwrap v0 -> simpleLabel (Strings.cat [
+          "unwrap_{",
+          (Names.compactName namespaces v0),
+          "}"])
+        Core.TermLet _ -> simpleLabel "let"
+        Core.TermList _ -> simpleLabel (Logic.ifElse compact "[]" "list")
+        Core.TermLiteral v0 -> simpleLabel (case v0 of
+          Core.LiteralBinary v1 -> Literals.binaryToString v1
+          Core.LiteralBoolean v1 -> Literals.showBoolean v1
+          Core.LiteralInteger v1 -> case v1 of
+            Core.IntegerValueBigint v2 -> Literals.showBigint v2
+            Core.IntegerValueInt8 v2 -> Literals.showInt8 v2
+            Core.IntegerValueInt16 v2 -> Literals.showInt16 v2
+            Core.IntegerValueInt32 v2 -> Literals.showInt32 v2
+            Core.IntegerValueInt64 v2 -> Literals.showInt64 v2
+            Core.IntegerValueUint8 v2 -> Literals.showUint8 v2
+            Core.IntegerValueUint16 v2 -> Literals.showUint16 v2
+            Core.IntegerValueUint32 v2 -> Literals.showUint32 v2
+            Core.IntegerValueUint64 v2 -> Literals.showUint64 v2
+            _ -> "?"
+          Core.LiteralFloat v1 -> case v1 of
+            Core.FloatValueFloat32 v2 -> Literals.showFloat32 v2
+            Core.FloatValueFloat64 v2 -> Literals.showFloat64 v2
+            _ -> "?"
+          Core.LiteralString v1 -> v1
+          _ -> "?")
+        Core.TermMap _ -> simpleLabel (Logic.ifElse compact "<,>" "map")
+        Core.TermOptional _ -> simpleLabel (Logic.ifElse compact "opt" "optional")
+        Core.TermRecord v0 -> simpleLabel (Strings.cat2 "\8743" (Names.compactName namespaces (Core.recordTypeName v0)))
+        Core.TermTypeLambda _ -> simpleLabel "tyabs"
+        Core.TermTypeApplication _ -> simpleLabel "tyapp"
+        Core.TermInject v0 -> simpleLabel (Strings.cat2 "\8891" (Names.compactName namespaces (Core.injectionTypeName v0)))
+        Core.TermVariable v0 -> simpleLabel (Names.compactName namespaces v0)
+        Core.TermWrap v0 -> simpleLabel (Strings.cat [
+          "(",
+          (Names.compactName namespaces (Core.wrappedTermTypeName v0)),
+          ")"])
+        _ -> simpleLabel "?"
+-- | Convert a term to a full DOT graph
+termToDotGraph :: Core.Term -> Dot.Graph
+termToDotGraph term =
+    Dot.Graph {
+      Dot.graphStrict = False,
+      Dot.graphDirected = True,
+      Dot.graphId = Nothing,
+      Dot.graphStatements = (termToDotStmts standardNamespaces term)}
+-- | Convert a term to full DOT statements showing term structure
+termToDotStmts :: M.Map Packaging.ModuleName String -> Core.Term -> [Dot.Stmt]
+termToDotStmts namespaces term =
+
+      let encode =
+              \mlabstyle -> \isElement -> \ids -> \mparent -> \stmtsVisited -> \accessorTerm ->
+                let accessor = Pairs.first accessorTerm
+                    currentTerm = Pairs.second accessorTerm
+                    stmts = Pairs.first stmtsVisited
+                    visited = Pairs.second stmtsVisited
+                    termLS = termLabel True namespaces currentTerm
+                    rawLabel = Pairs.first termLS
+                    termNodeStyle = Pairs.second termLS
+                    labelOf =
+                            \vis -> \t ->
+                              let tls = termLabel True namespaces t
+                                  l = Pairs.first tls
+                                  s = Pairs.second tls
+                              in (Names.chooseUniqueLabel vis l, s)
+                    labstyle = Optionals.cases mlabstyle (labelOf visited currentTerm) (\ls -> ls)
+                    label = Pairs.first labstyle
+                    style = Pairs.second labstyle
+                    nodeStyle = Logic.ifElse isElement nodeStyleElement termNodeStyle
+                    selfId = Dot.Id label
+                    selfVisited = Sets.insert label visited
+                    nodeStmt =
+                            Dot.StmtNode (Dot.NodeStmt {
+                              Dot.nodeStmtId = (toNodeId selfId),
+                              Dot.nodeStmtAttributes = (Just (labelAttrs nodeStyle rawLabel))})
+                    toAccessorEdgeStmt =
+                            \acc -> \sty -> \i1 -> \i2 -> toEdgeStmt i1 i2 (Optionals.map (\s -> labelAttrs sty s) (ShowPaths.subtermStep acc))
+                    edgeAttrs =
+                            \lab -> Dot.AttrList [
+                              [
+                                Dot.EqualityPair {
+                                  Dot.equalityPairLeft = (Dot.Id "label"),
+                                  Dot.equalityPairRight = (Dot.Id lab)}]]
+                    parentStmt = Optionals.cases mparent [] (\parent -> [
+                          toAccessorEdgeStmt accessor style parent selfId])
+                    selfStmts =
+                            Lists.concat [
+                              stmts,
+                              [
+                                nodeStmt],
+                              parentStmt]
+                    dflt = Lists.foldl (encode Nothing False ids (Just selfId)) (selfStmts, selfVisited) (Rewriting.subtermsWithSteps currentTerm)
+                in case currentTerm of
+                  Core.TermLambda v0 ->
+                    let v = Core.lambdaParameter v0
+                        body = Core.lambdaBody v0
+                        vstr = Core.unName v
+                        varLabel = Names.chooseUniqueLabel selfVisited vstr
+                        varId = Dot.Id varLabel
+                        visited1 = Sets.insert varLabel selfVisited
+                        ids1 = Maps.insert v varId ids
+                        varNodeStmt =
+                                Dot.StmtNode (Dot.NodeStmt {
+                                  Dot.nodeStmtId = (toNodeId varId),
+                                  Dot.nodeStmtAttributes = (Just (labelAttrs nodeStyleVariable vstr))})
+                        varEdgeStmt =
+                                Dot.StmtEdge (Dot.EdgeStmt {
+                                  Dot.edgeStmtLeft = (toNodeOrSubgraph selfId),
+                                  Dot.edgeStmtRight = [
+                                    toNodeOrSubgraph varId],
+                                  Dot.edgeStmtAttributes = (Just (edgeAttrs "var"))})
+                    in (encode Nothing False ids1 (Just selfId) (
+                      Lists.concat [
+                        selfStmts,
+                        [
+                          varNodeStmt,
+                          varEdgeStmt]],
+                      visited1) (Paths.SubtermStepLambdaBody, body))
+                  Core.TermLet v0 ->
+                    let bindings = Core.letBindings v0
+                        env = Core.letBody v0
+                        addBindingIds =
+                                \idsVis -> \binding ->
+                                  let curIds = Pairs.first idsVis
+                                      curVis = Pairs.second idsVis
+                                      bname = Core.bindingName binding
+                                      bterm = Core.bindingTerm binding
+                                      bls = labelOf curVis bterm
+                                      blab = Pairs.first bls
+                                  in (Maps.insert bname (Dot.Id blab) curIds, (Sets.insert blab curVis))
+                        idsVis1 = Lists.foldl addBindingIds (ids, visited) bindings
+                        ids1 = Pairs.first idsVis1
+                        addBindingTerm =
+                                \stVis -> \binding ->
+                                  let bname = Core.bindingName binding
+                                      bterm = Core.bindingTerm binding
+                                      blab = Dot.unId (Optionals.fromOptional (Dot.Id "?") (Maps.lookup bname ids1))
+                                  in (encode (Just (blab, nodeStyleElement)) True ids1 (Just selfId) stVis (Paths.SubtermStepLetBinding bname, bterm))
+                        stmts1 = Lists.foldl addBindingTerm (selfStmts, selfVisited) bindings
+                    in (encode Nothing False ids1 (Just selfId) stmts1 (Paths.SubtermStepLetBody, env))
+                  Core.TermVariable v0 -> Optionals.cases (Maps.lookup v0 ids) dflt (\i -> (Lists.concat2 stmts [
+                    toAccessorEdgeStmt accessor style (Optionals.fromOptional selfId mparent) i], visited))
+                  _ -> dflt
+      in (Pairs.first (encode Nothing False Maps.empty Nothing ([], Sets.empty) (Paths.SubtermStepAnnotatedBody, term)))
+-- | Convert a term to an subterm-style DOT graph
+termToSubtermDotGraph :: Core.Term -> Dot.Graph
+termToSubtermDotGraph term =
+    Dot.Graph {
+      Dot.graphStrict = False,
+      Dot.graphDirected = True,
+      Dot.graphId = Nothing,
+      Dot.graphStatements = (termToSubtermDotStmts standardNamespaces term)}
+-- | Convert a term to subterm-style DOT statements
+termToSubtermDotStmts :: M.Map Packaging.ModuleName String -> Core.Term -> [Dot.Stmt]
+termToSubtermDotStmts namespaces term =
+
+      let accessorGraph = ShowPaths.termToSubtermGraph namespaces term
+          nodes = Paths.subtermGraphNodes accessorGraph
+          edges = Paths.subtermGraphEdges accessorGraph
+          nodeStmt =
+                  \node -> Dot.StmtNode (Dot.NodeStmt {
+                    Dot.nodeStmtId = (toNodeId (Dot.Id (Paths.subtermNodeId node))),
+                    Dot.nodeStmtAttributes = (Just (Dot.AttrList [
+                      [
+                        labelAttr (Paths.subtermNodeLabel node)]]))})
+          edgeStmt =
+                  \edge ->
+                    let lab1 = Paths.subtermNodeId (Paths.subtermEdgeSource edge)
+                        lab2 = Paths.subtermNodeId (Paths.subtermEdgeTarget edge)
+                        pathAccessors = Paths.unSubtermPath (Paths.subtermEdgePath edge)
+                        showPath = Strings.intercalate "/" (Optionals.cat (Lists.map ShowPaths.subtermStep pathAccessors))
+                    in (toEdgeStmt (Dot.Id lab1) (Dot.Id lab2) (Just (Dot.AttrList [
+                      [
+                        labelAttr showPath]])))
+      in (Lists.concat2 (Lists.map nodeStmt nodes) (Lists.map edgeStmt edges))
+-- | Create a DOT edge statement
+toEdgeStmt :: Dot.Id -> Dot.Id -> Maybe Dot.AttrList -> Dot.Stmt
+toEdgeStmt i1 i2 attrs =
+    Dot.StmtEdge (Dot.EdgeStmt {
+      Dot.edgeStmtLeft = (toNodeOrSubgraph i1),
+      Dot.edgeStmtRight = [
+        toNodeOrSubgraph i2],
+      Dot.edgeStmtAttributes = attrs})
+-- | Create a DOT NodeId from an Id
+toNodeId :: Dot.Id -> Dot.NodeId
+toNodeId i =
+    Dot.NodeId {
+      Dot.nodeIdId = i,
+      Dot.nodeIdPort = Nothing}
+-- | Create a DOT NodeOrSubgraph from an Id
+toNodeOrSubgraph :: Dot.Id -> Dot.NodeOrSubgraph
+toNodeOrSubgraph i = Dot.NodeOrSubgraphNode (toNodeId i)
diff --git a/src/main/haskell/Hydra/Graphviz/Dot.hs b/src/main/haskell/Hydra/Graphviz/Dot.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Graphviz/Dot.hs
@@ -0,0 +1,144 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A model from the Graphviz DOT graph description language. Based on the grammar at https://graphviz.org/doc/info/lang.html
+
+module Hydra.Graphviz.Dot where
+import qualified Hydra.Core as Core
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+newtype Id =
+  Id {
+    unId :: String}
+  deriving (Eq, Ord, Read, Show)
+_Id = Core.Name "hydra.graphviz.dot.Id"
+data Graph =
+  Graph {
+    graphStrict :: Bool,
+    graphDirected :: Bool,
+    graphId :: (Maybe Id),
+    graphStatements :: [Stmt]}
+  deriving (Eq, Ord, Read, Show)
+_Graph = Core.Name "hydra.graphviz.dot.Graph"
+_Graph_strict = Core.Name "strict"
+_Graph_directed = Core.Name "directed"
+_Graph_id = Core.Name "id"
+_Graph_statements = Core.Name "statements"
+data Stmt =
+  StmtNode NodeStmt |
+  StmtEdge EdgeStmt |
+  StmtAttr AttrStmt |
+  StmtEquals EqualityPair |
+  StmtSubgraph Subgraph
+  deriving (Eq, Ord, Read, Show)
+_Stmt = Core.Name "hydra.graphviz.dot.Stmt"
+_Stmt_node = Core.Name "node"
+_Stmt_edge = Core.Name "edge"
+_Stmt_attr = Core.Name "attr"
+_Stmt_equals = Core.Name "equals"
+_Stmt_subgraph = Core.Name "subgraph"
+data EqualityPair =
+  EqualityPair {
+    equalityPairLeft :: Id,
+    equalityPairRight :: Id}
+  deriving (Eq, Ord, Read, Show)
+_EqualityPair = Core.Name "hydra.graphviz.dot.EqualityPair"
+_EqualityPair_left = Core.Name "left"
+_EqualityPair_right = Core.Name "right"
+data AttrStmt =
+  AttrStmt {
+    attrStmtType :: AttrType,
+    attrStmtAttributes :: AttrList}
+  deriving (Eq, Ord, Read, Show)
+_AttrStmt = Core.Name "hydra.graphviz.dot.AttrStmt"
+_AttrStmt_type = Core.Name "type"
+_AttrStmt_attributes = Core.Name "attributes"
+data AttrType =
+  AttrTypeGraph |
+  AttrTypeNode |
+  AttrTypeEdge
+  deriving (Eq, Ord, Read, Show)
+_AttrType = Core.Name "hydra.graphviz.dot.AttrType"
+_AttrType_graph = Core.Name "graph"
+_AttrType_node = Core.Name "node"
+_AttrType_edge = Core.Name "edge"
+newtype AttrList =
+  AttrList {
+    unAttrList :: [[EqualityPair]]}
+  deriving (Eq, Ord, Read, Show)
+_AttrList = Core.Name "hydra.graphviz.dot.AttrList"
+data EdgeStmt =
+  EdgeStmt {
+    edgeStmtLeft :: NodeOrSubgraph,
+    edgeStmtRight :: [NodeOrSubgraph],
+    edgeStmtAttributes :: (Maybe AttrList)}
+  deriving (Eq, Ord, Read, Show)
+_EdgeStmt = Core.Name "hydra.graphviz.dot.EdgeStmt"
+_EdgeStmt_left = Core.Name "left"
+_EdgeStmt_right = Core.Name "right"
+_EdgeStmt_attributes = Core.Name "attributes"
+data NodeOrSubgraph =
+  NodeOrSubgraphNode NodeId |
+  NodeOrSubgraphSubgraph Subgraph
+  deriving (Eq, Ord, Read, Show)
+_NodeOrSubgraph = Core.Name "hydra.graphviz.dot.NodeOrSubgraph"
+_NodeOrSubgraph_node = Core.Name "node"
+_NodeOrSubgraph_subgraph = Core.Name "subgraph"
+data NodeStmt =
+  NodeStmt {
+    nodeStmtId :: NodeId,
+    nodeStmtAttributes :: (Maybe AttrList)}
+  deriving (Eq, Ord, Read, Show)
+_NodeStmt = Core.Name "hydra.graphviz.dot.NodeStmt"
+_NodeStmt_id = Core.Name "id"
+_NodeStmt_attributes = Core.Name "attributes"
+data NodeId =
+  NodeId {
+    nodeIdId :: Id,
+    nodeIdPort :: (Maybe Port)}
+  deriving (Eq, Ord, Read, Show)
+_NodeId = Core.Name "hydra.graphviz.dot.NodeId"
+_NodeId_id = Core.Name "id"
+_NodeId_port = Core.Name "port"
+data Port =
+  Port {
+    portId :: (Maybe Id),
+    portPosition :: (Maybe CompassPt)}
+  deriving (Eq, Ord, Read, Show)
+_Port = Core.Name "hydra.graphviz.dot.Port"
+_Port_id = Core.Name "id"
+_Port_position = Core.Name "position"
+data Subgraph =
+  Subgraph {
+    subgraphSubgraphId :: (Maybe SubgraphId),
+    subgraphStatements :: [Stmt]}
+  deriving (Eq, Ord, Read, Show)
+_Subgraph = Core.Name "hydra.graphviz.dot.Subgraph"
+_Subgraph_subgraphId = Core.Name "subgraphId"
+_Subgraph_statements = Core.Name "statements"
+newtype SubgraphId =
+  SubgraphId {
+    unSubgraphId :: (Maybe Id)}
+  deriving (Eq, Ord, Read, Show)
+_SubgraphId = Core.Name "hydra.graphviz.dot.SubgraphId"
+data CompassPt =
+  CompassPtN |
+  CompassPtNe |
+  CompassPtE |
+  CompassPtSe |
+  CompassPtS |
+  CompassPtSw |
+  CompassPtW |
+  CompassPtNw |
+  CompassPtC |
+  CompassPtNone
+  deriving (Eq, Ord, Read, Show)
+_CompassPt = Core.Name "hydra.graphviz.dot.CompassPt"
+_CompassPt_n = Core.Name "n"
+_CompassPt_ne = Core.Name "ne"
+_CompassPt_e = Core.Name "e"
+_CompassPt_se = Core.Name "se"
+_CompassPt_s = Core.Name "s"
+_CompassPt_sw = Core.Name "sw"
+_CompassPt_w = Core.Name "w"
+_CompassPt_nw = Core.Name "nw"
+_CompassPt_c = Core.Name "c"
+_CompassPt_none = Core.Name "none"
diff --git a/src/main/haskell/Hydra/Graphviz/Serde.hs b/src/main/haskell/Hydra/Graphviz/Serde.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Graphviz/Serde.hs
@@ -0,0 +1,193 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Serialization functions for converting Graphviz DOT AST to abstract expressions
+
+module Hydra.Graphviz.Serde where
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Graphviz.Dot as Dot
+import qualified Hydra.Json.Model as Model
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Query as Query
+import qualified Hydra.Relational as Relational
+import qualified Hydra.Serialization as Serialization
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Convert an attribute list to an expression
+attrListToExpr :: Dot.AttrList -> Ast.Expr
+attrListToExpr al =
+    Serialization.spaceSep (Lists.map (\alist -> Serialization.brackets Serialization.squareBrackets Serialization.inlineStyle (Serialization.commaSep Serialization.inlineStyle (Lists.map equalityPairToExpr alist))) (Dot.unAttrList al))
+-- | Convert an attribute statement to an expression
+attrStmtToExpr :: Dot.AttrStmt -> Ast.Expr
+attrStmtToExpr as =
+
+      let t = Dot.attrStmtType as
+          attr = Dot.attrStmtAttributes as
+      in (Serialization.spaceSep [
+        attrTypeToExpr t,
+        (attrListToExpr attr)])
+-- | Convert an attribute type to an expression
+attrTypeToExpr :: Dot.AttrType -> Ast.Expr
+attrTypeToExpr t =
+    case t of
+      Dot.AttrTypeGraph -> Serialization.cst "graph"
+      Dot.AttrTypeNode -> Serialization.cst "node"
+      Dot.AttrTypeEdge -> Serialization.cst "edge"
+-- | Convert a compass point to an expression
+compassPtToExpr :: Dot.CompassPt -> Ast.Expr
+compassPtToExpr p =
+    case p of
+      Dot.CompassPtN -> Serialization.cst "n"
+      Dot.CompassPtNe -> Serialization.cst "ne"
+      Dot.CompassPtE -> Serialization.cst "e"
+      Dot.CompassPtSe -> Serialization.cst "se"
+      Dot.CompassPtS -> Serialization.cst "s"
+      Dot.CompassPtSw -> Serialization.cst "sw"
+      Dot.CompassPtW -> Serialization.cst "w"
+      Dot.CompassPtNw -> Serialization.cst "nw"
+      Dot.CompassPtC -> Serialization.cst "c"
+      Dot.CompassPtNone -> Serialization.cst "none"
+-- | Convert an edge statement to an expression
+edgeStmtToExpr :: Bool -> Dot.EdgeStmt -> Ast.Expr
+edgeStmtToExpr directed es =
+
+      let l = Dot.edgeStmtLeft es
+          r = Dot.edgeStmtRight es
+          attr = Dot.edgeStmtAttributes es
+          arrow = Logic.ifElse directed "->" "--"
+          rhsParts =
+                  Lists.concat (Lists.map (\n -> [
+                    Serialization.cst arrow,
+                    (nodeOrSubgraphToExpr directed n)]) r)
+          attrParts = Optionals.cases attr [] (\a -> [
+                attrListToExpr a])
+      in (Serialization.spaceSep (Lists.concat [
+        [
+          nodeOrSubgraphToExpr directed l],
+        rhsParts,
+        attrParts]))
+-- | Convert an equality pair to an expression
+equalityPairToExpr :: Dot.EqualityPair -> Ast.Expr
+equalityPairToExpr eq =
+
+      let l = Dot.equalityPairLeft eq
+          r = Dot.equalityPairRight eq
+      in (Serialization.spaceSep [
+        idToExpr l,
+        (Serialization.cst "="),
+        (idToExpr r)])
+-- | Convert a graph to an expression
+graphToExpr :: Dot.Graph -> Ast.Expr
+graphToExpr g =
+
+      let strict = Dot.graphStrict g
+          directed = Dot.graphDirected g
+          stmts = Dot.graphStatements g
+          graphKeyword = Logic.ifElse directed "digraph" "graph"
+          graphExpr =
+                  Logic.ifElse strict (Serialization.spaceSep [
+                    Serialization.cst "strict",
+                    (Serialization.cst graphKeyword)]) (Serialization.cst graphKeyword)
+          body =
+                  Serialization.brackets Serialization.curlyBraces Serialization.fullBlockStyle (Serialization.symbolSep ";" Serialization.fullBlockStyle (Lists.map (stmtToExpr directed) stmts))
+      in (Serialization.spaceSep [
+        graphExpr,
+        body])
+-- | Convert an identifier to an expression
+idToExpr :: Dot.Id -> Ast.Expr
+idToExpr i =
+    Serialization.cst (Strings.cat [
+      "\"",
+      (Dot.unId i),
+      "\""])
+-- | Convert a node identifier to an expression
+nodeIdToExpr :: Dot.NodeId -> Ast.Expr
+nodeIdToExpr nid =
+
+      let i = Dot.nodeIdId nid
+          mp = Dot.nodeIdPort nid
+      in (Serialization.noSep (Optionals.cat [
+        Optionals.pure (idToExpr i),
+        (Optionals.map portToExpr mp)]))
+-- | Convert a node or subgraph to an expression
+nodeOrSubgraphToExpr :: Bool -> Dot.NodeOrSubgraph -> Ast.Expr
+nodeOrSubgraphToExpr directed ns =
+    case ns of
+      Dot.NodeOrSubgraphNode v0 -> nodeIdToExpr v0
+      Dot.NodeOrSubgraphSubgraph v0 -> subgraphToExpr directed v0
+-- | Convert a node statement to an expression
+nodeStmtToExpr :: Dot.NodeStmt -> Ast.Expr
+nodeStmtToExpr ns =
+
+      let i = Dot.nodeStmtId ns
+          attr = Dot.nodeStmtAttributes ns
+      in (Serialization.spaceSep (Optionals.cat [
+        Optionals.pure (nodeIdToExpr i),
+        (Optionals.map attrListToExpr attr)]))
+-- | Convert a port to an expression
+portToExpr :: Dot.Port -> Ast.Expr
+portToExpr p =
+
+      let mi = Dot.portId p
+          mp = Dot.portPosition p
+          pre =
+                  Optionals.cases mi [] (\i -> [
+                    Serialization.cst ":",
+                    (idToExpr i)])
+          suf =
+                  Optionals.cases mp [] (\cp -> [
+                    Serialization.cst ":",
+                    (compassPtToExpr cp)])
+      in (Serialization.noSep (Lists.concat [
+        pre,
+        suf]))
+-- | Convert a statement to an expression
+stmtToExpr :: Bool -> Dot.Stmt -> Ast.Expr
+stmtToExpr directed s =
+    case s of
+      Dot.StmtNode v0 -> nodeStmtToExpr v0
+      Dot.StmtEdge v0 -> edgeStmtToExpr directed v0
+      Dot.StmtAttr v0 -> attrStmtToExpr v0
+      Dot.StmtEquals v0 -> equalityPairToExpr v0
+      Dot.StmtSubgraph v0 -> subgraphToExpr directed v0
+-- | Convert a subgraph identifier to an expression
+subgraphIdToExpr :: Dot.SubgraphId -> Ast.Expr
+subgraphIdToExpr sid =
+    Serialization.spaceSep (Optionals.cat [
+      Optionals.pure (Serialization.cst "subgraph"),
+      (Optionals.map idToExpr (Dot.unSubgraphId sid))])
+-- | Convert a subgraph to an expression
+subgraphToExpr :: Bool -> Dot.Subgraph -> Ast.Expr
+subgraphToExpr directed sg =
+
+      let mid = Dot.subgraphSubgraphId sg
+          stmts = Dot.subgraphStatements sg
+          body =
+                  Serialization.brackets Serialization.curlyBraces Serialization.inlineStyle (Serialization.spaceSep (Lists.map (stmtToExpr directed) stmts))
+      in (Serialization.spaceSep (Optionals.cat [
+        Optionals.map subgraphIdToExpr mid,
+        (Optionals.pure body)]))
diff --git a/src/main/haskell/Hydra/Neo4j/Model.hs b/src/main/haskell/Hydra/Neo4j/Model.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Neo4j/Model.hs
@@ -0,0 +1,455 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A data model for Neo4j-flavored property graphs, aligned with the types of the Neo4j Java driver (org.neo4j.driver) at the instance level and with Neo4j's constraints and graph types at the schema level.
+
+module Hydra.Neo4j.Model where
+import qualified Hydra.Core as Core
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.ByteString as B
+import qualified Data.Int as I
+import qualified Data.Map as M
+import qualified Data.Set as S
+-- | A Neo4j schema constraint, as one of the four constraint types Neo4j supports. The node-vs-relationship flavor is determined by the element type the constraint is attached to, not by the constraint itself.
+data Constraint =
+  -- | A key constraint
+  ConstraintKey KeyConstraint |
+  -- | A property existence constraint
+  ConstraintPropertyExistence PropertyExistenceConstraint |
+  -- | A property type constraint
+  ConstraintPropertyType PropertyTypeConstraint |
+  -- | A property uniqueness constraint
+  ConstraintPropertyUniqueness PropertyUniquenessConstraint
+  deriving (Eq, Ord, Read, Show)
+_Constraint = Core.Name "hydra.neo4j.model.Constraint"
+_Constraint_key = Core.Name "key"
+_Constraint_propertyExistence = Core.Name "propertyExistence"
+_Constraint_propertyType = Core.Name "propertyType"
+_Constraint_propertyUniqueness = Core.Name "propertyUniqueness"
+-- | A named constraint. The name is optional at authoring time; Neo4j auto-generates one if it is not supplied. The name is operational metadata (used to reference the constraint for dropping, idempotent creation, and reporting) and has no effect on what the constraint enforces.
+data ConstraintDefinition =
+  ConstraintDefinition {
+    -- | An optional name for the constraint
+    constraintDefinitionName :: (Maybe String),
+    -- | The constraint itself
+    constraintDefinitionBody :: Constraint}
+  deriving (Eq, Ord, Read, Show)
+_ConstraintDefinition = Core.Name "hydra.neo4j.model.ConstraintDefinition"
+_ConstraintDefinition_name = Core.Name "name"
+_ConstraintDefinition_body = Core.Name "body"
+-- | Either a node or a relationship; the common supertype of the two kinds of graph element. A bare union with no fields of its own: the id and properties live on each variant. Named Element (not Entity, the driver's interface name) to avoid the Neo4j docs' use of "entity" for a node's real-world referent, and to match hydra.pg.model and the root of elementId.
+data Element =
+  -- | The element is a node
+  ElementNode Node |
+  -- | The element is a relationship
+  ElementRelationship Relationship
+  deriving (Eq, Ord, Read, Show)
+_Element = Core.Name "hydra.neo4j.model.Element"
+_Element_node = Core.Name "node"
+_Element_relationship = Core.Name "relationship"
+-- | The element id of a node or relationship (the driver's String-valued elementId())
+newtype ElementId =
+  ElementId {
+    unElementId :: String}
+  deriving (Eq, Ord, Read, Show)
+_ElementId = Core.Name "hydra.neo4j.model.ElementId"
+-- | A Neo4j graph type: a holistic schema for a graph, made up of node element types and relationship element types (Neo4j's GRAPH TYPE feature).
+data GraphType =
+  GraphType {
+    -- | The node element types of the graph type
+    graphTypeNodes :: [NodeElementType],
+    -- | The relationship element types of the graph type
+    graphTypeRelationships :: [RelationshipElementType]}
+  deriving (Eq, Ord, Read, Show)
+_GraphType = Core.Name "hydra.neo4j.model.GraphType"
+_GraphType_nodes = Core.Name "nodes"
+_GraphType_relationships = Core.Name "relationships"
+-- | A temporal amount, following the Neo4j driver's IsoDuration. The four components are kept separate and non-normalized, since a month is not a fixed number of days.
+data IsoDuration =
+  IsoDuration {
+    -- | A number of months
+    isoDurationMonths :: I.Int64,
+    -- | A number of days
+    isoDurationDays :: I.Int64,
+    -- | A number of seconds
+    isoDurationSeconds :: I.Int64,
+    -- | A number of nanoseconds of the second
+    isoDurationNanoseconds :: Int}
+  deriving (Eq, Ord, Read, Show)
+_IsoDuration = Core.Name "hydra.neo4j.model.IsoDuration"
+_IsoDuration_months = Core.Name "months"
+_IsoDuration_days = Core.Name "days"
+_IsoDuration_seconds = Core.Name "seconds"
+_IsoDuration_nanoseconds = Core.Name "nanoseconds"
+-- | A key in a property map or value map. Used for all maps, following the driver's single key notion (MapAccessor.keys()/get(String key)); there is no distinct "property key" type.
+newtype Key =
+  Key {
+    unKey :: String}
+  deriving (Eq, Ord, Read, Show)
+_Key = Core.Name "hydra.neo4j.model.Key"
+-- | A key constraint: the listed properties must all exist and their combined values must be unique. Neo4j's primary-key analog, combining existence and uniqueness over a set of properties. Applies to a node label or a relationship type depending on where it is attached.
+data KeyConstraint =
+  KeyConstraint {
+    -- | The properties whose combination must exist and be unique
+    keyConstraintProperties :: [Key]}
+  deriving (Eq, Ord, Read, Show)
+_KeyConstraint = Core.Name "hydra.neo4j.model.KeyConstraint"
+_KeyConstraint_properties = Core.Name "properties"
+-- | A date without a time or time zone, following java.time.LocalDate (the driver's asLocalDate())
+data LocalDate =
+  LocalDate {
+    -- | The year
+    localDateYear :: Int,
+    -- | The month of the year
+    localDateMonth :: Int,
+    -- | The day of the month
+    localDateDay :: Int}
+  deriving (Eq, Ord, Read, Show)
+_LocalDate = Core.Name "hydra.neo4j.model.LocalDate"
+_LocalDate_year = Core.Name "year"
+_LocalDate_month = Core.Name "month"
+_LocalDate_day = Core.Name "day"
+-- | A date and time without a time zone, following java.time.LocalDateTime (the driver's asLocalDateTime())
+data LocalDateTime =
+  LocalDateTime {
+    -- | The date part
+    localDateTimeDate :: LocalDate,
+    -- | The time part
+    localDateTimeTime :: LocalTime}
+  deriving (Eq, Ord, Read, Show)
+_LocalDateTime = Core.Name "hydra.neo4j.model.LocalDateTime"
+_LocalDateTime_date = Core.Name "date"
+_LocalDateTime_time = Core.Name "time"
+-- | A time of day without a time zone, following java.time.LocalTime (the driver's asLocalTime())
+data LocalTime =
+  LocalTime {
+    -- | The hour of the day
+    localTimeHour :: Int,
+    -- | The minute of the hour
+    localTimeMinute :: Int,
+    -- | The second of the minute
+    localTimeSecond :: Int,
+    -- | The nanosecond of the second
+    localTimeNanosecond :: Int}
+  deriving (Eq, Ord, Read, Show)
+_LocalTime = Core.Name "hydra.neo4j.model.LocalTime"
+_LocalTime_hour = Core.Name "hour"
+_LocalTime_minute = Core.Name "minute"
+_LocalTime_second = Core.Name "second"
+_LocalTime_nanosecond = Core.Name "nanosecond"
+-- | The caller-supplied conversions a mapping between Hydra's property-graph model (hydra.pg.model) and this Neo4j model needs: a pair of partial functions converting property-graph values to and from Neo4j element ids, and another pair converting them to and from Neo4j property values. Errors are plain strings for now; once issue #518 generalizes the kernel Coder, these four fields collapse to two Coders. Failures (e.g. a value with no Neo4j representation) surface via the Either.
+data Neo4jMapping v =
+  Neo4jMapping {
+    -- | Encode a property-graph value as a Neo4j element id
+    neo4jMappingEncodeId :: (v -> Either String ElementId),
+    -- | Decode a Neo4j element id as a property-graph value
+    neo4jMappingDecodeId :: (ElementId -> Either String v),
+    -- | Encode a property-graph value as a Neo4j property value
+    neo4jMappingEncodeValue :: (v -> Either String Value),
+    -- | Decode a Neo4j property value as a property-graph value
+    neo4jMappingDecodeValue :: (Value -> Either String v)}
+_Neo4jMapping = Core.Name "hydra.neo4j.model.Neo4jMapping"
+_Neo4jMapping_encodeId = Core.Name "encodeId"
+_Neo4jMapping_decodeId = Core.Name "decodeId"
+_Neo4jMapping_encodeValue = Core.Name "encodeValue"
+_Neo4jMapping_decodeValue = Core.Name "decodeValue"
+-- | A node; a graph element with a set of labels and a map of properties
+data Node =
+  Node {
+    -- | The element id of the node
+    nodeId :: ElementId,
+    -- | The set of labels of the node (a node may have zero or more labels)
+    nodeLabels :: (S.Set NodeLabel),
+    -- | The properties of the node
+    nodeProperties :: (M.Map Key Value)}
+  deriving (Eq, Ord, Read, Show)
+_Node = Core.Name "hydra.neo4j.model.Node"
+_Node_id = Core.Name "id"
+_Node_labels = Core.Name "labels"
+_Node_properties = Core.Name "properties"
+-- | A node element type within a graph type: an identifying label, any implied labels it entails, and the constraints on its properties. A node's typed properties are expressed as property type constraints (and existence constraints for non-null ones), since Neo4j has no untyped property declaration.
+data NodeElementType =
+  NodeElementType {
+    -- | The identifying label of the node element type
+    nodeElementTypeIdentifyingLabel :: NodeLabel,
+    -- | Labels that a node of this type must also have (label implication)
+    nodeElementTypeImpliedLabels :: (S.Set NodeLabel),
+    -- | The constraints on nodes of this type
+    nodeElementTypeConstraints :: [ConstraintDefinition]}
+  deriving (Eq, Ord, Read, Show)
+_NodeElementType = Core.Name "hydra.neo4j.model.NodeElementType"
+_NodeElementType_identifyingLabel = Core.Name "identifyingLabel"
+_NodeElementType_impliedLabels = Core.Name "impliedLabels"
+_NodeElementType_constraints = Core.Name "constraints"
+-- | A label applied to a node. Nodes carry a set of labels; relationships have a single type (see RelationshipType), so there is no relationship-label concept.
+newtype NodeLabel =
+  NodeLabel {
+    unNodeLabel :: String}
+  deriving (Eq, Ord, Read, Show)
+_NodeLabel = Core.Name "hydra.neo4j.model.NodeLabel"
+-- | A time of day with a UTC offset, following java.time.OffsetTime (the driver's asOffsetTime()). Distinct from LocalTime by virtue of the offset.
+data OffsetTime =
+  OffsetTime {
+    -- | The local time
+    offsetTimeTime :: LocalTime,
+    -- | The offset from UTC
+    offsetTimeOffset :: ZoneOffset}
+  deriving (Eq, Ord, Read, Show)
+_OffsetTime = Core.Name "hydra.neo4j.model.OffsetTime"
+_OffsetTime_time = Core.Name "time"
+_OffsetTime_offset = Core.Name "offset"
+-- | A path through the graph: a start node followed by a sequence of segments. The node sequence is the start node followed by each segment's end node; a zero-length path has an empty segment list. Each segment carries full node and relationship objects, so a path is self-contained.
+data Path =
+  Path {
+    -- | The first node of the path
+    pathStart :: Node,
+    -- | The segments of the path, in order (empty for a zero-length path)
+    pathSegments :: [Segment]}
+  deriving (Eq, Ord, Read, Show)
+_Path = Core.Name "hydra.neo4j.model.Path"
+_Path_start = Core.Name "start"
+_Path_segments = Core.Name "segments"
+-- | A spatial point, following the Neo4j driver's Point. The coordinate reference system is given by the srid, which also determines the units and dimensionality: under WGS-84 (srid 4326/4979), x is longitude and y is latitude in decimal degrees and z is height in meters; under Cartesian (srid 7203/9157), the units are unspecified. A two-dimensional point omits z.
+data Point =
+  Point {
+    -- | The identifier of the coordinate reference system for this point
+    pointSrid :: SpatialReferenceIdentifier,
+    -- | The x coordinate (longitude under WGS-84)
+    pointX :: Double,
+    -- | The y coordinate (latitude under WGS-84)
+    pointY :: Double,
+    -- | The z coordinate (height under WGS-84); absent for a two-dimensional point
+    pointZ :: (Maybe Double)}
+  deriving (Eq, Ord, Read, Show)
+_Point = Core.Name "hydra.neo4j.model.Point"
+_Point_srid = Core.Name "srid"
+_Point_x = Core.Name "x"
+_Point_y = Core.Name "y"
+_Point_z = Core.Name "z"
+-- | A property existence constraint: the given property must exist (be non-null).
+data PropertyExistenceConstraint =
+  PropertyExistenceConstraint {
+    -- | The property that must exist
+    propertyExistenceConstraintProperty :: Key}
+  deriving (Eq, Ord, Read, Show)
+_PropertyExistenceConstraint = Core.Name "hydra.neo4j.model.PropertyExistenceConstraint"
+_PropertyExistenceConstraint_property = Core.Name "property"
+-- | A property type constraint: the given property must have the given value type.
+data PropertyTypeConstraint =
+  PropertyTypeConstraint {
+    -- | The property that is constrained
+    propertyTypeConstraintProperty :: Key,
+    -- | The type the property's value must have
+    propertyTypeConstraintType :: ValueType}
+  deriving (Eq, Ord, Read, Show)
+_PropertyTypeConstraint = Core.Name "hydra.neo4j.model.PropertyTypeConstraint"
+_PropertyTypeConstraint_property = Core.Name "property"
+_PropertyTypeConstraint_type = Core.Name "type"
+-- | A property uniqueness constraint: the combined values of the listed properties must be unique. Unlike a key constraint, it does not require the properties to exist.
+data PropertyUniquenessConstraint =
+  PropertyUniquenessConstraint {
+    -- | The properties whose combined values must be unique
+    propertyUniquenessConstraintProperties :: [Key]}
+  deriving (Eq, Ord, Read, Show)
+_PropertyUniquenessConstraint = Core.Name "hydra.neo4j.model.PropertyUniquenessConstraint"
+_PropertyUniquenessConstraint_properties = Core.Name "properties"
+-- | A relationship; a directed graph element with a single type, connecting a start node to an end node. Relationships are always stored directed; undirected traversal is a query-level concern.
+data Relationship =
+  Relationship {
+    -- | The element id of the relationship
+    relationshipId :: ElementId,
+    -- | The properties of the relationship
+    relationshipProperties :: (M.Map Key Value),
+    -- | The type of the relationship
+    relationshipType :: RelationshipType,
+    -- | The element id of the start node
+    relationshipStart :: ElementId,
+    -- | The element id of the end node
+    relationshipEnd :: ElementId}
+  deriving (Eq, Ord, Read, Show)
+_Relationship = Core.Name "hydra.neo4j.model.Relationship"
+_Relationship_id = Core.Name "id"
+_Relationship_properties = Core.Name "properties"
+_Relationship_type = Core.Name "type"
+_Relationship_start = Core.Name "start"
+_Relationship_end = Core.Name "end"
+-- | A relationship element type within a graph type: a relationship type, the node labels it may connect, and the constraints on its properties.
+data RelationshipElementType =
+  RelationshipElementType {
+    -- | The relationship type
+    relationshipElementTypeType :: RelationshipType,
+    -- | The label of the start node
+    relationshipElementTypeStartLabel :: NodeLabel,
+    -- | The label of the end node
+    relationshipElementTypeEndLabel :: NodeLabel,
+    -- | The constraints on relationships of this type
+    relationshipElementTypeConstraints :: [ConstraintDefinition]}
+  deriving (Eq, Ord, Read, Show)
+_RelationshipElementType = Core.Name "hydra.neo4j.model.RelationshipElementType"
+_RelationshipElementType_type = Core.Name "type"
+_RelationshipElementType_startLabel = Core.Name "startLabel"
+_RelationshipElementType_endLabel = Core.Name "endLabel"
+_RelationshipElementType_constraints = Core.Name "constraints"
+-- | The type of a relationship. A relationship has exactly one type.
+newtype RelationshipType =
+  RelationshipType {
+    unRelationshipType :: String}
+  deriving (Eq, Ord, Read, Show)
+_RelationshipType = Core.Name "hydra.neo4j.model.RelationshipType"
+-- | One step of a path: a relationship and the node it arrives at. The segment's implicit start is the previous segment's end node, or the path's start node for the first segment, so it is not stored here.
+data Segment =
+  Segment {
+    -- | The relationship traversed in this segment
+    segmentRelationship :: Relationship,
+    -- | The node this segment arrives at
+    segmentEnd :: Node}
+  deriving (Eq, Ord, Read, Show)
+_Segment = Core.Name "hydra.neo4j.model.Segment"
+_Segment_relationship = Core.Name "relationship"
+_Segment_end = Core.Name "end"
+-- | A spatial reference identifier (SRID): an integer naming the coordinate reference system in which a point's coordinates are expressed. Neo4j supports four: WGS-84 (4326), WGS-84 3D (4979), Cartesian (7203), and Cartesian 3D (9157).
+newtype SpatialReferenceIdentifier =
+  SpatialReferenceIdentifier {
+    unSpatialReferenceIdentifier :: Int}
+  deriving (Eq, Ord, Read, Show)
+_SpatialReferenceIdentifier = Core.Name "hydra.neo4j.model.SpatialReferenceIdentifier"
+-- | A Neo4j value: the general container for instance data, analogous to Hydra's Term. It can represent anything the driver's Value can be (the full TypeSystem), including structural and result-shaped values such as maps, nodes, relationships, paths, and null. Which values are valid as a stored property is a schema/validation concern, not a restriction on Value itself.
+data Value =
+  -- | A boolean value
+  ValueBoolean Bool |
+  -- | A byte array
+  ValueBytes B.ByteString |
+  -- | A date
+  ValueDate LocalDate |
+  -- | A date and time with a zone
+  ValueDateTime ZonedDateTime |
+  -- | A temporal amount
+  ValueDuration IsoDuration |
+  -- | A 64-bit floating-point number
+  ValueFloat Double |
+  -- | A 64-bit integer
+  ValueInteger I.Int64 |
+  -- | A list of values
+  ValueList [Value] |
+  -- | A date and time without a zone
+  ValueLocalDateTime LocalDateTime |
+  -- | A time of day without a zone
+  ValueLocalTime LocalTime |
+  -- | A map from keys to values
+  ValueMap (M.Map Key Value) |
+  -- | A node
+  ValueNode Node |
+  -- | A null value
+  ValueNull |
+  -- | A path
+  ValuePath Path |
+  -- | A spatial point
+  ValuePoint Point |
+  -- | A relationship
+  ValueRelationship Relationship |
+  -- | A string value
+  ValueString String |
+  -- | A time of day with a UTC offset
+  ValueTime OffsetTime
+  deriving (Eq, Ord, Read, Show)
+_Value = Core.Name "hydra.neo4j.model.Value"
+_Value_boolean = Core.Name "boolean"
+_Value_bytes = Core.Name "bytes"
+_Value_date = Core.Name "date"
+_Value_dateTime = Core.Name "dateTime"
+_Value_duration = Core.Name "duration"
+_Value_float = Core.Name "float"
+_Value_integer = Core.Name "integer"
+_Value_list = Core.Name "list"
+_Value_localDateTime = Core.Name "localDateTime"
+_Value_localTime = Core.Name "localTime"
+_Value_map = Core.Name "map"
+_Value_node = Core.Name "node"
+_Value_null = Core.Name "null"
+_Value_path = Core.Name "path"
+_Value_point = Core.Name "point"
+_Value_relationship = Core.Name "relationship"
+_Value_string = Core.Name "string"
+_Value_time = Core.Name "time"
+-- | A Neo4j property type, as used in property type constraints and graph type property declarations (the IS :: <TYPE> expression language). Atoms mirror the scalar, temporal, and spatial kinds of Value; lists, vectors, and closed unions compose them.
+data ValueType =
+  -- | The BOOLEAN type
+  ValueTypeBoolean |
+  -- | The STRING type
+  ValueTypeString |
+  -- | The INTEGER type
+  ValueTypeInteger |
+  -- | The FLOAT type
+  ValueTypeFloat |
+  -- | The DATE type
+  ValueTypeDate |
+  -- | The LOCAL TIME type
+  ValueTypeLocalTime |
+  -- | The ZONED TIME type
+  ValueTypeZonedTime |
+  -- | The LOCAL DATETIME type
+  ValueTypeLocalDateTime |
+  -- | The ZONED DATETIME type
+  ValueTypeZonedDateTime |
+  -- | The DURATION type
+  ValueTypeDuration |
+  -- | The POINT type
+  ValueTypePoint |
+  -- | A LIST type, with the given element type
+  ValueTypeList ValueType |
+  -- | A VECTOR type, with an element type and a dimension
+  ValueTypeVector VectorType |
+  -- | A closed union of the given types
+  ValueTypeUnion [ValueType]
+  deriving (Eq, Ord, Read, Show)
+_ValueType = Core.Name "hydra.neo4j.model.ValueType"
+_ValueType_boolean = Core.Name "boolean"
+_ValueType_string = Core.Name "string"
+_ValueType_integer = Core.Name "integer"
+_ValueType_float = Core.Name "float"
+_ValueType_date = Core.Name "date"
+_ValueType_localTime = Core.Name "localTime"
+_ValueType_zonedTime = Core.Name "zonedTime"
+_ValueType_localDateTime = Core.Name "localDateTime"
+_ValueType_zonedDateTime = Core.Name "zonedDateTime"
+_ValueType_duration = Core.Name "duration"
+_ValueType_point = Core.Name "point"
+_ValueType_list = Core.Name "list"
+_ValueType_vector = Core.Name "vector"
+_ValueType_union = Core.Name "union"
+-- | A Neo4j VECTOR type: an element type and a fixed dimension.
+data VectorType =
+  VectorType {
+    -- | The element type of the vector
+    vectorTypeElement :: ValueType,
+    -- | The dimension (length) of the vector
+    vectorTypeDimension :: Int}
+  deriving (Eq, Ord, Read, Show)
+_VectorType = Core.Name "hydra.neo4j.model.VectorType"
+_VectorType_element = Core.Name "element"
+_VectorType_dimension = Core.Name "dimension"
+-- | A time-zone identifier, following java.time.ZoneId: an IANA region id such as "Europe/Paris" (it may also be a fixed-offset string).
+newtype ZoneId =
+  ZoneId {
+    unZoneId :: String}
+  deriving (Eq, Ord, Read, Show)
+_ZoneId = Core.Name "hydra.neo4j.model.ZoneId"
+-- | An offset from UTC, following java.time.ZoneOffset, expressed as a total number of seconds (for example, +01:00 is 3600).
+newtype ZoneOffset =
+  ZoneOffset {
+    unZoneOffset :: Int}
+  deriving (Eq, Ord, Read, Show)
+_ZoneOffset = Core.Name "hydra.neo4j.model.ZoneOffset"
+-- | A date and time with a time zone, following java.time.ZonedDateTime (the driver's asZonedDateTime()). It keeps both the resolved offset and the zone: the zone determines the offset rules, while the offset is the concrete UTC delta at this instant.
+data ZonedDateTime =
+  ZonedDateTime {
+    -- | The local date and time
+    zonedDateTimeDateTime :: LocalDateTime,
+    -- | The resolved offset from UTC at this instant
+    zonedDateTimeOffset :: ZoneOffset,
+    -- | The time zone
+    zonedDateTimeZone :: ZoneId}
+  deriving (Eq, Ord, Read, Show)
+_ZonedDateTime = Core.Name "hydra.neo4j.model.ZonedDateTime"
+_ZonedDateTime_dateTime = Core.Name "dateTime"
+_ZonedDateTime_offset = Core.Name "offset"
+_ZonedDateTime_zone = Core.Name "zone"
diff --git a/src/main/haskell/Hydra/Neo4j/Pg.hs b/src/main/haskell/Hydra/Neo4j/Pg.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Neo4j/Pg.hs
@@ -0,0 +1,91 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A mapping between Hydra's property-graph model (hydra.pg.model, TinkerPop-shaped) and the Neo4j model (hydra.neo4j.model). It is not an isomorphism and not invertible: ids and values are bridged by caller-supplied conversions (Neo4jMapping); a Neo4j relationship type expands into a property-graph edge label conditionally on the schema; and multi-label nodes, which Hydra's single-label vertices cannot represent, are rejected.
+
+module Hydra.Neo4j.Pg where
+import qualified Hydra.Core as Core
+import qualified Hydra.Formatting as Formatting
+import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers
+import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets
+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings
+import qualified Hydra.Neo4j.Model as Neo4jModel
+import qualified Hydra.Pg.Model as PgModel
+import qualified Hydra.Util as Util
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Compute the property-graph edge label for a Neo4j relationship type, given the schema and endpoint labels.
+edgeLabelForRelationship :: Neo4jModel.GraphType -> Neo4jModel.NodeLabel -> Neo4jModel.NodeLabel -> Neo4jModel.RelationshipType -> PgModel.EdgeLabel
+edgeLabelForRelationship gt startLabel endLabel relType =
+
+      let typeStr = Neo4jModel.unRelationshipType relType
+          matching =
+                  Lists.filter (\ret -> Equality.equal (Neo4jModel.unRelationshipType (Neo4jModel.relationshipElementTypeType ret)) typeStr) (Neo4jModel.graphTypeRelationships gt)
+          camelType = Formatting.convertCase Util.CaseConventionUpperSnake Util.CaseConventionCamel typeStr
+          startStr = Neo4jModel.unNodeLabel startLabel
+          endStr = Neo4jModel.unNodeLabel endLabel
+          expanded =
+                  Strings.cat [
+                    Formatting.decapitalize (Formatting.convertCase Util.CaseConventionPascal Util.CaseConventionCamel startStr),
+                    (Formatting.capitalize camelType),
+                    (Formatting.capitalize (Formatting.convertCase Util.CaseConventionPascal Util.CaseConventionCamel endStr))]
+      in (PgModel.EdgeLabel (Logic.ifElse (Equality.gt (Lists.length matching) 1) expanded camelType))
+-- | Convert a property-graph edge to a Neo4j relationship (edge label -> UPPER_SNAKE type).
+edgeToRelationship :: Neo4jModel.Neo4jMapping t0 -> PgModel.Edge t0 -> Either String Neo4jModel.Relationship
+edgeToRelationship mapping edge =
+    Eithers.bind (Neo4jModel.neo4jMappingEncodeId mapping (PgModel.edgeId edge)) (\eid -> Eithers.bind (Neo4jModel.neo4jMappingEncodeId mapping (PgModel.edgeOut edge)) (\startId -> Eithers.bind (Neo4jModel.neo4jMappingEncodeId mapping (PgModel.edgeIn edge)) (\endId -> Eithers.bind ((\mapping2 -> \props -> Eithers.map (\pairs -> Maps.fromList pairs) (Eithers.mapList (\entry -> Eithers.map (\encoded -> (Neo4jModel.Key (PgModel.unPropertyKey (Pairs.first entry)), encoded)) (Neo4jModel.neo4jMappingEncodeValue mapping2 (Pairs.second entry))) (Maps.toList props))) mapping (PgModel.edgeProperties edge)) (\props -> Right (Neo4jModel.Relationship {
+      Neo4jModel.relationshipId = eid,
+      Neo4jModel.relationshipProperties = props,
+      Neo4jModel.relationshipType = (Neo4jModel.RelationshipType (Formatting.convertCase Util.CaseConventionCamel Util.CaseConventionUpperSnake (PgModel.unEdgeLabel (PgModel.edgeLabel edge)))),
+      Neo4jModel.relationshipStart = startId,
+      Neo4jModel.relationshipEnd = endId})))))
+-- | Convert a whole property-graph Graph to a Neo4j graph (nodes and relationships).
+graphToNeo4j :: Ord t0 => (Neo4jModel.Neo4jMapping t0 -> PgModel.Graph t0 -> Either String ([Neo4jModel.Node], [Neo4jModel.Relationship]))
+graphToNeo4j mapping graph =
+    Eithers.bind (Eithers.mapList (\v -> vertexToNode mapping v) (Maps.elems (PgModel.graphVertices graph))) (\nodes -> Eithers.bind (Eithers.mapList (\e -> edgeToRelationship mapping e) (Maps.elems (PgModel.graphEdges graph))) (\rels -> Right (nodes, rels)))
+-- | Convert a Neo4j graph (nodes and relationships) to property-graph vertices and edges against a GraphType.
+neo4jToGraph :: Neo4jModel.Neo4jMapping t0 -> Neo4jModel.GraphType -> [Neo4jModel.Node] -> [Neo4jModel.Relationship] -> Either String ([PgModel.Vertex t0], [PgModel.Edge t0])
+neo4jToGraph mapping gt nodes rels =
+
+      let labelOf =
+              (\nodes2 -> \eid ->
+                let m =
+                        Maps.fromList (Lists.map (\n -> (Neo4jModel.unElementId (Neo4jModel.nodeId n), (Sets.toList (Neo4jModel.nodeLabels n)))) nodes2)
+                in (Optionals.cases (Maps.lookup (Neo4jModel.unElementId eid) m) (Left (Strings.cat [
+                  "no node with id ",
+                  (Neo4jModel.unElementId eid)])) (\labels -> Logic.ifElse (Equality.equal (Lists.length labels) 1) (Right (Optionals.fromOptional (Neo4jModel.NodeLabel "") (Lists.maybeHead labels))) (Left (Strings.cat [
+                  "endpoint node is not single-labeled: ",
+                  (Neo4jModel.unElementId eid)]))))) nodes
+      in (Eithers.bind (Eithers.mapList (\n -> nodeToVertex mapping n) nodes) (\vertices -> Eithers.bind (Eithers.mapList (\r -> Eithers.bind (labelOf (Neo4jModel.relationshipStart r)) (\startLabel -> Eithers.bind (labelOf (Neo4jModel.relationshipEnd r)) (\endLabel -> relationshipToEdge mapping gt startLabel endLabel r))) rels) (\edges -> Right (vertices, edges))))
+-- | Convert a Neo4j node to a property-graph vertex; fails on a multi-label node.
+nodeToVertex :: Neo4jModel.Neo4jMapping t0 -> Neo4jModel.Node -> Either String (PgModel.Vertex t0)
+nodeToVertex mapping node =
+
+      let labels = Sets.toList (Neo4jModel.nodeLabels node)
+          soleLabel = Optionals.fromOptional (Neo4jModel.NodeLabel "") (Lists.maybeHead labels)
+      in (Logic.ifElse (Equality.equal (Lists.length labels) 1) (Eithers.bind (Neo4jModel.neo4jMappingDecodeId mapping (Neo4jModel.nodeId node)) (\vid -> Eithers.bind ((\mapping2 -> \props -> Eithers.map (\pairs -> Maps.fromList pairs) (Eithers.mapList (\entry -> Eithers.map (\decoded -> (PgModel.PropertyKey (Neo4jModel.unKey (Pairs.first entry)), decoded)) (Neo4jModel.neo4jMappingDecodeValue mapping2 (Pairs.second entry))) (Maps.toList props))) mapping (Neo4jModel.nodeProperties node)) (\props -> Right (PgModel.Vertex {
+        PgModel.vertexLabel = (PgModel.VertexLabel (Neo4jModel.unNodeLabel soleLabel)),
+        PgModel.vertexId = vid,
+        PgModel.vertexProperties = props})))) (Left (Strings.cat [
+        "cannot map a multi-label Neo4j node to a single-label property-graph vertex: ",
+        (Neo4jModel.unElementId (Neo4jModel.nodeId node))])))
+-- | Convert a Neo4j relationship to a property-graph edge, expanding the type via the schema and endpoint labels.
+relationshipToEdge :: Neo4jModel.Neo4jMapping t0 -> Neo4jModel.GraphType -> Neo4jModel.NodeLabel -> Neo4jModel.NodeLabel -> Neo4jModel.Relationship -> Either String (PgModel.Edge t0)
+relationshipToEdge mapping gt startLabel endLabel rel =
+    Eithers.bind (Neo4jModel.neo4jMappingDecodeId mapping (Neo4jModel.relationshipId rel)) (\eid -> Eithers.bind (Neo4jModel.neo4jMappingDecodeId mapping (Neo4jModel.relationshipStart rel)) (\outId -> Eithers.bind (Neo4jModel.neo4jMappingDecodeId mapping (Neo4jModel.relationshipEnd rel)) (\inId -> Eithers.bind ((\mapping2 -> \props -> Eithers.map (\pairs -> Maps.fromList pairs) (Eithers.mapList (\entry -> Eithers.map (\decoded -> (PgModel.PropertyKey (Neo4jModel.unKey (Pairs.first entry)), decoded)) (Neo4jModel.neo4jMappingDecodeValue mapping2 (Pairs.second entry))) (Maps.toList props))) mapping (Neo4jModel.relationshipProperties rel)) (\props -> Right (PgModel.Edge {
+      PgModel.edgeLabel = (edgeLabelForRelationship gt startLabel endLabel (Neo4jModel.relationshipType rel)),
+      PgModel.edgeId = eid,
+      PgModel.edgeOut = outId,
+      PgModel.edgeIn = inId,
+      PgModel.edgeProperties = props})))))
+-- | Convert a property-graph vertex to a Neo4j node (single label -> singleton label set).
+vertexToNode :: Neo4jModel.Neo4jMapping t0 -> PgModel.Vertex t0 -> Either String Neo4jModel.Node
+vertexToNode mapping vertex =
+    Eithers.bind (Neo4jModel.neo4jMappingEncodeId mapping (PgModel.vertexId vertex)) (\eid -> Eithers.bind ((\mapping2 -> \props -> Eithers.map (\pairs -> Maps.fromList pairs) (Eithers.mapList (\entry -> Eithers.map (\encoded -> (Neo4jModel.Key (PgModel.unPropertyKey (Pairs.first entry)), encoded)) (Neo4jModel.neo4jMappingEncodeValue mapping2 (Pairs.second entry))) (Maps.toList props))) mapping (PgModel.vertexProperties vertex)) (\props -> Right (Neo4jModel.Node {
+      Neo4jModel.nodeId = eid,
+      Neo4jModel.nodeLabels = (Sets.singleton (Neo4jModel.NodeLabel (PgModel.unVertexLabel (PgModel.vertexLabel vertex)))),
+      Neo4jModel.nodeProperties = props})))
diff --git a/src/main/haskell/Hydra/Pg/Coder.hs b/src/main/haskell/Hydra/Pg/Coder.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/Coder.hs
@@ -0,0 +1,411 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Property graph element coders for mapping Hydra terms to property graph elements
+
+module Hydra.Pg.Coder where
+import qualified Hydra.Annotations as Annotations
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.Extract.Core as ExtractCore
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Json.Model as JsonModel
+import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers
+import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets
+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Pg.Mapping as Mapping
+import qualified Hydra.Pg.Model as PgModel
+import qualified Hydra.Pg.TermsToElements as TermsToElements
+import qualified Hydra.Query as Query
+import qualified Hydra.Relational as Relational
+import qualified Hydra.Resolution as Resolution
+import qualified Hydra.Strip as Strip
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Map as M
+-- | Check a condition, returning an error if false
+check :: Bool -> Either t0 () -> Either t0 ()
+check b e = Logic.ifElse b (Right ()) e
+-- | Check that a record name matches the expected name
+checkRecordName :: Core.Name -> Core.Name -> Either Errors.Error ()
+checkRecordName expected actual =
+    check (Logic.or (Equality.equal (Core.unName expected) "placeholder") (Equality.equal (Core.unName actual) (Core.unName expected))) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 (Strings.cat2 (Strings.cat2 "Expected record of type " (Core.unName expected)) ", found record of type ") (Core.unName actual)))))
+-- | Construct an edge coder from components
+constructEdgeCoder :: Typing.InferenceContext -> Graph.Graph -> PgModel.VertexLabel -> Mapping.Schema t0 t1 t2 Errors.Error -> Core.Type -> t1 -> t1 -> PgModel.Direction -> Core.Name -> [Core.FieldType] -> [Coders.Adapter Core.FieldType (PgModel.PropertyType t1) Core.Field (PgModel.Property t2) Errors.Error] -> Maybe (Core.FieldType, (Mapping.ValueSpec, (Maybe String))) -> Maybe (Core.FieldType, (Mapping.ValueSpec, (Maybe String))) -> Either Errors.Error (Coders.Adapter Core.Type (PgModel.ElementTypeTree t1) Core.Term (PgModel.ElementTree t2) Errors.Error)
+constructEdgeCoder cx g parentLabel schema source vidType eidType dir name fields propAdapters mOutSpec mInSpec =
+    Eithers.bind (findLabelString cx g source name (Core.Name (Mapping.annotationSchemaEdgeLabel (Mapping.schemaAnnotations schema)))) (\labelStr ->
+      let label = PgModel.EdgeLabel labelStr
+          vertexIdsSchema = Mapping.schemaVertexIds schema
+      in (Eithers.bind (edgeIdAdapter cx g schema eidType name (Core.Name (Mapping.annotationSchemaEdgeId (Mapping.schemaAnnotations schema))) fields) (\idAdapter -> Eithers.bind (Optionals.cases mOutSpec (Right Nothing) (\s -> Eithers.map (\x -> Just x) (projectionAdapter cx g vidType vertexIdsSchema s "out"))) (\outIdAdapter -> Eithers.bind (Optionals.cases mInSpec (Right Nothing) (\s -> Eithers.map (\x -> Just x) (projectionAdapter cx g vidType vertexIdsSchema s "in"))) (\inIdAdapter -> Eithers.bind (Optionals.cases mOutSpec (Right Nothing) (\s -> Eithers.map (\x -> Just x) (findIncidentVertexAdapter cx g schema vidType eidType s))) (\outVertexAdapter -> Eithers.bind (Optionals.cases mInSpec (Right Nothing) (\s -> Eithers.map (\x -> Just x) (findIncidentVertexAdapter cx g schema vidType eidType s))) (\inVertexAdapter ->
+        let vertexAdapters =
+                Optionals.cat [
+                  outVertexAdapter,
+                  inVertexAdapter]
+        in (Eithers.bind (Optionals.cases mOutSpec (Right parentLabel) (\spec -> Optionals.cases (Pairs.second (Pairs.second spec)) (Left (Errors.ErrorOther (Errors.OtherError "no out-vertex label"))) (\a -> Right (PgModel.VertexLabel a)))) (\outLabel -> Eithers.bind (Optionals.cases mInSpec (Right parentLabel) (\spec -> Optionals.cases (Pairs.second (Pairs.second spec)) (Left (Errors.ErrorOther (Errors.OtherError "no in-vertex label"))) (\a -> Right (PgModel.VertexLabel a)))) (\inLabel -> Right (edgeCoder g dir schema source eidType name label outLabel inLabel idAdapter outIdAdapter inIdAdapter propAdapters vertexAdapters)))))))))))
+-- | Construct a vertex coder from components
+constructVertexCoder :: Typing.InferenceContext -> Graph.Graph -> Mapping.Schema t0 t1 t2 Errors.Error -> Core.Type -> t1 -> t1 -> Core.Name -> [Core.FieldType] -> [Coders.Adapter Core.FieldType (PgModel.PropertyType t1) Core.Field (PgModel.Property t2) Errors.Error] -> Either Errors.Error (Coders.Adapter Core.Type (PgModel.ElementTypeTree t1) Core.Term (PgModel.ElementTree t2) Errors.Error)
+constructVertexCoder cx g schema source vidType eidType name fields propAdapters =
+    Eithers.bind (findLabelString cx g source name (Core.Name (Mapping.annotationSchemaVertexLabel (Mapping.schemaAnnotations schema)))) (\labelStr ->
+      let label = PgModel.VertexLabel labelStr
+      in (Eithers.bind (vertexIdAdapter cx g schema vidType name (Core.Name (Mapping.annotationSchemaVertexId (Mapping.schemaAnnotations schema))) fields) (\idAdapter -> Eithers.bind (findAdjacenEdgeAdapters cx g schema vidType eidType label PgModel.DirectionOut fields) (\outEdgeAdapters -> Eithers.bind (findAdjacenEdgeAdapters cx g schema vidType eidType label PgModel.DirectionIn fields) (\inEdgeAdapters -> Right (vertexCoder g schema source vidType name label idAdapter propAdapters (Lists.concat2 outEdgeAdapters inEdgeAdapters)))))))
+-- | Create an edge coder given all components
+edgeCoder :: t0 -> PgModel.Direction -> Mapping.Schema t1 t2 t3 Errors.Error -> t4 -> t5 -> Core.Name -> PgModel.EdgeLabel -> PgModel.VertexLabel -> PgModel.VertexLabel -> Maybe (Core.Name, (Coders.Adapter t6 t7 Core.Term t3 Errors.Error)) -> Maybe (Core.Name, (Coders.Adapter t8 t9 Core.Term t3 Errors.Error)) -> Maybe (Core.Name, (Coders.Adapter t10 t11 Core.Term t3 Errors.Error)) -> [Coders.Adapter Core.FieldType (PgModel.PropertyType t5) Core.Field (PgModel.Property t3) Errors.Error] -> [(Core.Name, (Coders.Adapter t12 t13 Core.Term (PgModel.ElementTree t3) Errors.Error))] -> Coders.Adapter t4 (PgModel.ElementTypeTree t5) Core.Term (PgModel.ElementTree t3) Errors.Error
+edgeCoder g dir schema source eidType tname label outLabel inLabel mIdAdapter outAdapter inAdapter propAdapters vertexAdapters =
+
+      let et =
+              PgModel.EdgeType {
+                PgModel.edgeTypeLabel = label,
+                PgModel.edgeTypeId = eidType,
+                PgModel.edgeTypeOut = outLabel,
+                PgModel.edgeTypeIn = inLabel,
+                PgModel.edgeTypeProperties = (propertyTypes propAdapters)}
+      in Coders.Adapter {
+        Coders.adapterIsLossy = True,
+        Coders.adapterSource = source,
+        Coders.adapterTarget = (elementTypeTreeEdge et []),
+        Coders.adapterCoder = Coders.Coder {
+          Coders.coderEncode = (\term ->
+            let deannot = Strip.deannotateTerm term
+                unwrapped =
+                        case deannot of
+                          Core.TermOptional v0 -> Optionals.fromOptional deannot v0
+                          _ -> deannot
+                rec =
+                        case unwrapped of
+                          Core.TermRecord v0 -> v0
+            in (Eithers.bind (checkRecordName tname (Core.recordTypeName rec)) (\_chk ->
+              let fieldsm = Resolution.fieldMap (Core.recordFields rec)
+              in (Eithers.bind (Optionals.cases mIdAdapter (Right (Mapping.schemaDefaultEdgeId schema)) (selectEdgeId fieldsm)) (\edgeId -> Eithers.bind (encodeProperties fieldsm propAdapters) (\props ->
+                let getVertexId =
+                        \dirCheck -> \adapter -> Optionals.cases (Logic.ifElse (Equality.equal dir dirCheck) Nothing adapter) (Right (Mapping.schemaDefaultVertexId schema)) (selectVertexId fieldsm)
+                in (Eithers.bind (getVertexId PgModel.DirectionOut outAdapter) (\outId -> Eithers.bind (getVertexId PgModel.DirectionIn inAdapter) (\inId -> Eithers.bind (Eithers.map (\xs -> Optionals.cat xs) (Eithers.mapList (\va ->
+                  let fname = Pairs.first va
+                      ad = Pairs.second va
+                  in (Optionals.cases (Maps.lookup fname fieldsm) (Right Nothing) (\fterm -> Eithers.map (\x -> Just x) (Coders.coderEncode (Coders.adapterCoder ad) fterm)))) vertexAdapters)) (\deps -> Right (elementTreeEdge (PgModel.Edge {
+                  PgModel.edgeLabel = label,
+                  PgModel.edgeId = edgeId,
+                  PgModel.edgeOut = outId,
+                  PgModel.edgeIn = inId,
+                  PgModel.edgeProperties = props}) deps))))))))))),
+          Coders.coderDecode = (\_ -> Left (Errors.ErrorOther (Errors.OtherError "edge decoding is not yet supported")))}}
+-- | Create an edge id adapter
+edgeIdAdapter :: t0 -> t1 -> Mapping.Schema t2 t3 t4 Errors.Error -> t5 -> Core.Name -> Core.Name -> [Core.FieldType] -> Either Errors.Error (Maybe (Core.Name, (Coders.Adapter Core.Type t5 Core.Term t4 Errors.Error)))
+edgeIdAdapter cx g schema eidType name idKey fields =
+    Eithers.bind (findIdProjectionSpec cx False name idKey fields) (\mIdSpec -> Optionals.cases mIdSpec (Right Nothing) (\idSpec -> Eithers.map (\x -> Just x) (projectionAdapter cx g eidType (Mapping.schemaEdgeIds schema) idSpec "id")))
+-- | Construct an element adapter for a given type, interpreting it either as a vertex specification or an edge specification
+elementCoder :: Maybe (PgModel.Direction, PgModel.VertexLabel) -> Mapping.Schema t0 t1 t2 Errors.Error -> Core.Type -> t1 -> t1 -> Typing.InferenceContext -> Graph.Graph -> Either Errors.Error (Coders.Adapter Core.Type (PgModel.ElementTypeTree t1) Core.Term (PgModel.ElementTree t2) Errors.Error)
+elementCoder mparent schema source vidType eidType cx g =
+
+      let dir = Optionals.cases mparent PgModel.DirectionBoth (\p -> Pairs.first p)
+          parentLabel = Optionals.cases mparent (PgModel.VertexLabel "NOLABEL") (\p -> Pairs.second p)
+      in case (Strip.deannotateType source) of
+        Core.TypeOptional v0 -> elementCoder mparent schema v0 vidType eidType cx g
+        Core.TypeRecord v0 ->
+          let name = Core.Name "placeholder"
+              outVertexKey = Core.Name (Mapping.annotationSchemaOutVertex (Mapping.schemaAnnotations schema))
+              outVertexLabelKey = Core.Name (Mapping.annotationSchemaOutVertexLabel (Mapping.schemaAnnotations schema))
+              inVertexKey = Core.Name (Mapping.annotationSchemaInVertex (Mapping.schemaAnnotations schema))
+              inVertexLabelKey = Core.Name (Mapping.annotationSchemaInVertexLabel (Mapping.schemaAnnotations schema))
+          in (Eithers.bind (findProjectionSpec cx g name outVertexKey outVertexLabelKey v0) (\mOutSpec -> Eithers.bind (findProjectionSpec cx g name inVertexKey inVertexLabelKey v0) (\mInSpec ->
+            let kind = Logic.ifElse (hasVertexAdapters dir mOutSpec mInSpec) PgModel.ElementKindEdge PgModel.ElementKindVertex
+            in (Eithers.bind (findPropertySpecs cx g schema kind v0) (\propSpecs -> Eithers.bind (Eithers.mapList (propertyAdapter cx g schema) propSpecs) (\propAdapters -> case kind of
+              PgModel.ElementKindVertex -> constructVertexCoder cx g schema source vidType eidType name v0 propAdapters
+              PgModel.ElementKindEdge -> constructEdgeCoder cx g parentLabel schema source vidType eidType dir name v0 propAdapters mOutSpec mInSpec))))))
+        _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 (Strings.cat2 (Strings.cat2 "Expected " "record type") ", found: ") "other type")))
+-- | Create an element tree for an edge
+elementTreeEdge :: PgModel.Edge t0 -> [PgModel.ElementTree t0] -> PgModel.ElementTree t0
+elementTreeEdge edge deps =
+    PgModel.ElementTree {
+      PgModel.elementTreeSelf = (PgModel.ElementEdge edge),
+      PgModel.elementTreeDependencies = deps}
+-- | Create an element tree for a vertex
+elementTreeVertex :: PgModel.Vertex t0 -> [PgModel.ElementTree t0] -> PgModel.ElementTree t0
+elementTreeVertex vertex deps =
+    PgModel.ElementTree {
+      PgModel.elementTreeSelf = (PgModel.ElementVertex vertex),
+      PgModel.elementTreeDependencies = deps}
+-- | Create an element type tree for an edge type
+elementTypeTreeEdge :: PgModel.EdgeType t0 -> [PgModel.ElementTypeTree t0] -> PgModel.ElementTypeTree t0
+elementTypeTreeEdge etype deps =
+    PgModel.ElementTypeTree {
+      PgModel.elementTypeTreeSelf = (PgModel.ElementTypeEdge etype),
+      PgModel.elementTypeTreeDependencies = deps}
+-- | Create an element type tree for a vertex type
+elementTypeTreeVertex :: PgModel.VertexType t0 -> [PgModel.ElementTypeTree t0] -> PgModel.ElementTypeTree t0
+elementTypeTreeVertex vtype deps =
+    PgModel.ElementTypeTree {
+      PgModel.elementTypeTreeSelf = (PgModel.ElementTypeVertex vtype),
+      PgModel.elementTypeTreeDependencies = deps}
+-- | Encode all properties from a field map using property adapters
+encodeProperties :: M.Map Core.Name Core.Term -> [Coders.Adapter Core.FieldType t0 Core.Field (PgModel.Property t1) Errors.Error] -> Either Errors.Error (M.Map PgModel.PropertyKey t1)
+encodeProperties fields adapters =
+    Eithers.map (\props -> Maps.fromList (Lists.map (\prop -> (PgModel.propertyKey prop, (PgModel.propertyValue prop))) props)) (Eithers.map (\xs -> Optionals.cat xs) (Eithers.mapList (encodeProperty fields) adapters))
+-- | Encode a single property from a field map using a property adapter
+encodeProperty :: M.Map Core.Name Core.Term -> Coders.Adapter Core.FieldType t0 Core.Field t1 Errors.Error -> Either Errors.Error (Maybe t1)
+encodeProperty fields adapter =
+
+      let fname = Core.fieldTypeName (Coders.adapterSource adapter)
+          ftyp = Strip.deannotateType (Core.fieldTypeType (Coders.adapterSource adapter))
+          isMaybe =
+                  case ftyp of
+                    Core.TypeOptional _ -> True
+                    _ -> False
+          encodeValue =
+                  \v -> Eithers.map (\x -> Just x) (Coders.coderEncode (Coders.adapterCoder adapter) (Core.Field {
+                    Core.fieldName = fname,
+                    Core.fieldTerm = v}))
+      in (Optionals.cases (Maps.lookup fname fields) (Logic.ifElse isMaybe (Right Nothing) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "expected field not found in record: " (Core.unName fname)))))) (\value -> Logic.ifElse isMaybe (case (Strip.deannotateTerm value) of
+        Core.TermOptional v0 -> Optionals.cases v0 (Right Nothing) encodeValue
+        _ -> encodeValue value) (encodeValue value)))
+-- | Extract a string from a term
+extractString :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error String
+extractString cx g t = ExtractCore.string g t
+-- | Find adjacent edge adapters for a given direction
+findAdjacenEdgeAdapters :: Typing.InferenceContext -> Graph.Graph -> Mapping.Schema t0 t1 t2 Errors.Error -> t1 -> t1 -> PgModel.VertexLabel -> PgModel.Direction -> [Core.FieldType] -> Either Errors.Error [(
+  PgModel.Direction,
+  (
+    Core.FieldType,
+    (PgModel.EdgeLabel, (Coders.Adapter Core.Type (PgModel.ElementTypeTree t1) Core.Term (PgModel.ElementTree t2) Errors.Error))))]
+findAdjacenEdgeAdapters cx g schema vidType eidType parentLabel dir fields =
+    Eithers.map (\xs -> Optionals.cat xs) (Eithers.mapList (\field ->
+      let key =
+              Core.Name (case dir of
+                PgModel.DirectionOut -> Mapping.annotationSchemaOutEdgeLabel (Mapping.schemaAnnotations schema)
+                PgModel.DirectionIn -> Mapping.annotationSchemaInEdgeLabel (Mapping.schemaAnnotations schema))
+      in (Optionals.cases (Annotations.getTypeAnnotation key (Core.fieldTypeType field)) (Right Nothing) (\a -> Eithers.bind (extractString cx g a) (\labelStr -> Eithers.bind (elementCoder (Just (dir, parentLabel)) schema (Core.fieldTypeType field) vidType eidType cx g) (\elad -> Right (Just (dir, (field, (PgModel.EdgeLabel labelStr, elad))))))))) fields)
+-- | Find an id projection spec for a field
+findIdProjectionSpec :: t0 -> Bool -> Core.Name -> Core.Name -> [Core.FieldType] -> Either Errors.Error (Maybe (Core.FieldType, (Mapping.ValueSpec, (Maybe String))))
+findIdProjectionSpec cx required tname idKey fields =
+    Eithers.bind (findSingleFieldWithAnnotationKey cx tname idKey fields) (\mid -> Optionals.cases mid (Logic.ifElse required (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 (Strings.cat2 "no " (Core.unName idKey)) " field")))) (Right Nothing)) (\mi -> Eithers.map (\spec -> Just (mi, (spec, (Optionals.map (\s -> Strings.toUpper s) Nothing)))) (Optionals.cases (Annotations.getTypeAnnotation idKey (Core.fieldTypeType mi)) (Right Mapping.ValueSpecValue) (TermsToElements.decodeValueSpec cx (Graph.Graph {
+      Graph.graphBoundTerms = Maps.empty,
+      Graph.graphBoundTypes = Maps.empty,
+      Graph.graphClassConstraints = Maps.empty,
+      Graph.graphLambdaVariables = Sets.empty,
+      Graph.graphMetadata = Maps.empty,
+      Graph.graphPrimitives = Maps.empty,
+      Graph.graphSchemaTypes = Maps.empty,
+      Graph.graphTypeVariables = Sets.empty})))))
+-- | Find an incident vertex adapter for a projection spec
+findIncidentVertexAdapter :: Typing.InferenceContext -> Graph.Graph -> Mapping.Schema t0 t1 t2 Errors.Error -> t1 -> t1 -> (Core.FieldType, (Mapping.ValueSpec, (Maybe String))) -> Either Errors.Error (Core.Name, (Coders.Adapter Core.Type (PgModel.ElementTypeTree t1) Core.Term (PgModel.ElementTree t2) Errors.Error))
+findIncidentVertexAdapter cx g schema vidType eidType spec =
+
+      let field = Pairs.first spec
+      in (Eithers.bind (elementCoder Nothing schema (Core.fieldTypeType field) vidType eidType cx g) (\adapter -> Right (Core.fieldTypeName field, adapter)))
+-- | Find a label string from annotations or the type name
+findLabelString :: t0 -> Graph.Graph -> Core.Type -> Core.Name -> Core.Name -> Either Errors.Error String
+findLabelString cx g source tname labelKey =
+    Optionals.cases (Annotations.getTypeAnnotation labelKey source) (Right (Core.unName tname)) (extractString cx g)
+-- | Find a projection spec for a field
+findProjectionSpec :: t0 -> Graph.Graph -> Core.Name -> Core.Name -> Core.Name -> [Core.FieldType] -> Either Errors.Error (Maybe (Core.FieldType, (Mapping.ValueSpec, (Maybe String))))
+findProjectionSpec cx g tname key aliasKey fields =
+    Eithers.bind (findSingleFieldWithAnnotationKey cx tname key fields) (\mfield -> Optionals.cases mfield (Right Nothing) (\field -> Optionals.cases (Annotations.getTypeAnnotation key (Core.fieldTypeType field)) (Left (Errors.ErrorOther (Errors.OtherError "findProjectionSpec: missing type annotation for key"))) (\annot -> Eithers.bind (TermsToElements.decodeValueSpec cx g annot) (\spec -> Eithers.bind (Optionals.cases (Annotations.getTypeAnnotation aliasKey (Core.fieldTypeType field)) (Right Nothing) (\t -> Eithers.map (\x -> Just x) (extractString cx g t))) (\alias -> Right (Just (field, (spec, alias))))))))
+-- | Find property specs for element fields
+findPropertySpecs :: t0 -> Graph.Graph -> Mapping.Schema t1 t2 t3 Errors.Error -> PgModel.ElementKind -> [Core.FieldType] -> Either Errors.Error [(Core.FieldType, (Mapping.ValueSpec, (Maybe String)))]
+findPropertySpecs cx g schema kind fields =
+    Eithers.mapList (\field ->
+      let propKeyKey = Core.Name (Mapping.annotationSchemaPropertyKey (Mapping.schemaAnnotations schema))
+          propValueKey = Core.Name (Mapping.annotationSchemaPropertyValue (Mapping.schemaAnnotations schema))
+      in (Eithers.bind (Optionals.cases (Annotations.getTypeAnnotation propKeyKey (Core.fieldTypeType field)) (Right Nothing) (\a -> Eithers.map (\x -> Just x) (extractString cx g a))) (\alias -> Eithers.bind (Optionals.cases (Annotations.getTypeAnnotation propValueKey (Core.fieldTypeType field)) (Right Mapping.ValueSpecValue) (TermsToElements.decodeValueSpec cx g)) (\values -> Right (field, (values, alias)))))) (Lists.filter (\field ->
+      let annots = Mapping.schemaAnnotations schema
+          ignoreKey = Core.Name (Mapping.annotationSchemaIgnore annots)
+          specialKeys =
+                  case kind of
+                    PgModel.ElementKindVertex -> [
+                      Core.Name (Mapping.annotationSchemaVertexId annots),
+                      (Core.Name (Mapping.annotationSchemaOutEdgeLabel annots)),
+                      (Core.Name (Mapping.annotationSchemaInEdgeLabel annots))]
+                    PgModel.ElementKindEdge -> [
+                      Core.Name (Mapping.annotationSchemaEdgeId annots),
+                      (Core.Name (Mapping.annotationSchemaOutVertex annots)),
+                      (Core.Name (Mapping.annotationSchemaInVertex annots))]
+          allKeys =
+                  Lists.concat [
+                    [
+                      ignoreKey],
+                    specialKeys]
+          hasSpecialAnnotation =
+                  Lists.foldl (\b -> \k -> Logic.or b (Optionals.isGiven (Annotations.getTypeAnnotation k (Core.fieldTypeType field)))) False allKeys
+          hasSpecialFieldName = Lists.foldl (\b -> \k -> Logic.or b (Equality.equal (Core.fieldTypeName field) k)) False specialKeys
+      in (Logic.not (Logic.or hasSpecialAnnotation hasSpecialFieldName))) fields)
+-- | Find a single field with a given annotation key
+findSingleFieldWithAnnotationKey :: t0 -> Core.Name -> Core.Name -> [Core.FieldType] -> Either Errors.Error (Maybe Core.FieldType)
+findSingleFieldWithAnnotationKey cx tname key fields =
+
+      let matches = Lists.filter (\f -> Optionals.isGiven (Annotations.getTypeAnnotation key (Core.fieldTypeType f))) fields
+      in (Logic.ifElse (Equality.gt (Lists.length matches) 1) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 (Strings.cat2 (Strings.cat2 "Multiple fields marked as '" (Core.unName key)) "' in record type ") (Core.unName tname))))) (Right (Lists.maybeHead matches)))
+-- | Determine whether the spec has vertex adapters based on direction and out/in specs
+hasVertexAdapters :: PgModel.Direction -> Maybe t0 -> Maybe t1 -> Bool
+hasVertexAdapters dir mOutSpec mInSpec =
+    case dir of
+      PgModel.DirectionOut -> Optionals.isGiven mInSpec
+      PgModel.DirectionIn -> Optionals.isGiven mOutSpec
+      PgModel.DirectionBoth -> Logic.and (Optionals.isGiven mOutSpec) (Optionals.isGiven mInSpec)
+-- | Create a projection adapter from a projection spec
+projectionAdapter :: t0 -> t1 -> t2 -> Coders.Coder Core.Term t3 Errors.Error -> (Core.FieldType, (Mapping.ValueSpec, t4)) -> String -> Either t5 (Core.Name, (Coders.Adapter Core.Type t2 Core.Term t3 Errors.Error))
+projectionAdapter cx g idtype coder spec key =
+
+      let field = Pairs.first spec
+          values = Pairs.first (Pairs.second spec)
+      in (Eithers.bind (TermsToElements.parseValueSpec cx g values) (\traversal -> Right (
+        Core.fieldTypeName field,
+        Coders.Adapter {
+          Coders.adapterIsLossy = True,
+          Coders.adapterSource = (Core.fieldTypeType field),
+          Coders.adapterTarget = idtype,
+          Coders.adapterCoder = Coders.Coder {
+            Coders.coderEncode = (\typ -> Eithers.bind (traverseToSingleTerm cx (Strings.cat2 key "-projection") traversal typ) (\t -> Coders.coderEncode coder t)),
+            Coders.coderDecode = (\_ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 (Strings.cat2 "edge '" key) "' decoding is not yet supported"))))}})))
+-- | Create a property adapter from a property spec
+propertyAdapter :: Typing.InferenceContext -> t0 -> Mapping.Schema t1 t2 t3 Errors.Error -> (Core.FieldType, (Mapping.ValueSpec, (Maybe String))) -> Either Errors.Error (Coders.Adapter Core.FieldType (PgModel.PropertyType t2) Core.Field (PgModel.Property t3) Errors.Error)
+propertyAdapter cx g schema spec =
+
+      let tfield = Pairs.first spec
+          values = Pairs.first (Pairs.second spec)
+          alias = Pairs.second (Pairs.second spec)
+          key = PgModel.PropertyKey (Optionals.fromOptional (Core.unName (Core.fieldTypeName tfield)) alias)
+      in (Eithers.bind (Coders.coderEncode (Mapping.schemaPropertyTypes schema) (Core.fieldTypeType tfield)) (\pt -> Eithers.bind (TermsToElements.parseValueSpec cx g values) (\traversal -> Right (Coders.Adapter {
+        Coders.adapterIsLossy = True,
+        Coders.adapterSource = tfield,
+        Coders.adapterTarget = PgModel.PropertyType {
+          PgModel.propertyTypeKey = key,
+          PgModel.propertyTypeValue = pt,
+          PgModel.propertyTypeRequired = True},
+        Coders.adapterCoder = Coders.Coder {
+          Coders.coderEncode = (\dfield -> Eithers.bind (traverseToSingleTerm cx "property traversal" traversal (Core.fieldTerm dfield)) (\result -> Eithers.bind (Coders.coderEncode (Mapping.schemaPropertyValues schema) result) (\value -> Right (PgModel.Property {
+            PgModel.propertyKey = key,
+            PgModel.propertyValue = value})))),
+          Coders.coderDecode = (\_ -> Left (Errors.ErrorOther (Errors.OtherError "property decoding is not yet supported")))}}))))
+-- | Extract property types from property adapters
+propertyTypes :: [Coders.Adapter t0 (PgModel.PropertyType t1) t2 t3 t4] -> [PgModel.PropertyType t1]
+propertyTypes propAdapters =
+    Lists.map (\a -> PgModel.PropertyType {
+      PgModel.propertyTypeKey = (PgModel.propertyTypeKey (Coders.adapterTarget a)),
+      PgModel.propertyTypeValue = (PgModel.propertyTypeValue (Coders.adapterTarget a)),
+      PgModel.propertyTypeRequired = True}) propAdapters
+-- | Select an edge id from record fields using an id adapter
+selectEdgeId :: M.Map Core.Name t0 -> (Core.Name, (Coders.Adapter t1 t2 t0 t3 Errors.Error)) -> Either Errors.Error t3
+selectEdgeId fields ad =
+
+      let fname = Pairs.first ad
+          adapter = Pairs.second ad
+      in (Optionals.cases (Maps.lookup fname fields) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 (Strings.cat2 "no " (Core.unName fname)) " in record")))) (\t -> Coders.coderEncode (Coders.adapterCoder adapter) t))
+-- | Select a vertex id from record fields using an id adapter
+selectVertexId :: M.Map Core.Name t0 -> (Core.Name, (Coders.Adapter t1 t2 t0 t3 Errors.Error)) -> Either Errors.Error t3
+selectVertexId fields ad =
+
+      let fname = Pairs.first ad
+          adapter = Pairs.second ad
+      in (Optionals.cases (Maps.lookup fname fields) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 (Strings.cat2 "no " (Core.unName fname)) " in record")))) (\t -> Coders.coderEncode (Coders.adapterCoder adapter) t))
+-- | Traverse to a single term, failing if zero or multiple terms are found
+traverseToSingleTerm :: t0 -> String -> (t1 -> Either Errors.Error [t2]) -> t1 -> Either Errors.Error t2
+traverseToSingleTerm cx desc traversal term =
+    Eithers.bind (traversal term) (\terms -> Logic.ifElse (Lists.null terms) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 desc " did not resolve to a term")))) (Logic.ifElse (Equality.equal (Lists.length terms) 1) (Optionals.cases (Lists.maybeHead terms) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 desc " resolved to multiple terms")))) (\x -> Right x)) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 desc " resolved to multiple terms"))))))
+-- | Create a vertex coder given all components
+vertexCoder :: t0 -> Mapping.Schema t1 t2 t3 Errors.Error -> t4 -> t5 -> t6 -> PgModel.VertexLabel -> (Core.Name, (Coders.Adapter t7 t8 Core.Term t3 Errors.Error)) -> [Coders.Adapter Core.FieldType (PgModel.PropertyType t5) Core.Field (PgModel.Property t3) Errors.Error] -> [(
+  PgModel.Direction,
+  (Core.FieldType, (PgModel.EdgeLabel, (Coders.Adapter t9 (PgModel.ElementTypeTree t5) Core.Term (PgModel.ElementTree t3) Errors.Error))))] -> Coders.Adapter t4 (PgModel.ElementTypeTree t5) Core.Term (PgModel.ElementTree t3) Errors.Error
+vertexCoder g schema source vidType tname vlabel idAdapter propAdapters edgeAdapters =
+
+      let vtype =
+              PgModel.VertexType {
+                PgModel.vertexTypeLabel = vlabel,
+                PgModel.vertexTypeId = vidType,
+                PgModel.vertexTypeProperties = (propertyTypes propAdapters)}
+          depTypes = Lists.map (\ea -> Coders.adapterTarget (Pairs.second (Pairs.second (Pairs.second ea)))) edgeAdapters
+          target = elementTypeTreeVertex vtype depTypes
+      in Coders.Adapter {
+        Coders.adapterIsLossy = True,
+        Coders.adapterSource = source,
+        Coders.adapterTarget = target,
+        Coders.adapterCoder = Coders.Coder {
+          Coders.coderEncode = (\term ->
+            let deannot = Strip.deannotateTerm term
+                unwrapped =
+                        case deannot of
+                          Core.TermOptional v0 -> Optionals.fromOptional deannot v0
+                          _ -> deannot
+                rec =
+                        case unwrapped of
+                          Core.TermRecord v0 -> v0
+                fmap = Resolution.fieldMap (Core.recordFields rec)
+            in (Eithers.bind (selectVertexId fmap idAdapter) (\vid -> Eithers.bind (encodeProperties fmap propAdapters) (\props -> Eithers.bind (Eithers.map (\xs -> Lists.concat xs) (Eithers.mapList (\ea ->
+              let eaDir = Pairs.first ea
+                  eaField = Pairs.first (Pairs.second ea)
+                  eaLabel = Pairs.first (Pairs.second (Pairs.second ea))
+                  eaAdapter = Pairs.second (Pairs.second (Pairs.second ea))
+              in (Optionals.cases (Maps.lookup (Core.fieldTypeName eaField) fmap) (Right []) (\fterm -> Eithers.map (\tree -> (\x -> case x of
+                PgModel.ElementVertex v0 ->
+                  let otherid = PgModel.vertexId v0
+                      edgeid = Mapping.schemaDefaultEdgeId schema
+                      outId =
+                              case eaDir of
+                                PgModel.DirectionOut -> vid
+                                PgModel.DirectionIn -> otherid
+                      inId =
+                              case eaDir of
+                                PgModel.DirectionOut -> otherid
+                                PgModel.DirectionIn -> vid
+                      edge =
+                              PgModel.ElementEdge (PgModel.Edge {
+                                PgModel.edgeLabel = eaLabel,
+                                PgModel.edgeId = edgeid,
+                                PgModel.edgeOut = outId,
+                                PgModel.edgeIn = inId,
+                                PgModel.edgeProperties = Maps.empty})
+                  in [
+                    PgModel.ElementTree {
+                      PgModel.elementTreeSelf = edge,
+                      PgModel.elementTreeDependencies = [
+                        tree]}]
+                PgModel.ElementEdge v0 ->
+                  let fixedEdge =
+                          case eaDir of
+                            PgModel.DirectionOut -> PgModel.Edge {
+                              PgModel.edgeLabel = (PgModel.edgeLabel v0),
+                              PgModel.edgeId = (PgModel.edgeId v0),
+                              PgModel.edgeOut = vid,
+                              PgModel.edgeIn = (PgModel.edgeIn v0),
+                              PgModel.edgeProperties = (PgModel.edgeProperties v0)}
+                            PgModel.DirectionIn -> PgModel.Edge {
+                              PgModel.edgeLabel = (PgModel.edgeLabel v0),
+                              PgModel.edgeId = (PgModel.edgeId v0),
+                              PgModel.edgeOut = (PgModel.edgeOut v0),
+                              PgModel.edgeIn = vid,
+                              PgModel.edgeProperties = (PgModel.edgeProperties v0)}
+                  in [
+                    PgModel.ElementTree {
+                      PgModel.elementTreeSelf = (PgModel.ElementEdge fixedEdge),
+                      PgModel.elementTreeDependencies = (PgModel.elementTreeDependencies tree)}]) (PgModel.elementTreeSelf tree)) (Coders.coderEncode (Coders.adapterCoder eaAdapter) fterm)))) edgeAdapters)) (\deps -> Right (elementTreeVertex (PgModel.Vertex {
+              PgModel.vertexLabel = vlabel,
+              PgModel.vertexId = vid,
+              PgModel.vertexProperties = props}) deps)))))),
+          Coders.coderDecode = (\_ -> Left (Errors.ErrorOther (Errors.OtherError "vertex decoding is not yet supported")))}}
+-- | Create a vertex id adapter
+vertexIdAdapter :: t0 -> t1 -> Mapping.Schema t2 t3 t4 Errors.Error -> t5 -> Core.Name -> Core.Name -> [Core.FieldType] -> Either Errors.Error (Core.Name, (Coders.Adapter Core.Type t5 Core.Term t4 Errors.Error))
+vertexIdAdapter cx g schema vidType name idKey fields =
+    Eithers.bind (findIdProjectionSpec cx True name idKey fields) (\mIdSpec -> Optionals.cases mIdSpec (Left (Errors.ErrorOther (Errors.OtherError "vertexIdAdapter: no id projection spec"))) (\idSpec -> projectionAdapter cx g vidType (Mapping.schemaVertexIds schema) idSpec "id"))
diff --git a/src/main/haskell/Hydra/Pg/Graphson/Coder.hs b/src/main/haskell/Hydra/Pg/Graphson/Coder.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/Graphson/Coder.hs
@@ -0,0 +1,134 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Encoding functions for converting GraphSON syntax to JSON.
+
+module Hydra.Pg.Graphson.Coder where
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Json.Model as Model
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Literals as Literals
+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Pg.Graphson.Syntax as Syntax
+import qualified Hydra.Query as Query
+import qualified Hydra.Relational as Relational
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Map as M
+-- | Convert a GraphSON AdjacentEdge to a JSON Value. The Bool indicates whether this is an outgoing edge.
+adjacentEdgeToJson :: Bool -> Syntax.AdjacentEdge -> Model.Value
+adjacentEdgeToJson out ae =
+    toJsonObject [
+      ("id", (Just (valueToJson (Syntax.adjacentEdgeId ae)))),
+      ("inV", (Logic.ifElse out (Just (valueToJson (Syntax.adjacentEdgeVertexId ae))) Nothing)),
+      ("outV", (Logic.ifElse out Nothing (Just (valueToJson (Syntax.adjacentEdgeVertexId ae))))),
+      ("properties", (edgePropertyMapToJson (Syntax.adjacentEdgeProperties ae)))]
+-- | Convert a GraphSON DoubleValue to a JSON Value
+doubleValueToJson :: Syntax.DoubleValue -> Model.Value
+doubleValueToJson x =
+    case x of
+      Syntax.DoubleValueFinite v0 -> Model.ValueNumber (Literals.float64ToDecimal v0)
+      Syntax.DoubleValueInfinity -> Model.ValueString "Infinity"
+      Syntax.DoubleValueNegativeInfinity -> Model.ValueString "-Infinity"
+      Syntax.DoubleValueNotANumber -> Model.ValueString "NaN"
+-- | Convert a map of edges by label to an optional JSON Value
+edgeMapToJson :: Bool -> M.Map Syntax.EdgeLabel [Syntax.AdjacentEdge] -> Maybe Model.Value
+edgeMapToJson out m =
+    Logic.ifElse (Maps.null m) Nothing (Just (Model.ValueObject (Lists.map (\p -> (Syntax.unEdgeLabel (Pairs.first p), (Model.ValueArray (Lists.map (adjacentEdgeToJson out) (Pairs.second p))))) (Maps.toList m))))
+-- | Convert a map of edge properties to an optional JSON Value
+edgePropertyMapToJson :: M.Map Syntax.PropertyKey Syntax.Value -> Maybe Model.Value
+edgePropertyMapToJson m =
+    Logic.ifElse (Maps.null m) Nothing (Just (Model.ValueObject (Lists.map (\p -> (Syntax.unPropertyKey (Pairs.first p), (valueToJson (Pairs.second p)))) (Maps.toList m))))
+-- | Convert a GraphSON FloatValue to a JSON Value
+floatValueToJson :: Syntax.FloatValue -> Model.Value
+floatValueToJson x =
+    case x of
+      Syntax.FloatValueFinite v0 -> Model.ValueNumber (Literals.float32ToDecimal v0)
+      Syntax.FloatValueInfinity -> Model.ValueString "Infinity"
+      Syntax.FloatValueNegativeInfinity -> Model.ValueString "-Infinity"
+      Syntax.FloatValueNotANumber -> Model.ValueString "NaN"
+-- | Convert a GraphSON Map to a JSON array of alternating keys and values
+mapToJson :: Syntax.Map -> Model.Value
+mapToJson m =
+    Model.ValueArray (Lists.concat (Lists.map (\vp -> [
+      valueToJson (Syntax.valuePairFirst vp),
+      (valueToJson (Syntax.valuePairSecond vp))]) (Syntax.unMap m)))
+-- | Create a JSON object from a list of key-value pairs, filtering out Nothing values
+toJsonObject :: [(String, (Maybe Model.Value))] -> Model.Value
+toJsonObject pairs =
+    Model.ValueObject (Optionals.cat (Lists.map (\p -> Optionals.map (\v -> (Pairs.first p, v)) (Pairs.second p)) pairs))
+-- | Create a typed JSON object with @type and @value fields
+typedValueToJson :: String -> Model.Value -> Model.Value
+typedValueToJson typeName valueJson =
+    toJsonObject [
+      ("@type", (Just (Model.ValueString typeName))),
+      ("@value", (Just valueJson))]
+-- | Convert a GraphSON Value to a JSON Value
+valueToJson :: Syntax.Value -> Model.Value
+valueToJson x =
+    case x of
+      Syntax.ValueBigDecimal v0 -> typedValueToJson "g:BigDecimal" (Model.ValueString (Syntax.unBigDecimalValue v0))
+      Syntax.ValueBigInteger v0 -> typedValueToJson "g:BigInteger" (Model.ValueNumber (Literals.bigintToDecimal v0))
+      Syntax.ValueBinary v0 -> typedValueToJson "g:Binary" (Model.ValueString v0)
+      Syntax.ValueBoolean v0 -> Model.ValueBoolean v0
+      Syntax.ValueByte v0 -> typedValueToJson "g:Byte" (Model.ValueNumber (Literals.bigintToDecimal (Literals.uint8ToBigint v0)))
+      Syntax.ValueChar v0 -> typedValueToJson "g:Char" (Model.ValueString (Strings.fromList (Lists.pure (Literals.bigintToInt32 (Literals.uint32ToBigint v0)))))
+      Syntax.ValueComposite v0 -> typedValueToJson (Syntax.unTypeName (Syntax.compositeTypedValueType v0)) (mapToJson (Syntax.compositeTypedValueFields v0))
+      Syntax.ValueDateTime v0 -> typedValueToJson "g:DateTime" (Model.ValueString (Syntax.unDateTime v0))
+      Syntax.ValueDouble v0 -> typedValueToJson "g:Double" (doubleValueToJson v0)
+      Syntax.ValueDuration v0 -> typedValueToJson "g:Duration" (Model.ValueString (Syntax.unDuration v0))
+      Syntax.ValueFloat v0 -> typedValueToJson "g:Float" (floatValueToJson v0)
+      Syntax.ValueInteger v0 -> typedValueToJson "g:Int32" (Model.ValueNumber (Literals.bigintToDecimal (Literals.int32ToBigint v0)))
+      Syntax.ValueList v0 -> typedValueToJson "g:List" (Model.ValueArray (Lists.map valueToJson v0))
+      Syntax.ValueLong v0 -> typedValueToJson "g:Long" (Model.ValueNumber (Literals.bigintToDecimal (Literals.int64ToBigint v0)))
+      Syntax.ValueMap v0 -> typedValueToJson "g:Map" (mapToJson v0)
+      Syntax.ValueNull -> Model.ValueNull
+      Syntax.ValuePrimitive v0 -> typedValueToJson "g:PrimitivePdt" (Model.ValueString (Syntax.primitiveTypedValueValue v0))
+      Syntax.ValueSet v0 -> typedValueToJson "g:Set" (Model.ValueArray (Lists.map valueToJson v0))
+      Syntax.ValueShort v0 -> typedValueToJson "g:Int16" (Model.ValueNumber (Literals.bigintToDecimal (Literals.int16ToBigint v0)))
+      Syntax.ValueString v0 -> Model.ValueString v0
+      Syntax.ValueUuid v0 -> typedValueToJson "g:UUID" (Model.ValueString (Syntax.unUuid v0))
+-- | Convert a map of vertex properties to an optional JSON Value
+vertexPropertyMapToJson :: M.Map Syntax.PropertyKey [Syntax.VertexPropertyValue] -> Maybe Model.Value
+vertexPropertyMapToJson m =
+    Logic.ifElse (Maps.null m) Nothing (Just (Model.ValueObject (Lists.map (\p -> (Syntax.unPropertyKey (Pairs.first p), (Model.ValueArray (Lists.map vertexPropertyValueToJson (Pairs.second p))))) (Maps.toList m))))
+-- | Convert a GraphSON VertexPropertyValue to a JSON Value
+vertexPropertyValueToJson :: Syntax.VertexPropertyValue -> Model.Value
+vertexPropertyValueToJson vpv =
+    toJsonObject [
+      ("id", (Optionals.map valueToJson (Syntax.vertexPropertyValueId vpv))),
+      ("value", (Just (valueToJson (Syntax.vertexPropertyValueValue vpv))))]
+-- | Convert a GraphSON Vertex to a JSON Value
+vertexToJson :: Syntax.Vertex -> Model.Value
+vertexToJson v =
+    toJsonObject [
+      ("id", (Just (valueToJson (Syntax.vertexId v)))),
+      ("label", (Optionals.map (\lbl -> Model.ValueString (Syntax.unVertexLabel lbl)) (Syntax.vertexLabel v))),
+      ("inE", (edgeMapToJson False (Syntax.vertexInEdges v))),
+      ("outE", (edgeMapToJson True (Syntax.vertexOutEdges v))),
+      ("properties", (vertexPropertyMapToJson (Syntax.vertexProperties v)))]
diff --git a/src/main/haskell/Hydra/Pg/Graphson/Construct.hs b/src/main/haskell/Hydra/Pg/Graphson/Construct.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/Graphson/Construct.hs
@@ -0,0 +1,102 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Functions for constructing GraphSON vertices from property graph vertices.
+
+module Hydra.Pg.Graphson.Construct where
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Json.Model as JsonModel
+import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Pg.Graphson.Coder as Coder
+import qualified Hydra.Pg.Graphson.Syntax as Syntax
+import qualified Hydra.Pg.Model as PgModel
+import qualified Hydra.Query as Query
+import qualified Hydra.Relational as Relational
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Map as M
+-- | Convert a property graph adjacent edge to a GraphSON adjacent edge
+adjacentEdgeToGraphson :: (t0 -> Either t1 Syntax.Value) -> PgModel.AdjacentEdge t0 -> Either t1 (Syntax.EdgeLabel, Syntax.AdjacentEdge)
+adjacentEdgeToGraphson encodeValue edge =
+
+      let label = PgModel.adjacentEdgeLabel edge
+          edgeId = PgModel.adjacentEdgeId edge
+          vertexId = PgModel.adjacentEdgeVertex edge
+          props = PgModel.adjacentEdgeProperties edge
+      in (Eithers.bind (encodeValue edgeId) (\gid -> Eithers.bind (encodeValue vertexId) (\gv -> Eithers.bind (Eithers.mapList (edgePropertyToGraphson encodeValue) (Maps.toList props)) (\propPairs -> Right (
+        Syntax.EdgeLabel (PgModel.unEdgeLabel label),
+        Syntax.AdjacentEdge {
+          Syntax.adjacentEdgeId = gid,
+          Syntax.adjacentEdgeVertexId = gv,
+          Syntax.adjacentEdgeProperties = (Maps.fromList propPairs)})))))
+-- | Aggregate a list of key-value pairs into a map where each key maps to a list of values
+aggregateMap :: Ord t0 => ([(t0, t1)] -> M.Map t0 [t1])
+aggregateMap pairs =
+    Lists.foldl (\m -> \p ->
+      let k = Pairs.first p
+          v = Pairs.second p
+          existing = Maps.lookup k m
+      in (Maps.insert k (Optionals.cases existing (Lists.pure v) (\vs -> Lists.cons v vs)) m)) Maps.empty pairs
+-- | Convert a property graph edge property to a GraphSON property
+edgePropertyToGraphson :: (t0 -> Either t1 t2) -> (PgModel.PropertyKey, t0) -> Either t1 (Syntax.PropertyKey, t2)
+edgePropertyToGraphson encodeValue prop =
+    Eithers.map (\gv -> (Syntax.PropertyKey (PgModel.unPropertyKey (Pairs.first prop)), gv)) (encodeValue (Pairs.second prop))
+-- | A coder that converts GraphSON vertices to JSON. Decoding is not supported.
+graphsonVertexToJsonCoder :: Coders.Coder Syntax.Vertex JsonModel.Value Errors.Error
+graphsonVertexToJsonCoder =
+    Coders.Coder {
+      Coders.coderEncode = (\v -> Right (Coder.vertexToJson v)),
+      Coders.coderDecode = (\_ -> Left (Errors.ErrorOther (Errors.OtherError "decoding GraphSON JSON is currently unsupported")))}
+-- | Convert a property graph vertex with adjacent edges to a GraphSON vertex
+pgVertexWithAdjacentEdgesToGraphsonVertex :: (t0 -> Either t1 Syntax.Value) -> PgModel.VertexWithAdjacentEdges t0 -> Either t1 Syntax.Vertex
+pgVertexWithAdjacentEdgesToGraphsonVertex encodeValue vae =
+
+      let vertex = PgModel.vertexWithAdjacentEdgesVertex vae
+          ins = PgModel.vertexWithAdjacentEdgesIns vae
+          outs = PgModel.vertexWithAdjacentEdgesOuts vae
+          label = PgModel.vertexLabel vertex
+          vertexId = PgModel.vertexId vertex
+          props = PgModel.vertexProperties vertex
+      in (Eithers.bind (encodeValue vertexId) (\gid -> Eithers.bind (Eithers.mapList (vertexPropertyToGraphson encodeValue) (Maps.toList props)) (\propPairs -> Eithers.bind (Eithers.mapList (adjacentEdgeToGraphson encodeValue) ins) (\inPairs -> Eithers.bind (Eithers.mapList (adjacentEdgeToGraphson encodeValue) outs) (\outPairs -> Right (Syntax.Vertex {
+        Syntax.vertexId = gid,
+        Syntax.vertexLabel = (Just (Syntax.VertexLabel (PgModel.unVertexLabel label))),
+        Syntax.vertexInEdges = (aggregateMap inPairs),
+        Syntax.vertexOutEdges = (aggregateMap outPairs),
+        Syntax.vertexProperties = (aggregateMap propPairs)}))))))
+-- | Convert a property graph vertex with adjacent edges to JSON
+pgVertexWithAdjacentEdgesToJson :: (t0 -> Either t1 Syntax.Value) -> PgModel.VertexWithAdjacentEdges t0 -> Either t1 JsonModel.Value
+pgVertexWithAdjacentEdgesToJson encodeValue vertex =
+    Eithers.bind (pgVertexWithAdjacentEdgesToGraphsonVertex encodeValue vertex) (\gVertex -> Right (Coder.vertexToJson gVertex))
+-- | Convert a property graph vertex property to a GraphSON vertex property
+vertexPropertyToGraphson :: (t0 -> Either t1 Syntax.Value) -> (PgModel.PropertyKey, t0) -> Either t1 (Syntax.PropertyKey, Syntax.VertexPropertyValue)
+vertexPropertyToGraphson encodeValue prop =
+    Eithers.map (\gv -> (
+      Syntax.PropertyKey (PgModel.unPropertyKey (Pairs.first prop)),
+      Syntax.VertexPropertyValue {
+        Syntax.vertexPropertyValueId = Nothing,
+        Syntax.vertexPropertyValueValue = gv})) (encodeValue (Pairs.second prop))
diff --git a/src/main/haskell/Hydra/Pg/Graphson/Syntax.hs b/src/main/haskell/Hydra/Pg/Graphson/Syntax.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/Graphson/Syntax.hs
@@ -0,0 +1,177 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A syntax model for TinkerPop's GraphSON format. This model is designed to be as inclusive as possible, supporting GraphSON 4.0 as well as earlier versions. See https://github.com/apache/tinkerpop/blob/master/docs/src/dev/io/graphson.asciidoc.
+
+module Hydra.Pg.Graphson.Syntax where
+import qualified Hydra.Core as Core
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Int as I
+import qualified Data.Map as M
+newtype BigDecimalValue =
+  BigDecimalValue {
+    unBigDecimalValue :: String}
+  deriving (Eq, Ord, Read, Show)
+_BigDecimalValue = Core.Name "hydra.pg.graphson.syntax.BigDecimalValue"
+data CompositeTypedValue =
+  CompositeTypedValue {
+    compositeTypedValueType :: TypeName,
+    compositeTypedValueFields :: Map}
+  deriving (Eq, Ord, Read, Show)
+_CompositeTypedValue = Core.Name "hydra.pg.graphson.syntax.CompositeTypedValue"
+_CompositeTypedValue_type = Core.Name "type"
+_CompositeTypedValue_fields = Core.Name "fields"
+newtype DateTime =
+  DateTime {
+    unDateTime :: String}
+  deriving (Eq, Ord, Read, Show)
+_DateTime = Core.Name "hydra.pg.graphson.syntax.DateTime"
+data DoubleValue =
+  DoubleValueFinite Double |
+  DoubleValueInfinity |
+  DoubleValueNegativeInfinity |
+  DoubleValueNotANumber
+  deriving (Eq, Ord, Read, Show)
+_DoubleValue = Core.Name "hydra.pg.graphson.syntax.DoubleValue"
+_DoubleValue_finite = Core.Name "finite"
+_DoubleValue_infinity = Core.Name "infinity"
+_DoubleValue_negativeInfinity = Core.Name "negativeInfinity"
+_DoubleValue_notANumber = Core.Name "notANumber"
+newtype Duration =
+  Duration {
+    unDuration :: String}
+  deriving (Eq, Ord, Read, Show)
+_Duration = Core.Name "hydra.pg.graphson.syntax.Duration"
+newtype EdgeLabel =
+  EdgeLabel {
+    unEdgeLabel :: String}
+  deriving (Eq, Ord, Read, Show)
+_EdgeLabel = Core.Name "hydra.pg.graphson.syntax.EdgeLabel"
+data FloatValue =
+  FloatValueFinite Float |
+  FloatValueInfinity |
+  FloatValueNegativeInfinity |
+  FloatValueNotANumber
+  deriving (Eq, Ord, Read, Show)
+_FloatValue = Core.Name "hydra.pg.graphson.syntax.FloatValue"
+_FloatValue_finite = Core.Name "finite"
+_FloatValue_infinity = Core.Name "infinity"
+_FloatValue_negativeInfinity = Core.Name "negativeInfinity"
+_FloatValue_notANumber = Core.Name "notANumber"
+newtype Map =
+  Map {
+    unMap :: [ValuePair]}
+  deriving (Eq, Ord, Read, Show)
+_Map = Core.Name "hydra.pg.graphson.syntax.Map"
+data AdjacentEdge =
+  AdjacentEdge {
+    adjacentEdgeId :: Value,
+    adjacentEdgeVertexId :: Value,
+    adjacentEdgeProperties :: (M.Map PropertyKey Value)}
+  deriving (Eq, Ord, Read, Show)
+_AdjacentEdge = Core.Name "hydra.pg.graphson.syntax.AdjacentEdge"
+_AdjacentEdge_id = Core.Name "id"
+_AdjacentEdge_vertexId = Core.Name "vertexId"
+_AdjacentEdge_properties = Core.Name "properties"
+data PrimitiveTypedValue =
+  PrimitiveTypedValue {
+    primitiveTypedValueType :: TypeName,
+    primitiveTypedValueValue :: String}
+  deriving (Eq, Ord, Read, Show)
+_PrimitiveTypedValue = Core.Name "hydra.pg.graphson.syntax.PrimitiveTypedValue"
+_PrimitiveTypedValue_type = Core.Name "type"
+_PrimitiveTypedValue_value = Core.Name "value"
+newtype PropertyKey =
+  PropertyKey {
+    unPropertyKey :: String}
+  deriving (Eq, Ord, Read, Show)
+_PropertyKey = Core.Name "hydra.pg.graphson.syntax.PropertyKey"
+newtype TypeName =
+  TypeName {
+    unTypeName :: String}
+  deriving (Eq, Ord, Read, Show)
+_TypeName = Core.Name "hydra.pg.graphson.syntax.TypeName"
+newtype Uuid =
+  Uuid {
+    unUuid :: String}
+  deriving (Eq, Ord, Read, Show)
+_Uuid = Core.Name "hydra.pg.graphson.syntax.Uuid"
+data Value =
+  ValueBigDecimal BigDecimalValue |
+  ValueBigInteger Integer |
+  ValueBinary String |
+  ValueBoolean Bool |
+  ValueByte I.Int16 |
+  ValueChar I.Int64 |
+  ValueComposite CompositeTypedValue |
+  ValueDateTime DateTime |
+  ValueDouble DoubleValue |
+  ValueDuration Duration |
+  ValueFloat FloatValue |
+  ValueInteger Int |
+  ValueList [Value] |
+  ValueLong I.Int64 |
+  ValueMap Map |
+  ValueNull |
+  ValuePrimitive PrimitiveTypedValue |
+  ValueSet [Value] |
+  ValueShort I.Int16 |
+  ValueString String |
+  ValueUuid Uuid
+  deriving (Eq, Ord, Read, Show)
+_Value = Core.Name "hydra.pg.graphson.syntax.Value"
+_Value_bigDecimal = Core.Name "bigDecimal"
+_Value_bigInteger = Core.Name "bigInteger"
+_Value_binary = Core.Name "binary"
+_Value_boolean = Core.Name "boolean"
+_Value_byte = Core.Name "byte"
+_Value_char = Core.Name "char"
+_Value_composite = Core.Name "composite"
+_Value_dateTime = Core.Name "dateTime"
+_Value_double = Core.Name "double"
+_Value_duration = Core.Name "duration"
+_Value_float = Core.Name "float"
+_Value_integer = Core.Name "integer"
+_Value_list = Core.Name "list"
+_Value_long = Core.Name "long"
+_Value_map = Core.Name "map"
+_Value_null = Core.Name "null"
+_Value_primitive = Core.Name "primitive"
+_Value_set = Core.Name "set"
+_Value_short = Core.Name "short"
+_Value_string = Core.Name "string"
+_Value_uuid = Core.Name "uuid"
+data ValuePair =
+  ValuePair {
+    valuePairFirst :: Value,
+    valuePairSecond :: Value}
+  deriving (Eq, Ord, Read, Show)
+_ValuePair = Core.Name "hydra.pg.graphson.syntax.ValuePair"
+_ValuePair_first = Core.Name "first"
+_ValuePair_second = Core.Name "second"
+data Vertex =
+  Vertex {
+    vertexId :: Value,
+    vertexLabel :: (Maybe VertexLabel),
+    vertexInEdges :: (M.Map EdgeLabel [AdjacentEdge]),
+    vertexOutEdges :: (M.Map EdgeLabel [AdjacentEdge]),
+    vertexProperties :: (M.Map PropertyKey [VertexPropertyValue])}
+  deriving (Eq, Ord, Read, Show)
+_Vertex = Core.Name "hydra.pg.graphson.syntax.Vertex"
+_Vertex_id = Core.Name "id"
+_Vertex_label = Core.Name "label"
+_Vertex_inEdges = Core.Name "inEdges"
+_Vertex_outEdges = Core.Name "outEdges"
+_Vertex_properties = Core.Name "properties"
+newtype VertexLabel =
+  VertexLabel {
+    unVertexLabel :: String}
+  deriving (Eq, Ord, Read, Show)
+_VertexLabel = Core.Name "hydra.pg.graphson.syntax.VertexLabel"
+data VertexPropertyValue =
+  VertexPropertyValue {
+    vertexPropertyValueId :: (Maybe Value),
+    vertexPropertyValueValue :: Value}
+  deriving (Eq, Ord, Read, Show)
+_VertexPropertyValue = Core.Name "hydra.pg.graphson.syntax.VertexPropertyValue"
+_VertexPropertyValue_id = Core.Name "id"
+_VertexPropertyValue_value = Core.Name "value"
diff --git a/src/main/haskell/Hydra/Pg/Graphson/Utils.hs b/src/main/haskell/Hydra/Pg/Graphson/Utils.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/Graphson/Utils.hs
@@ -0,0 +1,116 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Utility functions for GraphSON encoding and property graph conversion.
+
+module Hydra.Pg.Graphson.Utils where
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Json.Model as JsonModel
+import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Literals as Literals
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Pg.Graphson.Construct as Construct
+import qualified Hydra.Pg.Graphson.Syntax as Syntax
+import qualified Hydra.Pg.Model as PgModel
+import qualified Hydra.Query as Query
+import qualified Hydra.Relational as Relational
+import qualified Hydra.Strip as Strip
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Convert a list of property graph elements to a list of vertices with their adjacent edges
+elementsToVerticesWithAdjacentEdges :: Ord t0 => ([PgModel.Element t0] -> [PgModel.VertexWithAdjacentEdges t0])
+elementsToVerticesWithAdjacentEdges els =
+
+      let partitioned =
+              Lists.foldl (\acc -> \el -> (\x -> case x of
+                PgModel.ElementVertex v0 -> (Lists.cons v0 (Pairs.first acc), (Pairs.second acc))
+                PgModel.ElementEdge v0 -> (Pairs.first acc, (Lists.cons v0 (Pairs.second acc)))) el) ([], []) els
+          vertices = Lists.reverse (Pairs.first partitioned)
+          edges = Lists.reverse (Pairs.second partitioned)
+          vertexMap0 =
+                  Maps.fromList (Lists.map (\v -> (
+                    PgModel.vertexId v,
+                    PgModel.VertexWithAdjacentEdges {
+                      PgModel.vertexWithAdjacentEdgesVertex = v,
+                      PgModel.vertexWithAdjacentEdgesIns = [],
+                      PgModel.vertexWithAdjacentEdgesOuts = []})) vertices)
+          vertexMap1 =
+                  Lists.foldl (\vmap -> \edge ->
+                    let label = PgModel.edgeLabel edge
+                        edgeId = PgModel.edgeId edge
+                        outV = PgModel.edgeOut edge
+                        inV = PgModel.edgeIn edge
+                        props = PgModel.edgeProperties edge
+                        adjEdgeOut =
+                                PgModel.AdjacentEdge {
+                                  PgModel.adjacentEdgeLabel = label,
+                                  PgModel.adjacentEdgeId = edgeId,
+                                  PgModel.adjacentEdgeVertex = inV,
+                                  PgModel.adjacentEdgeProperties = props}
+                        adjEdgeIn =
+                                PgModel.AdjacentEdge {
+                                  PgModel.adjacentEdgeLabel = label,
+                                  PgModel.adjacentEdgeId = edgeId,
+                                  PgModel.adjacentEdgeVertex = outV,
+                                  PgModel.adjacentEdgeProperties = props}
+                        vmap1 =
+                                Optionals.cases (Maps.lookup outV vmap) vmap (\vae -> Maps.insert outV (PgModel.VertexWithAdjacentEdges {
+                                  PgModel.vertexWithAdjacentEdgesVertex = (PgModel.vertexWithAdjacentEdgesVertex vae),
+                                  PgModel.vertexWithAdjacentEdgesIns = (PgModel.vertexWithAdjacentEdgesIns vae),
+                                  PgModel.vertexWithAdjacentEdgesOuts = (Lists.cons adjEdgeOut (PgModel.vertexWithAdjacentEdgesOuts vae))}) vmap)
+                    in (Optionals.cases (Maps.lookup inV vmap1) vmap1 (\vae -> Maps.insert inV (PgModel.VertexWithAdjacentEdges {
+                      PgModel.vertexWithAdjacentEdgesVertex = (PgModel.vertexWithAdjacentEdgesVertex vae),
+                      PgModel.vertexWithAdjacentEdgesIns = (Lists.cons adjEdgeIn (PgModel.vertexWithAdjacentEdgesIns vae)),
+                      PgModel.vertexWithAdjacentEdgesOuts = (PgModel.vertexWithAdjacentEdgesOuts vae)}) vmap1))) vertexMap0 edges
+      in (Maps.elems vertexMap1)
+-- | Encode a String value as a GraphSON Value
+encodeStringValue :: String -> Either t0 Syntax.Value
+encodeStringValue s = Right (Syntax.ValueString s)
+-- | Encode a Hydra Term as a GraphSON Value. Supports literals and unit values.
+encodeTermValue :: Core.Term -> Either Errors.Error Syntax.Value
+encodeTermValue term =
+    case (Strip.deannotateTerm term) of
+      Core.TermLiteral v0 -> case v0 of
+        Core.LiteralBinary v1 -> Right (Syntax.ValueBinary (Literals.binaryToString v1))
+        Core.LiteralBoolean v1 -> Right (Syntax.ValueBoolean v1)
+        Core.LiteralFloat v1 -> case v1 of
+          Core.FloatValueFloat32 v2 -> Right (Syntax.ValueFloat (Syntax.FloatValueFinite v2))
+          Core.FloatValueFloat64 v2 -> Right (Syntax.ValueDouble (Syntax.DoubleValueFinite v2))
+          _ -> Left (Errors.ErrorOther (Errors.OtherError "unsupported float type"))
+        Core.LiteralInteger v1 -> case v1 of
+          Core.IntegerValueBigint v2 -> Right (Syntax.ValueBigInteger v2)
+          Core.IntegerValueInt32 v2 -> Right (Syntax.ValueInteger v2)
+          Core.IntegerValueInt64 v2 -> Right (Syntax.ValueLong v2)
+          _ -> Left (Errors.ErrorOther (Errors.OtherError "unsupported integer type"))
+        Core.LiteralString v1 -> Right (Syntax.ValueString v1)
+        _ -> Left (Errors.ErrorOther (Errors.OtherError "unsupported literal type for GraphSON encoding"))
+      Core.TermUnit -> Right Syntax.ValueNull
+      _ -> Left (Errors.ErrorOther (Errors.OtherError "unsupported term variant for GraphSON encoding"))
+-- | Convert property graph elements to a list of GraphSON JSON values
+pgElementsToGraphson :: Ord t0 => ((t0 -> Either t1 Syntax.Value) -> [PgModel.Element t0] -> Either t1 [JsonModel.Value])
+pgElementsToGraphson encodeValue els =
+    Eithers.mapList (Construct.pgVertexWithAdjacentEdgesToJson encodeValue) (elementsToVerticesWithAdjacentEdges els)
diff --git a/src/main/haskell/Hydra/Pg/Mapping.hs b/src/main/haskell/Hydra/Pg/Mapping.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/Mapping.hs
@@ -0,0 +1,129 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A model for property graph mapping specifications. See https://github.com/CategoricalData/hydra/wiki/Property-graphs
+
+module Hydra.Pg.Mapping where
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Pg.Model as Model
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Configurable annotation keys for property graph mapping specifications
+data AnnotationSchema =
+  AnnotationSchema {
+    annotationSchemaVertexLabel :: String,
+    annotationSchemaEdgeLabel :: String,
+    annotationSchemaVertexId :: String,
+    annotationSchemaEdgeId :: String,
+    annotationSchemaPropertyKey :: String,
+    annotationSchemaPropertyValue :: String,
+    annotationSchemaOutVertex :: String,
+    annotationSchemaOutVertexLabel :: String,
+    annotationSchemaInVertex :: String,
+    annotationSchemaInVertexLabel :: String,
+    annotationSchemaOutEdge :: String,
+    annotationSchemaOutEdgeLabel :: String,
+    annotationSchemaInEdge :: String,
+    annotationSchemaInEdgeLabel :: String,
+    annotationSchemaIgnore :: String}
+  deriving (Eq, Ord, Read, Show)
+_AnnotationSchema = Core.Name "hydra.pg.mapping.AnnotationSchema"
+_AnnotationSchema_vertexLabel = Core.Name "vertexLabel"
+_AnnotationSchema_edgeLabel = Core.Name "edgeLabel"
+_AnnotationSchema_vertexId = Core.Name "vertexId"
+_AnnotationSchema_edgeId = Core.Name "edgeId"
+_AnnotationSchema_propertyKey = Core.Name "propertyKey"
+_AnnotationSchema_propertyValue = Core.Name "propertyValue"
+_AnnotationSchema_outVertex = Core.Name "outVertex"
+_AnnotationSchema_outVertexLabel = Core.Name "outVertexLabel"
+_AnnotationSchema_inVertex = Core.Name "inVertex"
+_AnnotationSchema_inVertexLabel = Core.Name "inVertexLabel"
+_AnnotationSchema_outEdge = Core.Name "outEdge"
+_AnnotationSchema_outEdgeLabel = Core.Name "outEdgeLabel"
+_AnnotationSchema_inEdge = Core.Name "inEdge"
+_AnnotationSchema_inEdgeLabel = Core.Name "inEdgeLabel"
+_AnnotationSchema_ignore = Core.Name "ignore"
+-- | A mapping specification producing edges of a specified label.
+data EdgeSpec =
+  EdgeSpec {
+    -- | The label of the target edges, which must conform to the edge type associated with that label.
+    edgeSpecLabel :: Model.EdgeLabel,
+    -- | A specification of the id of each target edge
+    edgeSpecId :: ValueSpec,
+    -- | A specification of the out-vertex reference of each target edge
+    edgeSpecOut :: ValueSpec,
+    -- | A specification of the in-vertex reference of each target edge
+    edgeSpecIn :: ValueSpec,
+    -- | Zero or more property specifications for each target edge
+    edgeSpecProperties :: [PropertySpec]}
+  deriving (Eq, Ord, Read, Show)
+_EdgeSpec = Core.Name "hydra.pg.mapping.EdgeSpec"
+_EdgeSpec_label = Core.Name "label"
+_EdgeSpec_id = Core.Name "id"
+_EdgeSpec_out = Core.Name "out"
+_EdgeSpec_in = Core.Name "in"
+_EdgeSpec_properties = Core.Name "properties"
+-- | Either a vertex specification or an edge specification
+data ElementSpec =
+  ElementSpecVertex VertexSpec |
+  ElementSpecEdge EdgeSpec
+  deriving (Eq, Ord, Read, Show)
+_ElementSpec = Core.Name "hydra.pg.mapping.ElementSpec"
+_ElementSpec_vertex = Core.Name "vertex"
+_ElementSpec_edge = Core.Name "edge"
+-- | A mapping specification producing properties of a specified key, and values of the appropriate type.
+data PropertySpec =
+  PropertySpec {
+    -- | The key of the target properties
+    propertySpecKey :: Model.PropertyKey,
+    -- | A specification of the value of each target property, which must conform to the type associated with the property key
+    propertySpecValue :: ValueSpec}
+  deriving (Eq, Ord, Read, Show)
+_PropertySpec = Core.Name "hydra.pg.mapping.PropertySpec"
+_PropertySpec_key = Core.Name "key"
+_PropertySpec_value = Core.Name "value"
+-- | A set of mappings which translates between Hydra terms and annotations, and application-specific property graph types
+data Schema s t v e =
+  Schema {
+    schemaVertexIdTypes :: (Coders.Coder Core.Type t e),
+    schemaVertexIds :: (Coders.Coder Core.Term v e),
+    schemaEdgeIdTypes :: (Coders.Coder Core.Type t e),
+    schemaEdgeIds :: (Coders.Coder Core.Term v e),
+    schemaPropertyTypes :: (Coders.Coder Core.Type t e),
+    schemaPropertyValues :: (Coders.Coder Core.Term v e),
+    schemaAnnotations :: AnnotationSchema,
+    schemaDefaultVertexId :: v,
+    schemaDefaultEdgeId :: v}
+_Schema = Core.Name "hydra.pg.mapping.Schema"
+_Schema_vertexIdTypes = Core.Name "vertexIdTypes"
+_Schema_vertexIds = Core.Name "vertexIds"
+_Schema_edgeIdTypes = Core.Name "edgeIdTypes"
+_Schema_edgeIds = Core.Name "edgeIds"
+_Schema_propertyTypes = Core.Name "propertyTypes"
+_Schema_propertyValues = Core.Name "propertyValues"
+_Schema_annotations = Core.Name "annotations"
+_Schema_defaultVertexId = Core.Name "defaultVertexId"
+_Schema_defaultEdgeId = Core.Name "defaultEdgeId"
+-- | A mapping specification producing values (usually literal values) whose type is understood in context
+data ValueSpec =
+  -- | A trivial no-op specification which passes the entire value
+  ValueSpecValue |
+  -- | A compact path representing the function, e.g. engine-${engineInfo/model/name}
+  ValueSpecPattern String
+  deriving (Eq, Ord, Read, Show)
+_ValueSpec = Core.Name "hydra.pg.mapping.ValueSpec"
+_ValueSpec_value = Core.Name "value"
+_ValueSpec_pattern = Core.Name "pattern"
+-- | A mapping specification producing vertices of a specified label
+data VertexSpec =
+  VertexSpec {
+    -- | The label of the target vertices, which must conform to the vertex type associated with that label.
+    vertexSpecLabel :: Model.VertexLabel,
+    -- | A specification of the id of each target vertex
+    vertexSpecId :: ValueSpec,
+    -- | Zero or more property specifications for each target vertex
+    vertexSpecProperties :: [PropertySpec]}
+  deriving (Eq, Ord, Read, Show)
+_VertexSpec = Core.Name "hydra.pg.mapping.VertexSpec"
+_VertexSpec_label = Core.Name "label"
+_VertexSpec_id = Core.Name "id"
+_VertexSpec_properties = Core.Name "properties"
diff --git a/src/main/haskell/Hydra/Pg/Model.hs b/src/main/haskell/Hydra/Pg/Model.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/Model.hs
@@ -0,0 +1,241 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A typed property graph data model. Property graphs are parameterized a type for property and id values, while property graph schemas are parameterized by a type for property and id types
+
+module Hydra.Pg.Model where
+import qualified Hydra.Core as Core
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Map as M
+-- | An edge which is adjacent to a given vertex. Only the other endpoint of the edge is provided.
+data AdjacentEdge v =
+  AdjacentEdge {
+    -- | The label of the edge
+    adjacentEdgeLabel :: EdgeLabel,
+    -- | The unique identifier of the edge
+    adjacentEdgeId :: v,
+    -- | The id of the other vertex adjacent to the edge
+    adjacentEdgeVertex :: v,
+    -- | A key/value map of edge properties
+    adjacentEdgeProperties :: (M.Map PropertyKey v)}
+  deriving (Eq, Ord, Read, Show)
+_AdjacentEdge = Core.Name "hydra.pg.model.AdjacentEdge"
+_AdjacentEdge_label = Core.Name "label"
+_AdjacentEdge_id = Core.Name "id"
+_AdjacentEdge_vertex = Core.Name "vertex"
+_AdjacentEdge_properties = Core.Name "properties"
+-- | The direction of an edge or edge pattern
+data Direction =
+  DirectionOut |
+  DirectionIn |
+  DirectionBoth |
+  DirectionUndirected
+  deriving (Eq, Ord, Read, Show)
+_Direction = Core.Name "hydra.pg.model.Direction"
+_Direction_out = Core.Name "out"
+_Direction_in = Core.Name "in"
+_Direction_both = Core.Name "both"
+_Direction_undirected = Core.Name "undirected"
+-- | An edge
+data Edge v =
+  Edge {
+    -- | The label of the edge
+    edgeLabel :: EdgeLabel,
+    -- | The unique identifier of the edge
+    edgeId :: v,
+    -- | The id of the out-vertex (tail) of the edge
+    edgeOut :: v,
+    -- | The id of the in-vertex (head) of the edge
+    edgeIn :: v,
+    -- | A key/value map of edge properties
+    edgeProperties :: (M.Map PropertyKey v)}
+  deriving (Eq, Ord, Read, Show)
+_Edge = Core.Name "hydra.pg.model.Edge"
+_Edge_label = Core.Name "label"
+_Edge_id = Core.Name "id"
+_Edge_out = Core.Name "out"
+_Edge_in = Core.Name "in"
+_Edge_properties = Core.Name "properties"
+-- | The label of an edge
+newtype EdgeLabel =
+  EdgeLabel {
+    unEdgeLabel :: String}
+  deriving (Eq, Ord, Read, Show)
+_EdgeLabel = Core.Name "hydra.pg.model.EdgeLabel"
+-- | The type of an edge
+data EdgeType t =
+  EdgeType {
+    -- | The label of any edge of this edge type
+    edgeTypeLabel :: EdgeLabel,
+    -- | The type of the id of any edge of this edge type
+    edgeTypeId :: t,
+    -- | The label of the out-vertex (tail) of any edge of this edge type
+    edgeTypeOut :: VertexLabel,
+    -- | The label of the in-vertex (head) of any edge of this edge type
+    edgeTypeIn :: VertexLabel,
+    -- | A list of property types. The types are ordered for the sake of applications in which property order is significant.
+    edgeTypeProperties :: [PropertyType t]}
+  deriving (Eq, Ord, Read, Show)
+_EdgeType = Core.Name "hydra.pg.model.EdgeType"
+_EdgeType_label = Core.Name "label"
+_EdgeType_id = Core.Name "id"
+_EdgeType_out = Core.Name "out"
+_EdgeType_in = Core.Name "in"
+_EdgeType_properties = Core.Name "properties"
+-- | Either a vertex or an edge
+data Element v =
+  ElementVertex (Vertex v) |
+  ElementEdge (Edge v)
+  deriving (Eq, Ord, Read, Show)
+_Element = Core.Name "hydra.pg.model.Element"
+_Element_vertex = Core.Name "vertex"
+_Element_edge = Core.Name "edge"
+-- | The kind of an element: vertex or edge
+data ElementKind =
+  ElementKindVertex |
+  ElementKindEdge
+  deriving (Eq, Ord, Read, Show)
+_ElementKind = Core.Name "hydra.pg.model.ElementKind"
+_ElementKind_vertex = Core.Name "vertex"
+_ElementKind_edge = Core.Name "edge"
+-- | An element together with its dependencies in some context
+data ElementTree v =
+  ElementTree {
+    elementTreeSelf :: (Element v),
+    elementTreeDependencies :: [ElementTree v]}
+  deriving (Eq, Ord, Read, Show)
+_ElementTree = Core.Name "hydra.pg.model.ElementTree"
+_ElementTree_self = Core.Name "self"
+_ElementTree_dependencies = Core.Name "dependencies"
+-- | The type of a vertex or edge
+data ElementType t =
+  ElementTypeVertex (VertexType t) |
+  ElementTypeEdge (EdgeType t)
+  deriving (Eq, Ord, Read, Show)
+_ElementType = Core.Name "hydra.pg.model.ElementType"
+_ElementType_vertex = Core.Name "vertex"
+_ElementType_edge = Core.Name "edge"
+-- | An element type together with its dependencies in some context
+data ElementTypeTree t =
+  ElementTypeTree {
+    elementTypeTreeSelf :: (ElementType t),
+    elementTypeTreeDependencies :: [ElementTypeTree t]}
+  deriving (Eq, Ord, Read, Show)
+_ElementTypeTree = Core.Name "hydra.pg.model.ElementTypeTree"
+_ElementTypeTree_self = Core.Name "self"
+_ElementTypeTree_dependencies = Core.Name "dependencies"
+-- | A graph; a self-contained collection of vertices and edges
+data Graph v =
+  Graph {
+    graphVertices :: (M.Map v (Vertex v)),
+    graphEdges :: (M.Map v (Edge v))}
+  deriving (Eq, Ord, Read, Show)
+_Graph = Core.Name "hydra.pg.model.Graph"
+_Graph_vertices = Core.Name "vertices"
+_Graph_edges = Core.Name "edges"
+-- | A graph schema; a vertex and edge types for the vertices and edges of a graph conforming to the schema
+data GraphSchema t =
+  GraphSchema {
+    -- | A unique vertex type for each vertex label which may occur in a graph
+    graphSchemaVertices :: (M.Map VertexLabel (VertexType t)),
+    -- | A unique edge type for each edge label which may occur in a graph
+    graphSchemaEdges :: (M.Map EdgeLabel (EdgeType t))}
+  deriving (Eq, Ord, Read, Show)
+_GraphSchema = Core.Name "hydra.pg.model.GraphSchema"
+_GraphSchema_vertices = Core.Name "vertices"
+_GraphSchema_edges = Core.Name "edges"
+-- | Either a vertex or edge label
+data Label =
+  LabelVertex VertexLabel |
+  LabelEdge EdgeLabel
+  deriving (Eq, Ord, Read, Show)
+_Label = Core.Name "hydra.pg.model.Label"
+_Label_vertex = Core.Name "vertex"
+_Label_edge = Core.Name "edge"
+-- | A graph which does not assume that vertex or edge ids are unique. This is useful in mappings because the id specifications for vertices and/or edges may be non-unique.
+data LazyGraph v =
+  LazyGraph {
+    lazyGraphVertices :: [Vertex v],
+    lazyGraphEdges :: [Edge v]}
+  deriving (Eq, Ord, Read, Show)
+_LazyGraph = Core.Name "hydra.pg.model.LazyGraph"
+_LazyGraph_vertices = Core.Name "vertices"
+_LazyGraph_edges = Core.Name "edges"
+-- | A key/value property
+data Property v =
+  Property {
+    -- | They key of the property
+    propertyKey :: PropertyKey,
+    -- | The value of the property
+    propertyValue :: v}
+  deriving (Eq, Ord, Read, Show)
+_Property = Core.Name "hydra.pg.model.Property"
+_Property_key = Core.Name "key"
+_Property_value = Core.Name "value"
+-- | A property key
+newtype PropertyKey =
+  PropertyKey {
+    unPropertyKey :: String}
+  deriving (Eq, Ord, Read, Show)
+_PropertyKey = Core.Name "hydra.pg.model.PropertyKey"
+-- | The type of a property
+data PropertyType t =
+  PropertyType {
+    -- | A property's key
+    propertyTypeKey :: PropertyKey,
+    -- | The type of a property's value
+    propertyTypeValue :: t,
+    -- | Whether the property is required; values may be omitted from a property map otherwise
+    propertyTypeRequired :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_PropertyType = Core.Name "hydra.pg.model.PropertyType"
+_PropertyType_key = Core.Name "key"
+_PropertyType_value = Core.Name "value"
+_PropertyType_required = Core.Name "required"
+-- | A vertex
+data Vertex v =
+  Vertex {
+    -- | The label of the vertex
+    vertexLabel :: VertexLabel,
+    -- | The unique identifier of the vertex
+    vertexId :: v,
+    -- | A key/value map of vertex properties
+    vertexProperties :: (M.Map PropertyKey v)}
+  deriving (Eq, Ord, Read, Show)
+_Vertex = Core.Name "hydra.pg.model.Vertex"
+_Vertex_label = Core.Name "label"
+_Vertex_id = Core.Name "id"
+_Vertex_properties = Core.Name "properties"
+-- | The label of a vertex. The default (null) vertex is represented by the empty string
+newtype VertexLabel =
+  VertexLabel {
+    unVertexLabel :: String}
+  deriving (Eq, Ord, Read, Show)
+_VertexLabel = Core.Name "hydra.pg.model.VertexLabel"
+-- | The type of a vertex
+data VertexType t =
+  VertexType {
+    -- | The label of any vertex of this vertex type
+    vertexTypeLabel :: VertexLabel,
+    -- | The type of the id of any vertex of this vertex type
+    vertexTypeId :: t,
+    -- | A list of property types. The types are ordered for the sake of applications in which property order is significant.
+    vertexTypeProperties :: [PropertyType t]}
+  deriving (Eq, Ord, Read, Show)
+_VertexType = Core.Name "hydra.pg.model.VertexType"
+_VertexType_label = Core.Name "label"
+_VertexType_id = Core.Name "id"
+_VertexType_properties = Core.Name "properties"
+-- | A vertex together with any outgoing and/or incoming edges; a vertex object
+data VertexWithAdjacentEdges v =
+  VertexWithAdjacentEdges {
+    -- | The focus vertex
+    vertexWithAdjacentEdgesVertex :: (Vertex v),
+    -- | An adjacency list of edges in which the focus vertex is the head (in-vertex) of the edge
+    vertexWithAdjacentEdgesIns :: [AdjacentEdge v],
+    -- | An adjacency list of edges in which the focus vertex is the tail (out-vertex) of the edge
+    vertexWithAdjacentEdgesOuts :: [AdjacentEdge v]}
+  deriving (Eq, Ord, Read, Show)
+_VertexWithAdjacentEdges = Core.Name "hydra.pg.model.VertexWithAdjacentEdges"
+_VertexWithAdjacentEdges_vertex = Core.Name "vertex"
+_VertexWithAdjacentEdges_ins = Core.Name "ins"
+_VertexWithAdjacentEdges_outs = Core.Name "outs"
diff --git a/src/main/haskell/Hydra/Pg/Printing.hs b/src/main/haskell/Hydra/Pg/Printing.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/Printing.hs
@@ -0,0 +1,103 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Printing functions for property graph elements
+
+module Hydra.Pg.Printing where
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Json.Model as JsonModel
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Pg.Model as PgModel
+import qualified Hydra.Query as Query
+import qualified Hydra.Relational as Relational
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Print an edge using the provided value printer
+printEdge :: (t0 -> String) -> PgModel.Edge t0 -> String
+printEdge printValue edge =
+
+      let label = PgModel.unEdgeLabel (PgModel.edgeLabel edge)
+          id = printValue (PgModel.edgeId edge)
+          outId = printValue (PgModel.edgeOut edge)
+          inId = printValue (PgModel.edgeIn edge)
+          props =
+                  Strings.intercalate ", " (Lists.map (\p -> printProperty printValue (Pairs.first p) (Pairs.second p)) (Maps.toList (PgModel.edgeProperties edge)))
+      in (Strings.cat [
+        id,
+        ": ",
+        "(",
+        outId,
+        ")-[:",
+        label,
+        " {",
+        props,
+        "}]->(",
+        inId,
+        ")"])
+-- | Print a graph using the provided value printer
+printGraph :: Ord t0 => ((t0 -> String) -> PgModel.Graph t0 -> String)
+printGraph printValue graph =
+    printLazyGraph printValue (PgModel.LazyGraph {
+      PgModel.lazyGraphVertices = (Maps.elems (PgModel.graphVertices graph)),
+      PgModel.lazyGraphEdges = (Maps.elems (PgModel.graphEdges graph))})
+-- | Print a lazy graph using the provided value printer
+printLazyGraph :: (t0 -> String) -> PgModel.LazyGraph t0 -> String
+printLazyGraph printValue lg =
+
+      let vertices = PgModel.lazyGraphVertices lg
+          edges = PgModel.lazyGraphEdges lg
+      in (Strings.cat [
+        "vertices:",
+        (Strings.cat (Lists.map (\v -> Strings.cat [
+          "\n\t",
+          (printVertex printValue v)]) vertices)),
+        "\nedges:",
+        (Strings.cat (Lists.map (\e -> Strings.cat [
+          "\n\t",
+          (printEdge printValue e)]) edges))])
+-- | Print a property using the provided value printer
+printProperty :: (t0 -> String) -> PgModel.PropertyKey -> t0 -> String
+printProperty printValue key value =
+    Strings.cat [
+      PgModel.unPropertyKey key,
+      ": ",
+      (printValue value)]
+-- | Print a vertex using the provided value printer
+printVertex :: (t0 -> String) -> PgModel.Vertex t0 -> String
+printVertex printValue vertex =
+
+      let label = PgModel.unVertexLabel (PgModel.vertexLabel vertex)
+          id = printValue (PgModel.vertexId vertex)
+          props =
+                  Strings.intercalate ", " (Lists.map (\p -> printProperty printValue (Pairs.first p) (Pairs.second p)) (Maps.toList (PgModel.vertexProperties vertex)))
+      in (Strings.cat [
+        id,
+        ": (",
+        label,
+        ": {",
+        props,
+        "})"])
diff --git a/src/main/haskell/Hydra/Pg/Query.hs b/src/main/haskell/Hydra/Pg/Query.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/Query.hs
@@ -0,0 +1,219 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A common model for pattern-matching queries over property graphs
+
+module Hydra.Pg.Query where
+import qualified Hydra.Core as Core
+import qualified Hydra.Pg.Model as Model
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+data AggregationQuery =
+  AggregationQueryCount
+  deriving (Eq, Ord, Read, Show)
+_AggregationQuery = Core.Name "hydra.pg.query.AggregationQuery"
+_AggregationQuery_count = Core.Name "count"
+newtype ApplicationQuery =
+  ApplicationQuery {
+    unApplicationQuery :: [Query]}
+  deriving (Eq, Ord, Read, Show)
+_ApplicationQuery = Core.Name "hydra.pg.query.ApplicationQuery"
+data AssociativeExpression =
+  AssociativeExpression {
+    associativeExpressionOperator :: BinaryOperator,
+    associativeExpressionOperands :: [Expression]}
+  deriving (Eq, Ord, Read, Show)
+_AssociativeExpression = Core.Name "hydra.pg.query.AssociativeExpression"
+_AssociativeExpression_operator = Core.Name "operator"
+_AssociativeExpression_operands = Core.Name "operands"
+data BinaryExpression =
+  BinaryExpression {
+    binaryExpressionLeft :: Expression,
+    binaryExpressionOperator :: BinaryOperator,
+    binaryExpressionRight :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_BinaryExpression = Core.Name "hydra.pg.query.BinaryExpression"
+_BinaryExpression_left = Core.Name "left"
+_BinaryExpression_operator = Core.Name "operator"
+_BinaryExpression_right = Core.Name "right"
+data BinaryBooleanOperator =
+  BinaryBooleanOperatorAnd |
+  BinaryBooleanOperatorOr |
+  BinaryBooleanOperatorXor
+  deriving (Eq, Ord, Read, Show)
+_BinaryBooleanOperator = Core.Name "hydra.pg.query.BinaryBooleanOperator"
+_BinaryBooleanOperator_and = Core.Name "and"
+_BinaryBooleanOperator_or = Core.Name "or"
+_BinaryBooleanOperator_xor = Core.Name "xor"
+data BinaryOperator =
+  BinaryOperatorBoolean BinaryBooleanOperator |
+  BinaryOperatorComparison ComparisonOperator |
+  BinaryOperatorPower
+  deriving (Eq, Ord, Read, Show)
+_BinaryOperator = Core.Name "hydra.pg.query.BinaryOperator"
+_BinaryOperator_boolean = Core.Name "boolean"
+_BinaryOperator_comparison = Core.Name "comparison"
+_BinaryOperator_power = Core.Name "power"
+data Binding =
+  Binding {
+    bindingKey :: Variable,
+    bindingValue :: Query}
+  deriving (Eq, Ord, Read, Show)
+_Binding = Core.Name "hydra.pg.query.Binding"
+_Binding_key = Core.Name "key"
+_Binding_value = Core.Name "value"
+data ComparisonOperator =
+  ComparisonOperatorEq |
+  ComparisonOperatorNeq |
+  ComparisonOperatorLt |
+  ComparisonOperatorLte |
+  ComparisonOperatorGt |
+  ComparisonOperatorGte
+  deriving (Eq, Ord, Read, Show)
+_ComparisonOperator = Core.Name "hydra.pg.query.ComparisonOperator"
+_ComparisonOperator_eq = Core.Name "eq"
+_ComparisonOperator_neq = Core.Name "neq"
+_ComparisonOperator_lt = Core.Name "lt"
+_ComparisonOperator_lte = Core.Name "lte"
+_ComparisonOperator_gt = Core.Name "gt"
+_ComparisonOperator_gte = Core.Name "gte"
+data EdgeProjectionPattern =
+  EdgeProjectionPattern {
+    edgeProjectionPatternDirection :: Model.Direction,
+    edgeProjectionPatternLabel :: (Maybe Model.EdgeLabel),
+    edgeProjectionPatternProperties :: [PropertyPattern],
+    edgeProjectionPatternVertex :: (Maybe VertexPattern)}
+  deriving (Eq, Ord, Read, Show)
+_EdgeProjectionPattern = Core.Name "hydra.pg.query.EdgeProjectionPattern"
+_EdgeProjectionPattern_direction = Core.Name "direction"
+_EdgeProjectionPattern_label = Core.Name "label"
+_EdgeProjectionPattern_properties = Core.Name "properties"
+_EdgeProjectionPattern_vertex = Core.Name "vertex"
+data Expression =
+  ExpressionAssociative AssociativeExpression |
+  ExpressionBinary BinaryExpression |
+  ExpressionProperty PropertyProjection |
+  ExpressionUnary UnaryExpression |
+  ExpressionVariable Variable |
+  ExpressionVertex VertexPattern
+  deriving (Eq, Ord, Read, Show)
+_Expression = Core.Name "hydra.pg.query.Expression"
+_Expression_associative = Core.Name "associative"
+_Expression_binary = Core.Name "binary"
+_Expression_property = Core.Name "property"
+_Expression_unary = Core.Name "unary"
+_Expression_variable = Core.Name "variable"
+_Expression_vertex = Core.Name "vertex"
+data LetQuery =
+  LetQuery {
+    letQueryBindings :: [Binding],
+    letQueryEnvironment :: Query}
+  deriving (Eq, Ord, Read, Show)
+_LetQuery = Core.Name "hydra.pg.query.LetQuery"
+_LetQuery_bindings = Core.Name "bindings"
+_LetQuery_environment = Core.Name "environment"
+data MatchQuery =
+  MatchQuery {
+    matchQueryOptional :: Bool,
+    matchQueryPattern :: [Projection],
+    matchQueryWhere :: (Maybe Expression)}
+  deriving (Eq, Ord, Read, Show)
+_MatchQuery = Core.Name "hydra.pg.query.MatchQuery"
+_MatchQuery_optional = Core.Name "optional"
+_MatchQuery_pattern = Core.Name "pattern"
+_MatchQuery_where = Core.Name "where"
+data Projection =
+  Projection {
+    projectionValue :: Expression,
+    projectionAs :: (Maybe Variable)}
+  deriving (Eq, Ord, Read, Show)
+_Projection = Core.Name "hydra.pg.query.Projection"
+_Projection_value = Core.Name "value"
+_Projection_as = Core.Name "as"
+data Projections =
+  Projections {
+    projectionsAll :: Bool,
+    projectionsExplicit :: [Projection]}
+  deriving (Eq, Ord, Read, Show)
+_Projections = Core.Name "hydra.pg.query.Projections"
+_Projections_all = Core.Name "all"
+_Projections_explicit = Core.Name "explicit"
+data PropertyPattern =
+  PropertyPattern {
+    propertyPatternKey :: Model.PropertyKey,
+    propertyPatternValue :: PropertyValuePattern}
+  deriving (Eq, Ord, Read, Show)
+_PropertyPattern = Core.Name "hydra.pg.query.PropertyPattern"
+_PropertyPattern_key = Core.Name "key"
+_PropertyPattern_value = Core.Name "value"
+data PropertyProjection =
+  PropertyProjection {
+    propertyProjectionBase :: Expression,
+    propertyProjectionKey :: Model.PropertyKey}
+  deriving (Eq, Ord, Read, Show)
+_PropertyProjection = Core.Name "hydra.pg.query.PropertyProjection"
+_PropertyProjection_base = Core.Name "base"
+_PropertyProjection_key = Core.Name "key"
+newtype PropertyValue =
+  PropertyValue {
+    unPropertyValue :: String}
+  deriving (Eq, Ord, Read, Show)
+_PropertyValue = Core.Name "hydra.pg.query.PropertyValue"
+data PropertyValuePattern =
+  PropertyValuePatternVariable Model.PropertyKey |
+  PropertyValuePatternValue String
+  deriving (Eq, Ord, Read, Show)
+_PropertyValuePattern = Core.Name "hydra.pg.query.PropertyValuePattern"
+_PropertyValuePattern_variable = Core.Name "variable"
+_PropertyValuePattern_value = Core.Name "value"
+data Query =
+  QueryApplication ApplicationQuery |
+  QueryAggregate AggregationQuery |
+  QueryLetQuery LetQuery |
+  QueryMatch MatchQuery |
+  QuerySelect SelectQuery |
+  QueryValue String
+  deriving (Eq, Ord, Read, Show)
+_Query = Core.Name "hydra.pg.query.Query"
+_Query_application = Core.Name "application"
+_Query_aggregate = Core.Name "aggregate"
+_Query_LetQuery = Core.Name "LetQuery"
+_Query_match = Core.Name "match"
+_Query_select = Core.Name "select"
+_Query_value = Core.Name "value"
+data SelectQuery =
+  SelectQuery {
+    selectQueryDistinct :: Bool,
+    selectQueryProjection :: Projections}
+  deriving (Eq, Ord, Read, Show)
+_SelectQuery = Core.Name "hydra.pg.query.SelectQuery"
+_SelectQuery_distinct = Core.Name "distinct"
+_SelectQuery_projection = Core.Name "projection"
+data UnaryExpression =
+  UnaryExpression {
+    unaryExpressionOperator :: UnaryOperator,
+    unaryExpressionOperand :: Expression}
+  deriving (Eq, Ord, Read, Show)
+_UnaryExpression = Core.Name "hydra.pg.query.UnaryExpression"
+_UnaryExpression_operator = Core.Name "operator"
+_UnaryExpression_operand = Core.Name "operand"
+data UnaryOperator =
+  UnaryOperatorNegate
+  deriving (Eq, Ord, Read, Show)
+_UnaryOperator = Core.Name "hydra.pg.query.UnaryOperator"
+_UnaryOperator_negate = Core.Name "negate"
+newtype Variable =
+  Variable {
+    unVariable :: String}
+  deriving (Eq, Ord, Read, Show)
+_Variable = Core.Name "hydra.pg.query.Variable"
+data VertexPattern =
+  VertexPattern {
+    vertexPatternVariable :: (Maybe Variable),
+    vertexPatternLabel :: (Maybe Model.VertexLabel),
+    vertexPatternProperties :: [PropertyPattern],
+    vertexPatternEdges :: [EdgeProjectionPattern]}
+  deriving (Eq, Ord, Read, Show)
+_VertexPattern = Core.Name "hydra.pg.query.VertexPattern"
+_VertexPattern_variable = Core.Name "variable"
+_VertexPattern_label = Core.Name "label"
+_VertexPattern_properties = Core.Name "properties"
+_VertexPattern_edges = Core.Name "edges"
diff --git a/src/main/haskell/Hydra/Pg/Rdf/Environment.hs b/src/main/haskell/Hydra/Pg/Rdf/Environment.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/Rdf/Environment.hs
@@ -0,0 +1,31 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Environment types for property graph to RDF mapping
+
+module Hydra.Pg.Rdf.Environment where
+import qualified Hydra.Core as Core
+import qualified Hydra.Pg.Model as Model
+import qualified Hydra.Rdf.Syntax as Syntax
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | The environment for property graph to RDF mapping
+data PgRdfEnvironment v =
+  PgRdfEnvironment {
+    -- | A function which encodes a vertex id as an RDF IRI
+    pgRdfEnvironmentEncodeVertexId :: (v -> Syntax.Iri),
+    -- | A function which encodes a vertex label as an RDF IRI
+    pgRdfEnvironmentEncodeVertexLabel :: (Model.VertexLabel -> Syntax.Iri),
+    -- | A function which encodes an edge id as an RDF IRI
+    pgRdfEnvironmentEncodeEdgeId :: (v -> Syntax.Iri),
+    -- | A function which encodes an edge label as an RDF IRI
+    pgRdfEnvironmentEncodeEdgeLabel :: (Model.EdgeLabel -> Syntax.Iri),
+    -- | A function which encodes a property key as an RDF IRI
+    pgRdfEnvironmentEncodePropertyKey :: (Model.PropertyKey -> Syntax.Iri),
+    -- | A function which encodes a property value as an RDF literal
+    pgRdfEnvironmentEncodePropertyValue :: (v -> Syntax.Literal)}
+_PgRdfEnvironment = Core.Name "hydra.pg.rdf.environment.PgRdfEnvironment"
+_PgRdfEnvironment_encodeVertexId = Core.Name "encodeVertexId"
+_PgRdfEnvironment_encodeVertexLabel = Core.Name "encodeVertexLabel"
+_PgRdfEnvironment_encodeEdgeId = Core.Name "encodeEdgeId"
+_PgRdfEnvironment_encodeEdgeLabel = Core.Name "encodeEdgeLabel"
+_PgRdfEnvironment_encodePropertyKey = Core.Name "encodePropertyKey"
+_PgRdfEnvironment_encodePropertyValue = Core.Name "encodePropertyValue"
diff --git a/src/main/haskell/Hydra/Pg/Rdf/Mappings.hs b/src/main/haskell/Hydra/Pg/Rdf/Mappings.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/Rdf/Mappings.hs
@@ -0,0 +1,215 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Mappings from property graph schemas to SHACL shapes graphs, and from property graph data to RDF graphs
+
+module Hydra.Pg.Rdf.Mappings where
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Json.Model as JsonModel
+import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Pg.Model as PgModel
+import qualified Hydra.Pg.Rdf.Environment as Environment
+import qualified Hydra.Query as Query
+import qualified Hydra.Rdf.Syntax as Syntax
+import qualified Hydra.Rdf.Utils as Utils
+import qualified Hydra.Relational as Relational
+import qualified Hydra.Shacl.Model as ShaclModel
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Convert edge types into property shape constraints for a given vertex label
+edgeTypesToPropertyShapes :: t0 -> (PgModel.EdgeLabel -> Syntax.Iri) -> PgModel.VertexLabel -> [PgModel.EdgeType t1] -> [ShaclModel.CommonConstraint]
+edgeTypesToPropertyShapes encodeVertexLabel encodeEdgeLabel vertexLabel edgeTypes =
+    Lists.concat (Lists.map (\et ->
+      let outLabel = PgModel.edgeTypeOut et
+          matchesVertex = Equality.equal (PgModel.unVertexLabel outLabel) (PgModel.unVertexLabel vertexLabel)
+          edgeShape =
+                  ShaclModel.CommonConstraintProperty (Sets.singleton (ShaclModel.ReferenceAnonymous (ShaclModel.PropertyShape {
+                    ShaclModel.propertyShapeCommon = ShaclModel.CommonProperties {
+                      ShaclModel.commonPropertiesConstraints = (Sets.singleton (ShaclModel.CommonConstraintClass (Sets.singleton (Syntax.RdfsClass ())))),
+                      ShaclModel.commonPropertiesDeactivated = Nothing,
+                      ShaclModel.commonPropertiesMessage = Utils.emptyLangStrings,
+                      ShaclModel.commonPropertiesSeverity = ShaclModel.SeverityViolation,
+                      ShaclModel.commonPropertiesTargetClass = Sets.empty,
+                      ShaclModel.commonPropertiesTargetNode = Sets.empty,
+                      ShaclModel.commonPropertiesTargetObjectsOf = Sets.empty,
+                      ShaclModel.commonPropertiesTargetSubjectsOf = Sets.empty},
+                    ShaclModel.propertyShapeConstraints = Sets.empty,
+                    ShaclModel.propertyShapeDefaultValue = Nothing,
+                    ShaclModel.propertyShapeDescription = Utils.emptyLangStrings,
+                    ShaclModel.propertyShapeName = Utils.emptyLangStrings,
+                    ShaclModel.propertyShapeOrder = Nothing,
+                    ShaclModel.propertyShapePath = (encodeEdgeLabel (PgModel.edgeTypeLabel et))})))
+      in (Logic.ifElse matchesVertex [
+        edgeShape] [])) edgeTypes)
+-- | Encode a property graph edge as an RDF description
+encodeEdge :: Environment.PgRdfEnvironment t0 -> PgModel.Edge t0 -> Syntax.Description
+encodeEdge env edge =
+
+      let elab = PgModel.edgeLabel edge
+          eout = PgModel.edgeOut edge
+          ein = PgModel.edgeIn edge
+          subj = Syntax.ResourceIri (Environment.pgRdfEnvironmentEncodeVertexId env eout)
+          obj = Syntax.NodeIri (Environment.pgRdfEnvironmentEncodeVertexId env ein)
+          pred = Environment.pgRdfEnvironmentEncodeEdgeLabel env elab
+      in Syntax.Description {
+        Syntax.descriptionSubject = (Utils.resourceToNode subj),
+        Syntax.descriptionGraph = (Syntax.Graph (Sets.singleton (Syntax.Triple {
+          Syntax.tripleSubject = subj,
+          Syntax.triplePredicate = pred,
+          Syntax.tripleObject = obj})))}
+-- | Encode a lazy property graph as an RDF graph
+encodeLazyGraph :: Environment.PgRdfEnvironment t0 -> PgModel.LazyGraph t0 -> Syntax.Graph
+encodeLazyGraph env lg =
+
+      let vertexDescs = Lists.map (encodeVertex env) (PgModel.lazyGraphVertices lg)
+          edgeDescs = Lists.map (encodeEdge env) (PgModel.lazyGraphEdges lg)
+          allDescs =
+                  Lists.concat [
+                    vertexDescs,
+                    edgeDescs]
+      in (Utils.descriptionsToGraph allDescs)
+-- | Encode a property graph vertex as an RDF description
+encodeVertex :: Environment.PgRdfEnvironment t0 -> PgModel.Vertex t0 -> Syntax.Description
+encodeVertex env vertex =
+
+      let vlab = PgModel.vertexLabel vertex
+          vid = PgModel.vertexId vertex
+          vprops = PgModel.vertexProperties vertex
+          subj = Syntax.ResourceIri (Environment.pgRdfEnvironmentEncodeVertexId env vid)
+          rtype = Syntax.NodeIri (Environment.pgRdfEnvironmentEncodeVertexLabel env vlab)
+          typeTriple =
+                  Syntax.Triple {
+                    Syntax.tripleSubject = subj,
+                    Syntax.triplePredicate = (Utils.rdfIri "type"),
+                    Syntax.tripleObject = rtype}
+          propTriples =
+                  Lists.map (\kv ->
+                    let key = Pairs.first kv
+                        val = Pairs.second kv
+                        pred = Environment.pgRdfEnvironmentEncodePropertyKey env key
+                        obj = Syntax.NodeLiteral (Environment.pgRdfEnvironmentEncodePropertyValue env val)
+                    in Syntax.Triple {
+                      Syntax.tripleSubject = subj,
+                      Syntax.triplePredicate = pred,
+                      Syntax.tripleObject = obj}) (Maps.toList vprops)
+          allTriples = Lists.cons typeTriple propTriples
+      in Syntax.Description {
+        Syntax.descriptionSubject = (Utils.resourceToNode subj),
+        Syntax.descriptionGraph = (Syntax.Graph (Sets.fromList allTriples))}
+-- | Convert a property graph schema to a SHACL shapes graph
+graphSchemaToShapesGraph :: (t0 -> Syntax.Iri) -> (PgModel.VertexLabel -> Syntax.Iri) -> (PgModel.EdgeLabel -> Syntax.Iri) -> (PgModel.PropertyKey -> Syntax.Iri) -> PgModel.GraphSchema t0 -> ShaclModel.ShapesGraph
+graphSchemaToShapesGraph encodeType encodeVertexLabel encodeEdgeLabel encodeKey schema =
+
+      let vertexTypes = Maps.elems (PgModel.graphSchemaVertices schema)
+          edgeTypes = Maps.elems (PgModel.graphSchemaEdges schema)
+          defs =
+                  Lists.map (\vt ->
+                    let baseDef = vertexTypeToNodeShape encodeType encodeVertexLabel encodeKey vt
+                        edgeShapes = edgeTypesToPropertyShapes encodeVertexLabel encodeEdgeLabel (PgModel.vertexTypeLabel vt) edgeTypes
+                        baseShape = ShaclModel.definitionTarget baseDef
+                        baseNode =
+                                case baseShape of
+                                  ShaclModel.ShapeNode v0 -> v0
+                                  ShaclModel.ShapeProperty _ -> ShaclModel.NodeShape {
+                                    ShaclModel.nodeShapeCommon = ShaclModel.CommonProperties {
+                                      ShaclModel.commonPropertiesConstraints = Sets.empty,
+                                      ShaclModel.commonPropertiesDeactivated = Nothing,
+                                      ShaclModel.commonPropertiesMessage = Utils.emptyLangStrings,
+                                      ShaclModel.commonPropertiesSeverity = ShaclModel.SeverityViolation,
+                                      ShaclModel.commonPropertiesTargetClass = Sets.empty,
+                                      ShaclModel.commonPropertiesTargetNode = Sets.empty,
+                                      ShaclModel.commonPropertiesTargetObjectsOf = Sets.empty,
+                                      ShaclModel.commonPropertiesTargetSubjectsOf = Sets.empty}}
+                        baseCommon = ShaclModel.nodeShapeCommon baseNode
+                        mergedConstraints = Sets.union (ShaclModel.commonPropertiesConstraints baseCommon) (Sets.fromList edgeShapes)
+                        updatedCommon =
+                                ShaclModel.CommonProperties {
+                                  ShaclModel.commonPropertiesConstraints = mergedConstraints,
+                                  ShaclModel.commonPropertiesDeactivated = (ShaclModel.commonPropertiesDeactivated baseCommon),
+                                  ShaclModel.commonPropertiesMessage = (ShaclModel.commonPropertiesMessage baseCommon),
+                                  ShaclModel.commonPropertiesSeverity = (ShaclModel.commonPropertiesSeverity baseCommon),
+                                  ShaclModel.commonPropertiesTargetClass = (ShaclModel.commonPropertiesTargetClass baseCommon),
+                                  ShaclModel.commonPropertiesTargetNode = (ShaclModel.commonPropertiesTargetNode baseCommon),
+                                  ShaclModel.commonPropertiesTargetObjectsOf = (ShaclModel.commonPropertiesTargetObjectsOf baseCommon),
+                                  ShaclModel.commonPropertiesTargetSubjectsOf = (ShaclModel.commonPropertiesTargetSubjectsOf baseCommon)}
+                        updatedShape = ShaclModel.ShapeNode (ShaclModel.NodeShape {
+                              ShaclModel.nodeShapeCommon = updatedCommon})
+                    in ShaclModel.Definition {
+                      ShaclModel.definitionIri = (ShaclModel.definitionIri baseDef),
+                      ShaclModel.definitionTarget = updatedShape}) vertexTypes
+      in (ShaclModel.ShapesGraph (Sets.fromList defs))
+-- | Convert a property type to a SHACL property shape
+propertyTypeToPropertyShape :: (t0 -> Syntax.Iri) -> (PgModel.PropertyKey -> Syntax.Iri) -> PgModel.PropertyType t0 -> ShaclModel.PropertyShape
+propertyTypeToPropertyShape encodeType encodeKey pt =
+
+      let key = PgModel.propertyTypeKey pt
+          path = encodeKey key
+          required_ = PgModel.propertyTypeRequired pt
+          dtIri = encodeType (PgModel.propertyTypeValue pt)
+          constraints = Sets.singleton (ShaclModel.CommonConstraintDatatype dtIri)
+          propConstraints = Logic.ifElse required_ (Sets.singleton (ShaclModel.PropertyShapeConstraintMinCount 1)) Sets.empty
+      in ShaclModel.PropertyShape {
+        ShaclModel.propertyShapeCommon = ShaclModel.CommonProperties {
+          ShaclModel.commonPropertiesConstraints = constraints,
+          ShaclModel.commonPropertiesDeactivated = Nothing,
+          ShaclModel.commonPropertiesMessage = Utils.emptyLangStrings,
+          ShaclModel.commonPropertiesSeverity = ShaclModel.SeverityViolation,
+          ShaclModel.commonPropertiesTargetClass = Sets.empty,
+          ShaclModel.commonPropertiesTargetNode = Sets.empty,
+          ShaclModel.commonPropertiesTargetObjectsOf = Sets.empty,
+          ShaclModel.commonPropertiesTargetSubjectsOf = Sets.empty},
+        ShaclModel.propertyShapeConstraints = propConstraints,
+        ShaclModel.propertyShapeDefaultValue = Nothing,
+        ShaclModel.propertyShapeDescription = Utils.emptyLangStrings,
+        ShaclModel.propertyShapeName = Utils.emptyLangStrings,
+        ShaclModel.propertyShapeOrder = Nothing,
+        ShaclModel.propertyShapePath = path}
+-- | Convert a vertex type to a SHACL node shape definition
+vertexTypeToNodeShape :: (t0 -> Syntax.Iri) -> (PgModel.VertexLabel -> Syntax.Iri) -> (PgModel.PropertyKey -> Syntax.Iri) -> PgModel.VertexType t0 -> ShaclModel.Definition ShaclModel.Shape
+vertexTypeToNodeShape encodeType encodeLabel encodeKey vt =
+
+      let label = PgModel.vertexTypeLabel vt
+          labelIri = encodeLabel label
+          propTypes = PgModel.vertexTypeProperties vt
+          propShapes =
+                  Lists.map (\pt -> ShaclModel.CommonConstraintProperty (Sets.singleton (ShaclModel.ReferenceAnonymous (propertyTypeToPropertyShape encodeType encodeKey pt)))) propTypes
+          common =
+                  ShaclModel.CommonProperties {
+                    ShaclModel.commonPropertiesConstraints = (Sets.fromList propShapes),
+                    ShaclModel.commonPropertiesDeactivated = Nothing,
+                    ShaclModel.commonPropertiesMessage = Utils.emptyLangStrings,
+                    ShaclModel.commonPropertiesSeverity = ShaclModel.SeverityViolation,
+                    ShaclModel.commonPropertiesTargetClass = (Sets.singleton (Syntax.RdfsClass ())),
+                    ShaclModel.commonPropertiesTargetNode = Sets.empty,
+                    ShaclModel.commonPropertiesTargetObjectsOf = Sets.empty,
+                    ShaclModel.commonPropertiesTargetSubjectsOf = Sets.empty}
+      in ShaclModel.Definition {
+        ShaclModel.definitionIri = labelIri,
+        ShaclModel.definitionTarget = (ShaclModel.ShapeNode (ShaclModel.NodeShape {
+          ShaclModel.nodeShapeCommon = common}))}
diff --git a/src/main/haskell/Hydra/Pg/TermsToElements.hs b/src/main/haskell/Hydra/Pg/TermsToElements.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/TermsToElements.hs
@@ -0,0 +1,264 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Functions for mapping Hydra terms to property graph elements using mapping specifications
+
+module Hydra.Pg.TermsToElements where
+import qualified Hydra.Annotations as Annotations
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.Extract.Core as ExtractCore
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Json.Model as JsonModel
+import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers
+import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Literals as Literals
+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Pg.Mapping as Mapping
+import qualified Hydra.Pg.Model as PgModel
+import qualified Hydra.Query as Query
+import qualified Hydra.Relational as Relational
+import qualified Hydra.Resolution as Resolution
+import qualified Hydra.Show.Core as ShowCore
+import qualified Hydra.Strip as Strip
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Map as M
+-- | Apply a parsed pattern to a term, producing string terms
+applyPattern :: t0 -> String -> [([String], String)] -> Core.Term -> Either Errors.Error [Core.Term]
+applyPattern cx firstLit pairs term =
+    Logic.ifElse (Lists.null pairs) (Right [
+      Core.TermLiteral (Core.LiteralString firstLit)]) (Eithers.bind (Eithers.mapList (\pp -> Eithers.map (\terms -> (Lists.map (\t -> termToString t) terms, (Pairs.second pp))) (evalPath cx (Pairs.first pp) term)) pairs) (\evaluated -> Right (Lists.map (\s -> Core.TermLiteral (Core.LiteralString s)) (Lists.foldl (\accum -> \ep ->
+      let pStrs = Pairs.first ep
+          litP = Pairs.second ep
+      in (Lists.concat (Lists.map (\pStr -> Lists.map (\a -> Strings.cat2 (Strings.cat2 a pStr) litP) accum) pStrs))) [
+      firstLit] evaluated))))
+-- | Decode an edge label from a term
+decodeEdgeLabel :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error PgModel.EdgeLabel
+decodeEdgeLabel cx g t = Eithers.map (\_x -> PgModel.EdgeLabel _x) (ExtractCore.string g t)
+-- | Decode an edge specification from a term
+decodeEdgeSpec :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Mapping.EdgeSpec
+decodeEdgeSpec cx g term =
+    readRecord cx g (\fields -> Eithers.bind (readField cx fields (Core.Name "label") (decodeEdgeLabel cx g)) (\_a -> Eithers.bind (readField cx fields (Core.Name "id") (decodeValueSpec cx g)) (\_b -> Eithers.bind (readField cx fields (Core.Name "out") (decodeValueSpec cx g)) (\_c -> Eithers.bind (readField cx fields (Core.Name "in") (decodeValueSpec cx g)) (\_d -> Eithers.map (\_e -> Mapping.EdgeSpec {
+      Mapping.edgeSpecLabel = _a,
+      Mapping.edgeSpecId = _b,
+      Mapping.edgeSpecOut = _c,
+      Mapping.edgeSpecIn = _d,
+      Mapping.edgeSpecProperties = _e}) (readField cx fields (Core.Name "properties") (expectList cx g decodePropertySpec))))))) term
+-- | Decode an element specification from a term
+decodeElementSpec :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Mapping.ElementSpec
+decodeElementSpec cx g term =
+    readInjection cx g [
+      (Core.Name "vertex", (\t -> Eithers.map (\_x -> Mapping.ElementSpecVertex _x) (decodeVertexSpec cx g t))),
+      (Core.Name "edge", (\t -> Eithers.map (\_x -> Mapping.ElementSpecEdge _x) (decodeEdgeSpec cx g t)))] term
+-- | Decode a property key from a term
+decodePropertyKey :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error PgModel.PropertyKey
+decodePropertyKey cx g t = Eithers.map (\_x -> PgModel.PropertyKey _x) (ExtractCore.string g t)
+-- | Decode a property specification from a term
+decodePropertySpec :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Mapping.PropertySpec
+decodePropertySpec cx g term =
+    readRecord cx g (\fields -> Eithers.bind (readField cx fields (Core.Name "key") (decodePropertyKey cx g)) (\_a -> Eithers.map (\_b -> Mapping.PropertySpec {
+      Mapping.propertySpecKey = _a,
+      Mapping.propertySpecValue = _b}) (readField cx fields (Core.Name "value") (decodeValueSpec cx g)))) term
+-- | Decode a value specification from a term
+decodeValueSpec :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Mapping.ValueSpec
+decodeValueSpec cx g term =
+    case (Strip.deannotateTerm term) of
+      Core.TermLiteral v0 -> case v0 of
+        Core.LiteralString v1 -> Right (Mapping.ValueSpecPattern v1)
+        _ -> readInjection cx g [
+          (Core.Name "value", (\_ -> Right Mapping.ValueSpecValue)),
+          (Core.Name "pattern", (\t -> Eithers.map (\_x -> Mapping.ValueSpecPattern _x) (ExtractCore.string g t)))] term
+      _ -> readInjection cx g [
+        (Core.Name "value", (\_ -> Right Mapping.ValueSpecValue)),
+        (Core.Name "pattern", (\t -> Eithers.map (\_x -> Mapping.ValueSpecPattern _x) (ExtractCore.string g t)))] term
+-- | Decode a vertex label from a term
+decodeVertexLabel :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error PgModel.VertexLabel
+decodeVertexLabel cx g t = Eithers.map (\_x -> PgModel.VertexLabel _x) (ExtractCore.string g t)
+-- | Decode a vertex specification from a term
+decodeVertexSpec :: t0 -> Graph.Graph -> Core.Term -> Either Errors.Error Mapping.VertexSpec
+decodeVertexSpec cx g term =
+    readRecord cx g (\fields -> Eithers.bind (readField cx fields (Core.Name "label") (decodeVertexLabel cx g)) (\_a -> Eithers.bind (readField cx fields (Core.Name "id") (decodeValueSpec cx g)) (\_b -> Eithers.map (\_c -> Mapping.VertexSpec {
+      Mapping.vertexSpecLabel = _a,
+      Mapping.vertexSpecId = _b,
+      Mapping.vertexSpecProperties = _c}) (readField cx fields (Core.Name "properties") (expectList cx g decodePropertySpec))))) term
+-- | Evaluate a path (list of steps) on a term, returning all resulting terms
+evalPath :: t0 -> [String] -> Core.Term -> Either Errors.Error [Core.Term]
+evalPath cx path term =
+    Optionals.cases (Lists.uncons path) (Right [
+      term]) (\p -> Eithers.bind (evalStep cx (Pairs.first p) term) (\results -> Eithers.map (\xs -> Lists.concat xs) (Eithers.mapList (evalPath cx (Pairs.second p)) results)))
+-- | Evaluate a single step of a path traversal on a term
+evalStep :: t0 -> String -> Core.Term -> Either Errors.Error [Core.Term]
+evalStep cx step term =
+    Logic.ifElse (Strings.null step) (Right [
+      term]) (case (Strip.deannotateTerm term) of
+      Core.TermList v0 -> Eithers.map (\xs -> Lists.concat xs) (Eithers.mapList (evalStep cx step) v0)
+      Core.TermOptional v0 -> Optionals.cases v0 (Right []) (\t -> evalStep cx step t)
+      Core.TermRecord v0 -> Optionals.cases (Maps.lookup (Core.Name step) (Resolution.fieldMap (Core.recordFields v0))) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 (Strings.cat2 "No such field " step) " in record")))) (\t -> Right [
+        t])
+      Core.TermInject v0 -> Logic.ifElse (Equality.equal (Core.unName (Core.fieldName (Core.injectionField v0))) step) (evalStep cx step (Core.fieldTerm (Core.injectionField v0))) (Right [])
+      Core.TermWrap v0 -> evalStep cx step (Core.wrappedTermBody v0)
+      _ -> Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Can't traverse through term for step " step))))
+-- | Extract a list from a term and apply a decoder to each element
+expectList :: t0 -> Graph.Graph -> (t0 -> Graph.Graph -> Core.Term -> Either Errors.Error t1) -> Core.Term -> Either Errors.Error [t1]
+expectList cx g f term = Eithers.bind (ExtractCore.list g term) (\elems -> Eithers.mapList (f cx g) elems)
+-- | Parse an edge id pattern from a value spec and schema
+parseEdgeIdPattern :: t0 -> t1 -> Mapping.Schema t2 t3 t4 Errors.Error -> Mapping.ValueSpec -> Either t5 (Core.Term -> Either Errors.Error [t4])
+parseEdgeIdPattern cx g schema spec =
+    Eithers.bind (parseValueSpec cx g spec) (\fun -> Right (\term -> Eithers.bind (fun term) (\terms -> Eithers.mapList (Coders.coderEncode (Mapping.schemaEdgeIds schema)) terms)))
+-- | Parse an edge specification into a label and encoder function
+parseEdgeSpec :: t0 -> t1 -> Mapping.Schema t2 t3 t4 Errors.Error -> Mapping.EdgeSpec -> Either t5 (PgModel.Label, (Core.Term -> Either Errors.Error [PgModel.Element t4]))
+parseEdgeSpec cx g schema spec =
+
+      let label = Mapping.edgeSpecLabel spec
+          id = Mapping.edgeSpecId spec
+          outV = Mapping.edgeSpecOut spec
+          inV = Mapping.edgeSpecIn spec
+          props = Mapping.edgeSpecProperties spec
+      in (Eithers.bind (parseEdgeIdPattern cx g schema id) (\getId -> Eithers.bind (parseVertexIdPattern cx g schema outV) (\getOut -> Eithers.bind (parseVertexIdPattern cx g schema inV) (\getIn -> Eithers.bind (Eithers.mapList (parsePropertySpec cx g schema) props) (\getProps -> Right (
+        PgModel.LabelEdge label,
+        (\term -> Eithers.bind (requireUnique cx "edge id" getId term) (\tid -> Eithers.bind (requireUnique cx "vertex id" getOut term) (\tout -> Eithers.bind (requireUnique cx "edge id" getIn term) (\tin -> Eithers.bind (Eithers.map (\_xs -> Maps.fromList _xs) (Eithers.mapList (\gf -> requireUnique cx "property key" gf term) getProps)) (\tprops -> Right [
+          PgModel.ElementEdge (PgModel.Edge {
+            PgModel.edgeLabel = label,
+            PgModel.edgeId = tid,
+            PgModel.edgeOut = tout,
+            PgModel.edgeIn = tin,
+            PgModel.edgeProperties = tprops})])))))))))))
+-- | Parse an element specification into a label and encoder function
+parseElementSpec :: t0 -> t1 -> Mapping.Schema t2 t3 t4 Errors.Error -> Mapping.ElementSpec -> Either t5 (PgModel.Label, (Core.Term -> Either Errors.Error [PgModel.Element t4]))
+parseElementSpec cx g schema spec =
+    case spec of
+      Mapping.ElementSpecVertex v0 -> parseVertexSpec cx g schema v0
+      Mapping.ElementSpecEdge v0 -> parseEdgeSpec cx g schema v0
+-- | Parse a string pattern into a function that traverses terms
+parsePattern :: t0 -> t1 -> String -> Either t2 (Core.Term -> Either Errors.Error [Core.Term])
+parsePattern cx _g pat =
+
+      let segments = Strings.splitOn "${" pat
+          firstLit = Optionals.fromOptional pat (Lists.maybeHead segments)
+          rest = Lists.drop 1 segments
+          parsed =
+                  Lists.map (\seg ->
+                    let parts = Strings.splitOn "}" seg
+                        pathStr = Optionals.fromOptional "" (Lists.maybeHead parts)
+                        litPart = Strings.intercalate "}" (Lists.drop 1 parts)
+                        pathSteps = Strings.splitOn "/" pathStr
+                    in (pathSteps, litPart)) rest
+      in (Right (\term -> applyPattern cx firstLit parsed term))
+-- | Parse a property specification into an encoder function
+parsePropertySpec :: t0 -> t1 -> Mapping.Schema t2 t3 t4 Errors.Error -> Mapping.PropertySpec -> Either t5 (Core.Term -> Either Errors.Error [(PgModel.PropertyKey, t4)])
+parsePropertySpec cx g schema spec =
+
+      let key = Mapping.propertySpecKey spec
+          value = Mapping.propertySpecValue spec
+      in (Eithers.bind (parseValueSpec cx g value) (\fun -> Right (\term -> Eithers.bind (fun term) (\results -> Eithers.bind (Eithers.mapList (Coders.coderEncode (Mapping.schemaPropertyValues schema)) results) (\values -> Right (Lists.map (\v -> (key, v)) values))))))
+-- | Parse a value specification into a function that processes terms
+parseValueSpec :: t0 -> t1 -> Mapping.ValueSpec -> Either t2 (Core.Term -> Either Errors.Error [Core.Term])
+parseValueSpec cx g spec =
+    case spec of
+      Mapping.ValueSpecValue -> Right (\term -> Right [
+        term])
+      Mapping.ValueSpecPattern v0 -> parsePattern cx g v0
+-- | Parse a vertex id pattern from a value spec and schema
+parseVertexIdPattern :: t0 -> t1 -> Mapping.Schema t2 t3 t4 Errors.Error -> Mapping.ValueSpec -> Either t5 (Core.Term -> Either Errors.Error [t4])
+parseVertexIdPattern cx g schema spec =
+    Eithers.bind (parseValueSpec cx g spec) (\fun -> Right (\term -> Eithers.bind (fun term) (\terms -> Eithers.mapList (Coders.coderEncode (Mapping.schemaVertexIds schema)) terms)))
+-- | Parse a vertex specification into a label and encoder function
+parseVertexSpec :: t0 -> t1 -> Mapping.Schema t2 t3 t4 Errors.Error -> Mapping.VertexSpec -> Either t5 (PgModel.Label, (Core.Term -> Either Errors.Error [PgModel.Element t4]))
+parseVertexSpec cx g schema spec =
+
+      let label = Mapping.vertexSpecLabel spec
+          id = Mapping.vertexSpecId spec
+          props = Mapping.vertexSpecProperties spec
+      in (Eithers.bind (parseVertexIdPattern cx g schema id) (\getId -> Eithers.bind (Eithers.mapList (parsePropertySpec cx g schema) props) (\getProps -> Right (
+        PgModel.LabelVertex label,
+        (\term -> Eithers.bind (requireUnique cx "vertex id" getId term) (\tid -> Eithers.bind (Eithers.map (\_xs -> Maps.fromList _xs) (Eithers.mapList (\gf -> requireUnique cx "property key" gf term) getProps)) (\tprops -> Right [
+          PgModel.ElementVertex (PgModel.Vertex {
+            PgModel.vertexLabel = label,
+            PgModel.vertexId = tid,
+            PgModel.vertexProperties = tprops})])))))))
+-- | Read a field from a map of fields by name
+readField :: t0 -> M.Map Core.Name t1 -> Core.Name -> (t1 -> Either Errors.Error t2) -> Either Errors.Error t2
+readField cx fields fname fun =
+    Optionals.cases (Maps.lookup fname fields) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "no such field: " (Core.unName fname))))) fun
+-- | Read an injection (union value) from a term
+readInjection :: t0 -> Graph.Graph -> [(Core.Name, (Core.Term -> Either Errors.Error t1))] -> Core.Term -> Either Errors.Error t1
+readInjection cx g cases encoded =
+    Eithers.bind (ExtractCore.map (\k -> Eithers.map (\_n -> Core.Name _n) (ExtractCore.string g k)) (\_v -> Right _v) g encoded) (\mp ->
+      let entries = Maps.toList mp
+      in (Optionals.cases (Lists.maybeHead entries) (Left (Errors.ErrorOther (Errors.OtherError "empty injection"))) (\f ->
+        let key = Pairs.first f
+            val = Pairs.second f
+            matching = Lists.filter (\c -> Equality.equal (Pairs.first c) key) cases
+        in (Optionals.cases (Lists.maybeHead matching) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "unexpected field: " (Core.unName key))))) (\m ->
+          let handler = Pairs.second m
+          in (handler val))))))
+-- | Read a record from a term as a map of field names to values
+readRecord :: t0 -> Graph.Graph -> (M.Map Core.Name Core.Term -> Either Errors.Error t1) -> Core.Term -> Either Errors.Error t1
+readRecord cx g cons term =
+    Eithers.bind (ExtractCore.map (\k -> Eithers.map (\_n -> Core.Name _n) (ExtractCore.string g k)) (\_v -> Right _v) g term) cons
+-- | Require exactly one result from a list-producing function
+requireUnique :: t0 -> String -> (t1 -> Either Errors.Error [t2]) -> t1 -> Either Errors.Error t2
+requireUnique cx context fun term =
+    Eithers.bind (fun term) (\results -> Logic.ifElse (Lists.null results) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "No value found: " context)))) (Logic.ifElse (Equality.equal (Lists.length results) 1) (Optionals.cases (Lists.maybeHead results) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Multiple values found: " context)))) (\x -> Right x)) (Left (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "Multiple values found: " context))))))
+-- | Create an adapter that maps terms to property graph elements using a mapping specification
+termToElementsAdapter :: t0 -> Graph.Graph -> Mapping.Schema t1 t2 t3 Errors.Error -> Core.Type -> Either Errors.Error (Coders.Adapter Core.Type [PgModel.Label] Core.Term [PgModel.Element t3] Errors.Error)
+termToElementsAdapter cx g schema typ =
+
+      let key_elements = Core.Name "elements"
+      in (Optionals.cases (Annotations.getTypeAnnotation key_elements typ) (Right (Coders.Adapter {
+        Coders.adapterIsLossy = False,
+        Coders.adapterSource = typ,
+        Coders.adapterTarget = [],
+        Coders.adapterCoder = Coders.Coder {
+          Coders.coderEncode = (\_t -> Right []),
+          Coders.coderDecode = (\_els -> Left (Errors.ErrorOther (Errors.OtherError "no corresponding element type")))}})) (\term -> Eithers.bind (expectList cx g decodeElementSpec term) (\specTerms -> Eithers.bind (Eithers.mapList (parseElementSpec cx g schema) specTerms) (\specs ->
+        let labels = Lists.nub (Lists.map (\_p -> Pairs.first _p) specs)
+            encoders = Lists.map (\_p -> Pairs.second _p) specs
+        in (Right (Coders.Adapter {
+          Coders.adapterIsLossy = False,
+          Coders.adapterSource = typ,
+          Coders.adapterTarget = labels,
+          Coders.adapterCoder = Coders.Coder {
+            Coders.coderEncode = (\t -> Eithers.map (\_xs -> Lists.concat _xs) (Eithers.mapList (\e -> e t) encoders)),
+            Coders.coderDecode = (\_els -> Left (Errors.ErrorOther (Errors.OtherError "element decoding is not yet supported")))}}))))))
+-- | Convert a term to its string representation
+termToString :: Core.Term -> String
+termToString term =
+    case (Strip.deannotateTerm term) of
+      Core.TermLiteral v0 -> case v0 of
+        Core.LiteralString v1 -> v1
+        Core.LiteralBoolean v1 -> Logic.ifElse v1 "true" "false"
+        Core.LiteralInteger v1 -> case v1 of
+          Core.IntegerValueInt32 v2 -> Literals.showInt32 v2
+          _ -> ShowCore.term term
+        Core.LiteralFloat v1 -> case v1 of
+          Core.FloatValueFloat64 v2 -> Literals.showFloat64 v2
+          _ -> ShowCore.term term
+        _ -> ShowCore.term term
+      Core.TermOptional v0 -> Optionals.cases v0 "none" (\t -> termToString t)
+      _ -> ShowCore.term term
diff --git a/src/main/haskell/Hydra/Pg/Utils.hs b/src/main/haskell/Hydra/Pg/Utils.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Pg/Utils.hs
@@ -0,0 +1,144 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Utility functions for property graph operations
+
+module Hydra.Pg.Utils where
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.Extract.Core as ExtractCore
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Json.Model as JsonModel
+import qualified Hydra.Overlay.Haskell.Lib.Eithers as Eithers
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Pg.Coder as Coder
+import qualified Hydra.Pg.Mapping as Mapping
+import qualified Hydra.Pg.Model as PgModel
+import qualified Hydra.Query as Query
+import qualified Hydra.Relational as Relational
+import qualified Hydra.Show.Core as ShowCore
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Default Tinkerpop annotation schema
+defaultTinkerpopAnnotations :: Mapping.AnnotationSchema
+defaultTinkerpopAnnotations =
+    Mapping.AnnotationSchema {
+      Mapping.annotationSchemaVertexLabel = "vertexLabel",
+      Mapping.annotationSchemaEdgeLabel = "edgeLabel",
+      Mapping.annotationSchemaVertexId = "vertexId",
+      Mapping.annotationSchemaEdgeId = "edgeId",
+      Mapping.annotationSchemaPropertyKey = "key",
+      Mapping.annotationSchemaPropertyValue = "value",
+      Mapping.annotationSchemaOutVertex = "outVertex",
+      Mapping.annotationSchemaOutVertexLabel = "outVertexLabel",
+      Mapping.annotationSchemaInVertex = "inVertex",
+      Mapping.annotationSchemaInVertexLabel = "inVertexLabel",
+      Mapping.annotationSchemaOutEdge = "outEdge",
+      Mapping.annotationSchemaOutEdgeLabel = "outEdgeLabel",
+      Mapping.annotationSchemaInEdge = "inEdge",
+      Mapping.annotationSchemaInEdgeLabel = "inEdgeLabel",
+      Mapping.annotationSchemaIgnore = "ignore"}
+-- | Example property graph schema with string values
+examplePgSchema :: Mapping.Schema t0 () String Errors.Error
+examplePgSchema =
+    Mapping.Schema {
+      Mapping.schemaVertexIdTypes = Coders.Coder {
+        Coders.coderEncode = (\_2 -> Right ()),
+        Coders.coderDecode = (\_2 -> Right Core.TypeUnit)},
+      Mapping.schemaVertexIds = Coders.Coder {
+        Coders.coderEncode = (\t -> expString t),
+        Coders.coderDecode = (\s -> Right (Core.TermLiteral (Core.LiteralString s)))},
+      Mapping.schemaEdgeIdTypes = Coders.Coder {
+        Coders.coderEncode = (\_2 -> Right ()),
+        Coders.coderDecode = (\_2 -> Right Core.TypeUnit)},
+      Mapping.schemaEdgeIds = Coders.Coder {
+        Coders.coderEncode = (\t -> expString t),
+        Coders.coderDecode = (\s -> Right (Core.TermLiteral (Core.LiteralString s)))},
+      Mapping.schemaPropertyTypes = Coders.Coder {
+        Coders.coderEncode = (\_2 -> Right ()),
+        Coders.coderDecode = (\_2 -> Right Core.TypeUnit)},
+      Mapping.schemaPropertyValues = Coders.Coder {
+        Coders.coderEncode = (\t -> expString t),
+        Coders.coderDecode = (\s -> Right (Core.TermLiteral (Core.LiteralString s)))},
+      Mapping.schemaAnnotations = defaultTinkerpopAnnotations,
+      Mapping.schemaDefaultVertexId = "defaultVertexId",
+      Mapping.schemaDefaultEdgeId = "defaultEdgeId"}
+-- | Extract a string from a term using the empty graph
+expString :: Core.Term -> Either Errors.Error String
+expString term =
+    ExtractCore.string (Graph.Graph {
+      Graph.graphBoundTerms = Maps.empty,
+      Graph.graphBoundTypes = Maps.empty,
+      Graph.graphClassConstraints = Maps.empty,
+      Graph.graphLambdaVariables = Sets.empty,
+      Graph.graphMetadata = Maps.empty,
+      Graph.graphPrimitives = Maps.empty,
+      Graph.graphSchemaTypes = Maps.empty,
+      Graph.graphTypeVariables = Sets.empty}) term
+-- | Get all elements from a lazy graph
+lazyGraphToElements :: PgModel.LazyGraph t0 -> [PgModel.Element t0]
+lazyGraphToElements lg =
+    Lists.concat2 (Lists.map (\x -> PgModel.ElementVertex x) (PgModel.lazyGraphVertices lg)) (Lists.map (\x -> PgModel.ElementEdge x) (PgModel.lazyGraphEdges lg))
+-- | Convert a property graph element to JSON
+pgElementToJson :: Mapping.Schema t0 t1 t2 Errors.Error -> PgModel.Element t2 -> Either Errors.Error JsonModel.Value
+pgElementToJson schema el =
+    (\x -> case x of
+      PgModel.ElementVertex v0 -> Eithers.bind (Coders.coderDecode (Mapping.schemaVertexIds schema) (PgModel.vertexId v0)) (\term ->
+        let labelJson = JsonModel.ValueString (PgModel.unVertexLabel (PgModel.vertexLabel v0))
+        in (Eithers.map (\propsJson -> JsonModel.ValueObject (Optionals.cat [
+          Just ("label", labelJson),
+          (Just ("id", (JsonModel.ValueString (ShowCore.term term)))),
+          propsJson])) ((\pairs -> Logic.ifElse (Maps.null pairs) (Right Nothing) (Eithers.map (\p -> Just ("properties", (JsonModel.ValueObject p))) (Eithers.mapList (\pair ->
+          let key = Pairs.first pair
+              v = Pairs.second pair
+          in (Eithers.bind (Coders.coderDecode (Mapping.schemaPropertyValues schema) v) (\term2 -> Right (PgModel.unPropertyKey key, (JsonModel.ValueString (ShowCore.term term2)))))) (Maps.toList pairs)))) (PgModel.vertexProperties v0))))
+      PgModel.ElementEdge v0 -> Eithers.bind (Coders.coderDecode (Mapping.schemaEdgeIds schema) (PgModel.edgeId v0)) (\term -> Eithers.bind (Coders.coderDecode (Mapping.schemaVertexIds schema) (PgModel.edgeOut v0)) (\termOut -> Eithers.bind (Coders.coderDecode (Mapping.schemaVertexIds schema) (PgModel.edgeIn v0)) (\termIn ->
+        let labelJson = JsonModel.ValueString (PgModel.unEdgeLabel (PgModel.edgeLabel v0))
+        in (Eithers.map (\propsJson -> JsonModel.ValueObject (Optionals.cat [
+          Just ("label", labelJson),
+          (Just ("id", (JsonModel.ValueString (ShowCore.term term)))),
+          (Just ("out", (JsonModel.ValueString (ShowCore.term termOut)))),
+          (Just ("in", (JsonModel.ValueString (ShowCore.term termIn)))),
+          propsJson])) ((\pairs -> Logic.ifElse (Maps.null pairs) (Right Nothing) (Eithers.map (\p -> Just ("properties", (JsonModel.ValueObject p))) (Eithers.mapList (\pair ->
+          let key = Pairs.first pair
+              v = Pairs.second pair
+          in (Eithers.bind (Coders.coderDecode (Mapping.schemaPropertyValues schema) v) (\term2 -> Right (PgModel.unPropertyKey key, (JsonModel.ValueString (ShowCore.term term2)))))) (Maps.toList pairs)))) (PgModel.edgeProperties v0))))))) el
+-- | Convert a list of property graph elements to JSON
+pgElementsToJson :: Mapping.Schema t0 t1 t2 Errors.Error -> [PgModel.Element t2] -> Either Errors.Error JsonModel.Value
+pgElementsToJson schema els =
+    Eithers.map (\els_ -> JsonModel.ValueArray els_) (Eithers.mapList (\el -> pgElementToJson schema el) els)
+-- | Get all elements from a property graph
+propertyGraphElements :: Ord t0 => (PgModel.Graph t0 -> [PgModel.Element t0])
+propertyGraphElements g =
+    Lists.concat2 (Lists.map (\x -> PgModel.ElementVertex x) (Maps.elems (PgModel.graphVertices g))) (Lists.map (\x -> PgModel.ElementEdge x) (Maps.elems (PgModel.graphEdges g)))
+-- | Convert a type-annotated term to property graph elements
+typeApplicationTermToPropertyGraph :: Mapping.Schema t0 t1 t2 Errors.Error -> Core.Type -> t1 -> t1 -> Typing.InferenceContext -> Graph.Graph -> Either Errors.Error (Core.Term -> Either Errors.Error [PgModel.Element t2])
+typeApplicationTermToPropertyGraph schema typ vidType eidType cx g =
+    Eithers.bind (Coder.elementCoder Nothing schema typ vidType eidType cx g) (\adapter -> Right (\term -> Eithers.map (\tree ->
+      let flattenTree =
+              \t -> Lists.cons (PgModel.elementTreeSelf t) (Lists.concat (Lists.map flattenTree (PgModel.elementTreeDependencies t)))
+      in (flattenTree tree)) (Coders.coderEncode (Coders.adapterCoder adapter) term)))
diff --git a/src/main/haskell/Hydra/Show/Error/Pg.hs b/src/main/haskell/Hydra/Show/Error/Pg.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Show/Error/Pg.hs
@@ -0,0 +1,119 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | String representations of hydra.error.pg types
+
+module Hydra.Show.Error.Pg where
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.Pg as Pg
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Json.Model as JsonModel
+import qualified Hydra.Overlay.Haskell.Lib.Strings as Strings
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Pg.Model as PgModel
+import qualified Hydra.Query as Query
+import qualified Hydra.Relational as Relational
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Show an invalid edge error as a string
+invalidEdgeError :: Pg.InvalidEdgeError -> String
+invalidEdgeError e =
+    case e of
+      Pg.InvalidEdgeErrorId v0 -> Strings.cat2 "invalid id: " (invalidValueError v0)
+      Pg.InvalidEdgeErrorInVertexLabel v0 -> Strings.cat2 "wrong in-vertex label: " (wrongVertexLabelError v0)
+      Pg.InvalidEdgeErrorInVertexNotFound -> "in-vertex not found"
+      Pg.InvalidEdgeErrorLabel v0 -> noSuchEdgeLabelError v0
+      Pg.InvalidEdgeErrorOutVertexLabel v0 -> Strings.cat2 "wrong out-vertex label: " (wrongVertexLabelError v0)
+      Pg.InvalidEdgeErrorOutVertexNotFound -> "out-vertex not found"
+      Pg.InvalidEdgeErrorProperty v0 -> invalidElementPropertyError v0
+-- | Show an invalid element property error as a string
+invalidElementPropertyError :: Pg.InvalidElementPropertyError -> String
+invalidElementPropertyError e =
+    Strings.cat [
+      "property ",
+      (PgModel.unPropertyKey (Pg.invalidElementPropertyErrorKey e)),
+      ": ",
+      (invalidPropertyError (Pg.invalidElementPropertyErrorError e))]
+-- | Show an invalid graph edge error as a string, given a value printer
+invalidGraphEdgeError :: (t0 -> String) -> Pg.InvalidGraphEdgeError t0 -> String
+invalidGraphEdgeError printValue e =
+    Strings.cat [
+      "edge ",
+      (printValue (Pg.invalidGraphEdgeErrorId e)),
+      ": ",
+      (invalidEdgeError (Pg.invalidGraphEdgeErrorError e))]
+-- | Show an invalid graph error as a string, given a value printer
+invalidGraphError :: (t0 -> String) -> Pg.InvalidGraphError t0 -> String
+invalidGraphError printValue e =
+    (\x -> case x of
+      Pg.InvalidGraphErrorEdge v0 -> invalidGraphEdgeError printValue v0
+      Pg.InvalidGraphErrorVertex v0 -> invalidGraphVertexError printValue v0) e
+-- | Show an invalid graph vertex error as a string, given a value printer
+invalidGraphVertexError :: (t0 -> String) -> Pg.InvalidGraphVertexError t0 -> String
+invalidGraphVertexError printValue e =
+    Strings.cat [
+      "vertex ",
+      (printValue (Pg.invalidGraphVertexErrorId e)),
+      ": ",
+      (invalidVertexError (Pg.invalidGraphVertexErrorError e))]
+-- | Show an invalid property error as a string
+invalidPropertyError :: Pg.InvalidPropertyError -> String
+invalidPropertyError e =
+    case e of
+      Pg.InvalidPropertyErrorInvalidValue v0 -> Strings.cat2 "invalid value: " (invalidValueError v0)
+      Pg.InvalidPropertyErrorMissingRequired v0 -> Strings.cat2 "missing required property: " (PgModel.unPropertyKey v0)
+      Pg.InvalidPropertyErrorUnexpectedKey v0 -> Strings.cat2 "unexpected property key: " (PgModel.unPropertyKey v0)
+-- | Show an invalid value error as a string
+invalidValueError :: Pg.InvalidValueError -> String
+invalidValueError e =
+    Strings.cat [
+      "expected ",
+      (Pg.invalidValueErrorExpectedType e),
+      ", got ",
+      (Pg.invalidValueErrorValue e)]
+-- | Show an invalid vertex error as a string
+invalidVertexError :: Pg.InvalidVertexError -> String
+invalidVertexError e =
+    case e of
+      Pg.InvalidVertexErrorId v0 -> Strings.cat2 "invalid id: " (invalidValueError v0)
+      Pg.InvalidVertexErrorLabel v0 -> noSuchVertexLabelError v0
+      Pg.InvalidVertexErrorProperty v0 -> invalidElementPropertyError v0
+-- | Show a no-such-edge-label error as a string
+noSuchEdgeLabelError :: Pg.NoSuchEdgeLabelError -> String
+noSuchEdgeLabelError e =
+    Strings.cat [
+      "no such edge label: ",
+      (PgModel.unEdgeLabel (Pg.noSuchEdgeLabelErrorLabel e))]
+-- | Show a no-such-vertex-label error as a string
+noSuchVertexLabelError :: Pg.NoSuchVertexLabelError -> String
+noSuchVertexLabelError e =
+    Strings.cat [
+      "no such vertex label: ",
+      (PgModel.unVertexLabel (Pg.noSuchVertexLabelErrorLabel e))]
+-- | Show a wrong-vertex-label error as a string
+wrongVertexLabelError :: Pg.WrongVertexLabelError -> String
+wrongVertexLabelError e =
+    Strings.cat [
+      "expected vertex label ",
+      (PgModel.unVertexLabel (Pg.wrongVertexLabelErrorExpected e)),
+      ", got ",
+      (PgModel.unVertexLabel (Pg.wrongVertexLabelErrorActual e))]
diff --git a/src/main/haskell/Hydra/Tinkerpop/Examples/Modern.hs b/src/main/haskell/Hydra/Tinkerpop/Examples/Modern.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Tinkerpop/Examples/Modern.hs
@@ -0,0 +1,175 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | The TinkerPop "Modern" property graph (schema and data), encoded as Hydra terms. The canonical example graph used throughout Apache TinkerPop documentation.
+
+module Hydra.Tinkerpop.Examples.Modern where
+import qualified Hydra.Core as Core
+import qualified Hydra.Pg.Model as Model
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Map as M
+-- | The TinkerPop Modern property graph data, with int32 Literal ids
+modernGraph :: Model.Graph Core.Literal
+modernGraph =
+    Model.Graph {
+      Model.graphVertices = (M.fromList [
+        (
+          Core.LiteralInteger (Core.IntegerValueInt32 1),
+          Model.Vertex {
+            Model.vertexLabel = (Model.VertexLabel "person"),
+            Model.vertexId = (Core.LiteralInteger (Core.IntegerValueInt32 1)),
+            Model.vertexProperties = (M.fromList [
+              (Model.PropertyKey "age", (Core.LiteralInteger (Core.IntegerValueInt32 29))),
+              (Model.PropertyKey "name", (Core.LiteralString "marko"))])}),
+        (
+          Core.LiteralInteger (Core.IntegerValueInt32 2),
+          Model.Vertex {
+            Model.vertexLabel = (Model.VertexLabel "person"),
+            Model.vertexId = (Core.LiteralInteger (Core.IntegerValueInt32 2)),
+            Model.vertexProperties = (M.fromList [
+              (Model.PropertyKey "age", (Core.LiteralInteger (Core.IntegerValueInt32 27))),
+              (Model.PropertyKey "name", (Core.LiteralString "vadas"))])}),
+        (
+          Core.LiteralInteger (Core.IntegerValueInt32 3),
+          Model.Vertex {
+            Model.vertexLabel = (Model.VertexLabel "software"),
+            Model.vertexId = (Core.LiteralInteger (Core.IntegerValueInt32 3)),
+            Model.vertexProperties = (M.fromList [
+              (Model.PropertyKey "lang", (Core.LiteralString "java")),
+              (Model.PropertyKey "name", (Core.LiteralString "lop"))])}),
+        (
+          Core.LiteralInteger (Core.IntegerValueInt32 4),
+          Model.Vertex {
+            Model.vertexLabel = (Model.VertexLabel "person"),
+            Model.vertexId = (Core.LiteralInteger (Core.IntegerValueInt32 4)),
+            Model.vertexProperties = (M.fromList [
+              (Model.PropertyKey "age", (Core.LiteralInteger (Core.IntegerValueInt32 32))),
+              (Model.PropertyKey "name", (Core.LiteralString "josh"))])}),
+        (
+          Core.LiteralInteger (Core.IntegerValueInt32 5),
+          Model.Vertex {
+            Model.vertexLabel = (Model.VertexLabel "software"),
+            Model.vertexId = (Core.LiteralInteger (Core.IntegerValueInt32 5)),
+            Model.vertexProperties = (M.fromList [
+              (Model.PropertyKey "lang", (Core.LiteralString "java")),
+              (Model.PropertyKey "name", (Core.LiteralString "ripple"))])}),
+        (
+          Core.LiteralInteger (Core.IntegerValueInt32 6),
+          Model.Vertex {
+            Model.vertexLabel = (Model.VertexLabel "person"),
+            Model.vertexId = (Core.LiteralInteger (Core.IntegerValueInt32 6)),
+            Model.vertexProperties = (M.fromList [
+              (Model.PropertyKey "age", (Core.LiteralInteger (Core.IntegerValueInt32 35))),
+              (Model.PropertyKey "name", (Core.LiteralString "peter"))])})]),
+      Model.graphEdges = (M.fromList [
+        (
+          Core.LiteralInteger (Core.IntegerValueInt32 7),
+          Model.Edge {
+            Model.edgeLabel = (Model.EdgeLabel "knows"),
+            Model.edgeId = (Core.LiteralInteger (Core.IntegerValueInt32 7)),
+            Model.edgeOut = (Core.LiteralInteger (Core.IntegerValueInt32 1)),
+            Model.edgeIn = (Core.LiteralInteger (Core.IntegerValueInt32 2)),
+            Model.edgeProperties = (M.fromList [
+              (Model.PropertyKey "weight", (Core.LiteralFloat (Core.FloatValueFloat64 0.5)))])}),
+        (
+          Core.LiteralInteger (Core.IntegerValueInt32 8),
+          Model.Edge {
+            Model.edgeLabel = (Model.EdgeLabel "knows"),
+            Model.edgeId = (Core.LiteralInteger (Core.IntegerValueInt32 8)),
+            Model.edgeOut = (Core.LiteralInteger (Core.IntegerValueInt32 1)),
+            Model.edgeIn = (Core.LiteralInteger (Core.IntegerValueInt32 4)),
+            Model.edgeProperties = (M.fromList [
+              (Model.PropertyKey "weight", (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))])}),
+        (
+          Core.LiteralInteger (Core.IntegerValueInt32 9),
+          Model.Edge {
+            Model.edgeLabel = (Model.EdgeLabel "created"),
+            Model.edgeId = (Core.LiteralInteger (Core.IntegerValueInt32 9)),
+            Model.edgeOut = (Core.LiteralInteger (Core.IntegerValueInt32 1)),
+            Model.edgeIn = (Core.LiteralInteger (Core.IntegerValueInt32 3)),
+            Model.edgeProperties = (M.fromList [
+              (Model.PropertyKey "weight", (Core.LiteralFloat (Core.FloatValueFloat64 0.4)))])}),
+        (
+          Core.LiteralInteger (Core.IntegerValueInt32 10),
+          Model.Edge {
+            Model.edgeLabel = (Model.EdgeLabel "created"),
+            Model.edgeId = (Core.LiteralInteger (Core.IntegerValueInt32 10)),
+            Model.edgeOut = (Core.LiteralInteger (Core.IntegerValueInt32 4)),
+            Model.edgeIn = (Core.LiteralInteger (Core.IntegerValueInt32 5)),
+            Model.edgeProperties = (M.fromList [
+              (Model.PropertyKey "weight", (Core.LiteralFloat (Core.FloatValueFloat64 1.0)))])}),
+        (
+          Core.LiteralInteger (Core.IntegerValueInt32 11),
+          Model.Edge {
+            Model.edgeLabel = (Model.EdgeLabel "created"),
+            Model.edgeId = (Core.LiteralInteger (Core.IntegerValueInt32 11)),
+            Model.edgeOut = (Core.LiteralInteger (Core.IntegerValueInt32 4)),
+            Model.edgeIn = (Core.LiteralInteger (Core.IntegerValueInt32 3)),
+            Model.edgeProperties = (M.fromList [
+              (Model.PropertyKey "weight", (Core.LiteralFloat (Core.FloatValueFloat64 0.4)))])}),
+        (
+          Core.LiteralInteger (Core.IntegerValueInt32 12),
+          Model.Edge {
+            Model.edgeLabel = (Model.EdgeLabel "created"),
+            Model.edgeId = (Core.LiteralInteger (Core.IntegerValueInt32 12)),
+            Model.edgeOut = (Core.LiteralInteger (Core.IntegerValueInt32 6)),
+            Model.edgeIn = (Core.LiteralInteger (Core.IntegerValueInt32 3)),
+            Model.edgeProperties = (M.fromList [
+              (Model.PropertyKey "weight", (Core.LiteralFloat (Core.FloatValueFloat64 0.2)))])})])}
+-- | The TinkerPop Modern property graph schema, with LiteralType property/id types
+modernSchema :: Model.GraphSchema Core.LiteralType
+modernSchema =
+    Model.GraphSchema {
+      Model.graphSchemaVertices = (M.fromList [
+        (
+          Model.VertexLabel "person",
+          Model.VertexType {
+            Model.vertexTypeLabel = (Model.VertexLabel "person"),
+            Model.vertexTypeId = (Core.LiteralTypeInteger Core.IntegerTypeInt32),
+            Model.vertexTypeProperties = [
+              Model.PropertyType {
+                Model.propertyTypeKey = (Model.PropertyKey "name"),
+                Model.propertyTypeValue = Core.LiteralTypeString,
+                Model.propertyTypeRequired = True},
+              Model.PropertyType {
+                Model.propertyTypeKey = (Model.PropertyKey "age"),
+                Model.propertyTypeValue = (Core.LiteralTypeInteger Core.IntegerTypeInt32),
+                Model.propertyTypeRequired = False}]}),
+        (
+          Model.VertexLabel "software",
+          Model.VertexType {
+            Model.vertexTypeLabel = (Model.VertexLabel "software"),
+            Model.vertexTypeId = (Core.LiteralTypeInteger Core.IntegerTypeInt32),
+            Model.vertexTypeProperties = [
+              Model.PropertyType {
+                Model.propertyTypeKey = (Model.PropertyKey "name"),
+                Model.propertyTypeValue = Core.LiteralTypeString,
+                Model.propertyTypeRequired = True},
+              Model.PropertyType {
+                Model.propertyTypeKey = (Model.PropertyKey "lang"),
+                Model.propertyTypeValue = Core.LiteralTypeString,
+                Model.propertyTypeRequired = True}]})]),
+      Model.graphSchemaEdges = (M.fromList [
+        (
+          Model.EdgeLabel "created",
+          Model.EdgeType {
+            Model.edgeTypeLabel = (Model.EdgeLabel "created"),
+            Model.edgeTypeId = (Core.LiteralTypeInteger Core.IntegerTypeInt32),
+            Model.edgeTypeOut = (Model.VertexLabel "person"),
+            Model.edgeTypeIn = (Model.VertexLabel "software"),
+            Model.edgeTypeProperties = [
+              Model.PropertyType {
+                Model.propertyTypeKey = (Model.PropertyKey "weight"),
+                Model.propertyTypeValue = (Core.LiteralTypeFloat Core.FloatTypeFloat64),
+                Model.propertyTypeRequired = True}]}),
+        (
+          Model.EdgeLabel "knows",
+          Model.EdgeType {
+            Model.edgeTypeLabel = (Model.EdgeLabel "knows"),
+            Model.edgeTypeId = (Core.LiteralTypeInteger Core.IntegerTypeInt32),
+            Model.edgeTypeOut = (Model.VertexLabel "person"),
+            Model.edgeTypeIn = (Model.VertexLabel "person"),
+            Model.edgeTypeProperties = [
+              Model.PropertyType {
+                Model.propertyTypeKey = (Model.PropertyKey "weight"),
+                Model.propertyTypeValue = (Core.LiteralTypeFloat Core.FloatTypeFloat64),
+                Model.propertyTypeRequired = True}]})])}
diff --git a/src/main/haskell/Hydra/Tinkerpop/Features.hs b/src/main/haskell/Hydra/Tinkerpop/Features.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Tinkerpop/Features.hs
@@ -0,0 +1,238 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A model derived from TinkerPop's Graph.Features. See
+-- |   https://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/structure/Graph.Features.html
+-- |
+-- | An interface that represents the capabilities of a Graph implementation.
+-- | By default all methods of features return true and it is up to implementers to disable feature they don't support.
+-- | Users should check features prior to using various functions of TinkerPop to help ensure code portability across implementations.
+-- | For example, a common usage would be to check if a graph supports transactions prior to calling the commit method on Graph.tx().
+
+module Hydra.Tinkerpop.Features where
+import qualified Hydra.Core as Core
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Base interface for features that relate to supporting different data types.
+data DataTypeFeatures =
+  DataTypeFeatures {
+    -- | Supports setting of an array of boolean values.
+    dataTypeFeaturesSupportsBooleanArrayValues :: Bool,
+    -- | Supports setting of a boolean value.
+    dataTypeFeaturesSupportsBooleanValues :: Bool,
+    -- | Supports setting of an array of byte values.
+    dataTypeFeaturesSupportsByteArrayValues :: Bool,
+    -- | Supports setting of a byte value.
+    dataTypeFeaturesSupportsByteValues :: Bool,
+    -- | Supports setting of an array of double values.
+    dataTypeFeaturesSupportsDoubleArrayValues :: Bool,
+    -- | Supports setting of a double value.
+    dataTypeFeaturesSupportsDoubleValues :: Bool,
+    -- | Supports setting of an array of float values.
+    dataTypeFeaturesSupportsFloatArrayValues :: Bool,
+    -- | Supports setting of a float value.
+    dataTypeFeaturesSupportsFloatValues :: Bool,
+    -- | Supports setting of an array of integer values.
+    dataTypeFeaturesSupportsIntegerArrayValues :: Bool,
+    -- | Supports setting of a integer value.
+    dataTypeFeaturesSupportsIntegerValues :: Bool,
+    -- | Supports setting of an array of long values.
+    dataTypeFeaturesSupportsLongArrayValues :: Bool,
+    -- | Supports setting of a long value.
+    dataTypeFeaturesSupportsLongValues :: Bool,
+    -- | Supports setting of a Map value.
+    dataTypeFeaturesSupportsMapValues :: Bool,
+    -- | Supports setting of a List value.
+    dataTypeFeaturesSupportsMixedListValues :: Bool,
+    -- | Supports setting of a Java serializable value.
+    dataTypeFeaturesSupportsSerializableValues :: Bool,
+    -- | Supports setting of an array of string values.
+    dataTypeFeaturesSupportsStringArrayValues :: Bool,
+    -- | Supports setting of a string value.
+    dataTypeFeaturesSupportsStringValues :: Bool,
+    -- | Supports setting of a List value.
+    dataTypeFeaturesSupportsUniformListValues :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_DataTypeFeatures = Core.Name "hydra.tinkerpop.features.DataTypeFeatures"
+_DataTypeFeatures_supportsBooleanArrayValues = Core.Name "supportsBooleanArrayValues"
+_DataTypeFeatures_supportsBooleanValues = Core.Name "supportsBooleanValues"
+_DataTypeFeatures_supportsByteArrayValues = Core.Name "supportsByteArrayValues"
+_DataTypeFeatures_supportsByteValues = Core.Name "supportsByteValues"
+_DataTypeFeatures_supportsDoubleArrayValues = Core.Name "supportsDoubleArrayValues"
+_DataTypeFeatures_supportsDoubleValues = Core.Name "supportsDoubleValues"
+_DataTypeFeatures_supportsFloatArrayValues = Core.Name "supportsFloatArrayValues"
+_DataTypeFeatures_supportsFloatValues = Core.Name "supportsFloatValues"
+_DataTypeFeatures_supportsIntegerArrayValues = Core.Name "supportsIntegerArrayValues"
+_DataTypeFeatures_supportsIntegerValues = Core.Name "supportsIntegerValues"
+_DataTypeFeatures_supportsLongArrayValues = Core.Name "supportsLongArrayValues"
+_DataTypeFeatures_supportsLongValues = Core.Name "supportsLongValues"
+_DataTypeFeatures_supportsMapValues = Core.Name "supportsMapValues"
+_DataTypeFeatures_supportsMixedListValues = Core.Name "supportsMixedListValues"
+_DataTypeFeatures_supportsSerializableValues = Core.Name "supportsSerializableValues"
+_DataTypeFeatures_supportsStringArrayValues = Core.Name "supportsStringArrayValues"
+_DataTypeFeatures_supportsStringValues = Core.Name "supportsStringValues"
+_DataTypeFeatures_supportsUniformListValues = Core.Name "supportsUniformListValues"
+-- | Features that are related to Edge operations.
+data EdgeFeatures =
+  EdgeFeatures {
+    edgeFeaturesElementFeatures :: ElementFeatures,
+    edgeFeaturesProperties :: EdgePropertyFeatures,
+    -- | Determines if an Edge can be added to a Vertex.
+    edgeFeaturesSupportsAddEdges :: Bool,
+    -- | Determines if an Edge can be removed from a Vertex.
+    edgeFeaturesSupportsRemoveEdges :: Bool,
+    -- | Determines if the Graph implementation uses upsert functionality as opposed to insert functionality for Vertex.addEdge(String, Vertex, Object...).
+    edgeFeaturesSupportsUpsert :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_EdgeFeatures = Core.Name "hydra.tinkerpop.features.EdgeFeatures"
+_EdgeFeatures_elementFeatures = Core.Name "elementFeatures"
+_EdgeFeatures_properties = Core.Name "properties"
+_EdgeFeatures_supportsAddEdges = Core.Name "supportsAddEdges"
+_EdgeFeatures_supportsRemoveEdges = Core.Name "supportsRemoveEdges"
+_EdgeFeatures_supportsUpsert = Core.Name "supportsUpsert"
+-- | Features that are related to Edge Property objects.
+data EdgePropertyFeatures =
+  EdgePropertyFeatures {
+    edgePropertyFeaturesPropertyFeatures :: PropertyFeatures}
+  deriving (Eq, Ord, Read, Show)
+_EdgePropertyFeatures = Core.Name "hydra.tinkerpop.features.EdgePropertyFeatures"
+_EdgePropertyFeatures_propertyFeatures = Core.Name "propertyFeatures"
+-- | Features that are related to Element objects.
+data ElementFeatures =
+  ElementFeatures {
+    -- | Determines if an Element allows properties to be added.
+    elementFeaturesSupportsAddProperty :: Bool,
+    -- | Determines if an Element any Java object is a suitable identifier.
+    elementFeaturesSupportsAnyIds :: Bool,
+    -- | Determines if an Element has a specific custom object as their internal representation.
+    elementFeaturesSupportsCustomIds :: Bool,
+    -- | Determines if an Element has numeric identifiers as their internal representation.
+    elementFeaturesSupportsNumericIds :: Bool,
+    -- | Determines if an Element allows properties to be removed.
+    elementFeaturesSupportsRemoveProperty :: Bool,
+    -- | Determines if an Element has string identifiers as their internal representation.
+    elementFeaturesSupportsStringIds :: Bool,
+    -- | Determines if an Element can have a user defined identifier.
+    elementFeaturesSupportsUserSuppliedIds :: Bool,
+    -- | Determines if an Element has UUID identifiers as their internal representation.
+    elementFeaturesSupportsUuidIds :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ElementFeatures = Core.Name "hydra.tinkerpop.features.ElementFeatures"
+_ElementFeatures_supportsAddProperty = Core.Name "supportsAddProperty"
+_ElementFeatures_supportsAnyIds = Core.Name "supportsAnyIds"
+_ElementFeatures_supportsCustomIds = Core.Name "supportsCustomIds"
+_ElementFeatures_supportsNumericIds = Core.Name "supportsNumericIds"
+_ElementFeatures_supportsRemoveProperty = Core.Name "supportsRemoveProperty"
+_ElementFeatures_supportsStringIds = Core.Name "supportsStringIds"
+_ElementFeatures_supportsUserSuppliedIds = Core.Name "supportsUserSuppliedIds"
+_ElementFeatures_supportsUuidIds = Core.Name "supportsUuidIds"
+-- | Additional features which are needed for the complete specification of language constraints in Hydra, above and beyond TinkerPop Graph.Features
+data ExtraFeatures a =
+  ExtraFeatures {
+    extraFeaturesSupportsMapKey :: (Core.Type -> Bool)}
+_ExtraFeatures = Core.Name "hydra.tinkerpop.features.ExtraFeatures"
+_ExtraFeatures_supportsMapKey = Core.Name "supportsMapKey"
+-- | An interface that represents the capabilities of a Graph implementation. By default all methods of features return true and it is up to implementers to disable feature they don't support. Users should check features prior to using various functions of TinkerPop to help ensure code portability across implementations. For example, a common usage would be to check if a graph supports transactions prior to calling the commit method on Graph.tx().
+-- |
+-- | As an additional notice to Graph Providers, feature methods will be used by the test suite to determine which tests will be ignored and which will be executed, therefore proper setting of these features is essential to maximizing the amount of testing performed by the suite. Further note, that these methods may be called by the TinkerPop core code to determine what operations may be appropriately executed which will have impact on features utilized by users.
+data Features =
+  Features {
+    -- | Gets the features related to edge operation.
+    featuresEdge :: EdgeFeatures,
+    -- | Gets the features related to graph operation.
+    featuresGraph :: GraphFeatures,
+    -- | Gets the features related to vertex operation.
+    featuresVertex :: VertexFeatures}
+  deriving (Eq, Ord, Read, Show)
+_Features = Core.Name "hydra.tinkerpop.features.Features"
+_Features_edge = Core.Name "edge"
+_Features_graph = Core.Name "graph"
+_Features_vertex = Core.Name "vertex"
+-- | Features specific to a operations of a graph.
+data GraphFeatures =
+  GraphFeatures {
+    -- | Determines if the Graph implementation supports GraphComputer based processing.
+    graphFeaturesSupportsComputer :: Bool,
+    -- | Determines if the Graph implementation supports more than one connection to the same instance at the same time.
+    graphFeaturesSupportsConcurrentAccess :: Bool,
+    -- | Determines if the Graph implementations supports read operations as executed with the GraphTraversalSource.io(String) step.
+    graphFeaturesSupportsIoRead :: Bool,
+    -- | Determines if the Graph implementations supports write operations as executed with the GraphTraversalSource.io(String) step.
+    graphFeaturesSupportsIoWrite :: Bool,
+    -- | Determines if the Graph implementation supports persisting it's contents natively to disk.
+    graphFeaturesSupportsPersistence :: Bool,
+    -- | Determines if the Graph implementation supports threaded transactions which allow a transaction to be executed across multiple threads via Transaction.createThreadedTx().
+    graphFeaturesSupportsThreadedTransactions :: Bool,
+    -- | Determines if the Graph implementations supports transactions.
+    graphFeaturesSupportsTransactions :: Bool,
+    -- | Gets the features related to graph sideEffects operation.
+    graphFeaturesVariables :: VariableFeatures}
+  deriving (Eq, Ord, Read, Show)
+_GraphFeatures = Core.Name "hydra.tinkerpop.features.GraphFeatures"
+_GraphFeatures_supportsComputer = Core.Name "supportsComputer"
+_GraphFeatures_supportsConcurrentAccess = Core.Name "supportsConcurrentAccess"
+_GraphFeatures_supportsIoRead = Core.Name "supportsIoRead"
+_GraphFeatures_supportsIoWrite = Core.Name "supportsIoWrite"
+_GraphFeatures_supportsPersistence = Core.Name "supportsPersistence"
+_GraphFeatures_supportsThreadedTransactions = Core.Name "supportsThreadedTransactions"
+_GraphFeatures_supportsTransactions = Core.Name "supportsTransactions"
+_GraphFeatures_variables = Core.Name "variables"
+-- | A base interface for Edge or Vertex Property features.
+data PropertyFeatures =
+  PropertyFeatures {
+    propertyFeaturesDataTypeFeatures :: DataTypeFeatures,
+    -- | Determines if an Element allows for the processing of at least one data type defined by the features.
+    propertyFeaturesSupportsProperties :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_PropertyFeatures = Core.Name "hydra.tinkerpop.features.PropertyFeatures"
+_PropertyFeatures_dataTypeFeatures = Core.Name "dataTypeFeatures"
+_PropertyFeatures_supportsProperties = Core.Name "supportsProperties"
+-- | Features for Graph.Variables.
+data VariableFeatures =
+  VariableFeatures {
+    variableFeaturesDataTypeFeatures :: DataTypeFeatures,
+    -- | If any of the features on Graph.Features.VariableFeatures is true then this value must be true.
+    variableFeaturesSupportsVariables :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_VariableFeatures = Core.Name "hydra.tinkerpop.features.VariableFeatures"
+_VariableFeatures_dataTypeFeatures = Core.Name "dataTypeFeatures"
+_VariableFeatures_supportsVariables = Core.Name "supportsVariables"
+-- | Features that are related to Vertex operations.
+data VertexFeatures =
+  VertexFeatures {
+    vertexFeaturesElementFeatures :: ElementFeatures,
+    vertexFeaturesProperties :: VertexPropertyFeatures,
+    -- | Determines if a Vertex can be added to the Graph.
+    vertexFeaturesSupportsAddVertices :: Bool,
+    -- | Determines if a Vertex can support non-unique values on the same key.
+    vertexFeaturesSupportsDuplicateMultiProperties :: Bool,
+    -- | Determines if a Vertex can support properties on vertex properties.
+    vertexFeaturesSupportsMetaProperties :: Bool,
+    -- | Determines if a Vertex can support multiple properties with the same key.
+    vertexFeaturesSupportsMultiProperties :: Bool,
+    -- | Determines if a Vertex can be removed from the Graph.
+    vertexFeaturesSupportsRemoveVertices :: Bool,
+    -- | Determines if the Graph implementation uses upsert functionality as opposed to insert functionality for Graph.addVertex(String).
+    vertexFeaturesSupportsUpsert :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_VertexFeatures = Core.Name "hydra.tinkerpop.features.VertexFeatures"
+_VertexFeatures_elementFeatures = Core.Name "elementFeatures"
+_VertexFeatures_properties = Core.Name "properties"
+_VertexFeatures_supportsAddVertices = Core.Name "supportsAddVertices"
+_VertexFeatures_supportsDuplicateMultiProperties = Core.Name "supportsDuplicateMultiProperties"
+_VertexFeatures_supportsMetaProperties = Core.Name "supportsMetaProperties"
+_VertexFeatures_supportsMultiProperties = Core.Name "supportsMultiProperties"
+_VertexFeatures_supportsRemoveVertices = Core.Name "supportsRemoveVertices"
+_VertexFeatures_supportsUpsert = Core.Name "supportsUpsert"
+-- | Features that are related to Vertex Property objects.
+data VertexPropertyFeatures =
+  VertexPropertyFeatures {
+    vertexPropertyFeaturesDataTypeFeatures :: DataTypeFeatures,
+    vertexPropertyFeaturesPropertyFeatures :: PropertyFeatures,
+    vertexPropertyFeaturesElementFeatures :: ElementFeatures,
+    -- | Determines if a VertexProperty allows properties to be removed.
+    vertexPropertyFeaturesSupportsRemove :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_VertexPropertyFeatures = Core.Name "hydra.tinkerpop.features.VertexPropertyFeatures"
+_VertexPropertyFeatures_dataTypeFeatures = Core.Name "dataTypeFeatures"
+_VertexPropertyFeatures_propertyFeatures = Core.Name "propertyFeatures"
+_VertexPropertyFeatures_elementFeatures = Core.Name "elementFeatures"
+_VertexPropertyFeatures_supportsRemove = Core.Name "supportsRemove"
diff --git a/src/main/haskell/Hydra/Tinkerpop/Gremlin.hs b/src/main/haskell/Hydra/Tinkerpop/Gremlin.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Tinkerpop/Gremlin.hs
@@ -0,0 +1,1699 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A Gremlin model, based on the Apache TinkerPop Gremlin ANTLR grammar (version 3.8.1). This is a streamlined model: it preserves the semantics of the grammar (steps, predicates, arguments, literals) while collapsing pure parser-production artifacts (single-use 'XAndY'/'XOrY' glue types and left-recursion 'rest' continuations) so that the representation maps cleanly onto TinkerPop's native traversal model.
+
+module Hydra.Tinkerpop.Gremlin where
+import qualified Hydra.Core as Core
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Int as I
+data AsArgs =
+  AsArgs {
+    asArgsFirst :: StringArgument,
+    asArgsRest :: [StringNullableArgument]}
+  deriving (Eq, Ord, Read, Show)
+_AsArgs = Core.Name "hydra.tinkerpop.gremlin.AsArgs"
+_AsArgs_first = Core.Name "first"
+_AsArgs_rest = Core.Name "rest"
+data BarrierArgs =
+  BarrierArgsConsumer TraversalSackMethodArgument |
+  BarrierArgsInt IntegerArgument
+  deriving (Eq, Ord, Read, Show)
+_BarrierArgs = Core.Name "hydra.tinkerpop.gremlin.BarrierArgs"
+_BarrierArgs_consumer = Core.Name "consumer"
+_BarrierArgs_int = Core.Name "int"
+data BooleanArgument =
+  BooleanArgumentValue Bool |
+  BooleanArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_BooleanArgument = Core.Name "hydra.tinkerpop.gremlin.BooleanArgument"
+_BooleanArgument_value = Core.Name "value"
+_BooleanArgument_variable = Core.Name "variable"
+data ByArgs =
+  ByArgsOrder TraversalOrderArgument |
+  ByArgsToken TraversalTokenArgument |
+  ByArgsOther ByOtherArgs
+  deriving (Eq, Ord, Read, Show)
+_ByArgs = Core.Name "hydra.tinkerpop.gremlin.ByArgs"
+_ByArgs_order = Core.Name "order"
+_ByArgs_token = Core.Name "token"
+_ByArgs_other = Core.Name "other"
+data ByOtherArgs =
+  ByOtherArgsComparator (Maybe TraversalComparatorArgument) |
+  ByOtherArgsFunction TraversalFunctionArgument |
+  ByOtherArgsString StringArgument |
+  ByOtherArgsTraversal NestedTraversal
+  deriving (Eq, Ord, Read, Show)
+_ByOtherArgs = Core.Name "hydra.tinkerpop.gremlin.ByOtherArgs"
+_ByOtherArgs_comparator = Core.Name "comparator"
+_ByOtherArgs_function = Core.Name "function"
+_ByOtherArgs_string = Core.Name "string"
+_ByOtherArgs_traversal = Core.Name "traversal"
+data CardinalityAndMap =
+  CardinalityAndMap {
+    cardinalityAndMapCardinality :: TraversalCardinalityArgument,
+    cardinalityAndMapObject :: GenericLiteralMapNullableArgument}
+  deriving (Eq, Ord, Read, Show)
+_CardinalityAndMap = Core.Name "hydra.tinkerpop.gremlin.CardinalityAndMap"
+_CardinalityAndMap_cardinality = Core.Name "cardinality"
+_CardinalityAndMap_object = Core.Name "object"
+data CardinalityAndObjects =
+  CardinalityAndObjects {
+    cardinalityAndObjectsCardinality :: TraversalCardinalityArgument,
+    cardinalityAndObjectsObjects :: [GenericLiteralArgument]}
+  deriving (Eq, Ord, Read, Show)
+_CardinalityAndObjects = Core.Name "hydra.tinkerpop.gremlin.CardinalityAndObjects"
+_CardinalityAndObjects_cardinality = Core.Name "cardinality"
+_CardinalityAndObjects_objects = Core.Name "objects"
+newtype ChainedTraversal =
+  ChainedTraversal {
+    unChainedTraversal :: [TraversalMethod]}
+  deriving (Eq, Ord, Read, Show)
+_ChainedTraversal = Core.Name "hydra.tinkerpop.gremlin.ChainedTraversal"
+data ChooseArgs =
+  ChooseArgsFunction TraversalFunctionArgument |
+  ChooseArgsPredicateTraversal PredicateOrTraversalChoice |
+  ChooseArgsTraversal NestedTraversal
+  deriving (Eq, Ord, Read, Show)
+_ChooseArgs = Core.Name "hydra.tinkerpop.gremlin.ChooseArgs"
+_ChooseArgs_function = Core.Name "function"
+_ChooseArgs_predicateTraversal = Core.Name "predicateTraversal"
+_ChooseArgs_traversal = Core.Name "traversal"
+data ConcatArgs =
+  ConcatArgsTraversal [NestedTraversal] |
+  ConcatArgsString [StringNullableArgument]
+  deriving (Eq, Ord, Read, Show)
+_ConcatArgs = Core.Name "hydra.tinkerpop.gremlin.ConcatArgs"
+_ConcatArgs_traversal = Core.Name "traversal"
+_ConcatArgs_string = Core.Name "string"
+data Configuration =
+  Configuration {
+    configurationKey :: KeywordOrIdentifier,
+    configurationValue :: GenericLiteralArgument}
+  deriving (Eq, Ord, Read, Show)
+_Configuration = Core.Name "hydra.tinkerpop.gremlin.Configuration"
+_Configuration_key = Core.Name "key"
+_Configuration_value = Core.Name "value"
+data ConnectedComponentConstants =
+  ConnectedComponentConstantsComponent |
+  ConnectedComponentConstantsEdges |
+  ConnectedComponentConstantsPropertyName
+  deriving (Eq, Ord, Read, Show)
+_ConnectedComponentConstants = Core.Name "hydra.tinkerpop.gremlin.ConnectedComponentConstants"
+_ConnectedComponentConstants_component = Core.Name "component"
+_ConnectedComponentConstants_edges = Core.Name "edges"
+_ConnectedComponentConstants_propertyName = Core.Name "propertyName"
+data DateAddArgs =
+  DateAddArgs {
+    dateAddArgsUnit :: TraversalDTArgument,
+    dateAddArgsDuration :: IntegerArgument}
+  deriving (Eq, Ord, Read, Show)
+_DateAddArgs = Core.Name "hydra.tinkerpop.gremlin.DateAddArgs"
+_DateAddArgs_unit = Core.Name "unit"
+_DateAddArgs_duration = Core.Name "duration"
+data DateArgument =
+  DateArgumentValue DateLiteral |
+  DateArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_DateArgument = Core.Name "hydra.tinkerpop.gremlin.DateArgument"
+_DateArgument_value = Core.Name "value"
+_DateArgument_variable = Core.Name "variable"
+data DateDiffArgs =
+  DateDiffArgsTraversal NestedTraversal |
+  DateDiffArgsDate DateArgument
+  deriving (Eq, Ord, Read, Show)
+_DateDiffArgs = Core.Name "hydra.tinkerpop.gremlin.DateDiffArgs"
+_DateDiffArgs_traversal = Core.Name "traversal"
+_DateDiffArgs_date = Core.Name "date"
+newtype DateLiteral =
+  DateLiteral {
+    unDateLiteral :: (Maybe StringArgument)}
+  deriving (Eq, Ord, Read, Show)
+_DateLiteral = Core.Name "hydra.tinkerpop.gremlin.DateLiteral"
+data DedupArgs =
+  DedupArgsScopeString ScopeStringArgs |
+  DedupArgsString [StringNullableArgument]
+  deriving (Eq, Ord, Read, Show)
+_DedupArgs = Core.Name "hydra.tinkerpop.gremlin.DedupArgs"
+_DedupArgs_scopeString = Core.Name "scopeString"
+_DedupArgs_string = Core.Name "string"
+data DirectionAndVarargs =
+  DirectionAndVarargs {
+    directionAndVarargsDirection :: TraversalDirectionArgument,
+    directionAndVarargsVarargs :: [StringNullableArgument]}
+  deriving (Eq, Ord, Read, Show)
+_DirectionAndVarargs = Core.Name "hydra.tinkerpop.gremlin.DirectionAndVarargs"
+_DirectionAndVarargs_direction = Core.Name "direction"
+_DirectionAndVarargs_varargs = Core.Name "varargs"
+data FloatArgument =
+  FloatArgumentValue FloatLiteral |
+  FloatArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_FloatArgument = Core.Name "hydra.tinkerpop.gremlin.FloatArgument"
+_FloatArgument_value = Core.Name "value"
+_FloatArgument_variable = Core.Name "variable"
+data FloatLiteral =
+  FloatLiteralFloat Float |
+  FloatLiteralDouble Double |
+  FloatLiteralBig Sci.Scientific
+  deriving (Eq, Ord, Read, Show)
+_FloatLiteral = Core.Name "hydra.tinkerpop.gremlin.FloatLiteral"
+_FloatLiteral_float = Core.Name "float"
+_FloatLiteral_double = Core.Name "double"
+_FloatLiteral_big = Core.Name "big"
+data FoldArgs =
+  FoldArgs {
+    foldArgsSeed :: GenericLiteralArgument,
+    foldArgsBiFunction :: TraversalBiFunctionArgument}
+  deriving (Eq, Ord, Read, Show)
+_FoldArgs = Core.Name "hydra.tinkerpop.gremlin.FoldArgs"
+_FoldArgs_seed = Core.Name "seed"
+_FoldArgs_biFunction = Core.Name "biFunction"
+data FromArgs =
+  FromArgsString StringArgument |
+  FromArgsVertex StructureVertexArgument |
+  FromArgsTraversal NestedTraversal
+  deriving (Eq, Ord, Read, Show)
+_FromArgs = Core.Name "hydra.tinkerpop.gremlin.FromArgs"
+_FromArgs_string = Core.Name "string"
+_FromArgs_vertex = Core.Name "vertex"
+_FromArgs_traversal = Core.Name "traversal"
+data GenericLiteral =
+  GenericLiteralNumeric NumericLiteral |
+  GenericLiteralBoolean Bool |
+  GenericLiteralString String |
+  GenericLiteralDate DateLiteral |
+  GenericLiteralNull |
+  GenericLiteralNan |
+  GenericLiteralInf |
+  GenericLiteralTraversalToken TraversalToken |
+  GenericLiteralTraversalCardinality TraversalCardinality |
+  GenericLiteralTraversalDirection TraversalDirection |
+  GenericLiteralTraversalMerge TraversalMerge |
+  GenericLiteralTraversalPick TraversalPick |
+  GenericLiteralTraversalDT TraversalDT |
+  GenericLiteralTraversalGType TraversalGType |
+  GenericLiteralStructureVertex StructureVertex |
+  GenericLiteralGenericLiteralSet GenericLiteralSet |
+  GenericLiteralGenericLiteralCollection GenericLiteralCollection |
+  GenericLiteralGenericLiteralRange GenericLiteralRange |
+  GenericLiteralNestedTraversal NestedTraversal |
+  GenericLiteralTerminatedTraversal TerminatedTraversal |
+  GenericLiteralGenericLiteralMap GenericLiteralMap
+  deriving (Eq, Ord, Read, Show)
+_GenericLiteral = Core.Name "hydra.tinkerpop.gremlin.GenericLiteral"
+_GenericLiteral_numeric = Core.Name "numeric"
+_GenericLiteral_boolean = Core.Name "boolean"
+_GenericLiteral_string = Core.Name "string"
+_GenericLiteral_date = Core.Name "date"
+_GenericLiteral_null = Core.Name "null"
+_GenericLiteral_nan = Core.Name "nan"
+_GenericLiteral_inf = Core.Name "inf"
+_GenericLiteral_traversalToken = Core.Name "traversalToken"
+_GenericLiteral_traversalCardinality = Core.Name "traversalCardinality"
+_GenericLiteral_traversalDirection = Core.Name "traversalDirection"
+_GenericLiteral_traversalMerge = Core.Name "traversalMerge"
+_GenericLiteral_traversalPick = Core.Name "traversalPick"
+_GenericLiteral_traversalDT = Core.Name "traversalDT"
+_GenericLiteral_traversalGType = Core.Name "traversalGType"
+_GenericLiteral_structureVertex = Core.Name "structureVertex"
+_GenericLiteral_genericLiteralSet = Core.Name "genericLiteralSet"
+_GenericLiteral_genericLiteralCollection = Core.Name "genericLiteralCollection"
+_GenericLiteral_genericLiteralRange = Core.Name "genericLiteralRange"
+_GenericLiteral_nestedTraversal = Core.Name "nestedTraversal"
+_GenericLiteral_terminatedTraversal = Core.Name "terminatedTraversal"
+_GenericLiteral_genericLiteralMap = Core.Name "genericLiteralMap"
+data GenericLiteralArgument =
+  GenericLiteralArgumentValue GenericLiteral |
+  GenericLiteralArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_GenericLiteralArgument = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralArgument"
+_GenericLiteralArgument_value = Core.Name "value"
+_GenericLiteralArgument_variable = Core.Name "variable"
+newtype GenericLiteralCollection =
+  GenericLiteralCollection {
+    unGenericLiteralCollection :: [GenericLiteral]}
+  deriving (Eq, Ord, Read, Show)
+_GenericLiteralCollection = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralCollection"
+newtype GenericLiteralList =
+  GenericLiteralList {
+    unGenericLiteralList :: [GenericLiteral]}
+  deriving (Eq, Ord, Read, Show)
+_GenericLiteralList = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralList"
+data GenericLiteralListArgument =
+  GenericLiteralListArgumentValue GenericLiteralList |
+  GenericLiteralListArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_GenericLiteralListArgument = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralListArgument"
+_GenericLiteralListArgument_value = Core.Name "value"
+_GenericLiteralListArgument_variable = Core.Name "variable"
+newtype GenericLiteralMap =
+  GenericLiteralMap {
+    unGenericLiteralMap :: [MapEntry]}
+  deriving (Eq, Ord, Read, Show)
+_GenericLiteralMap = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMap"
+data GenericLiteralMapArgument =
+  GenericLiteralMapArgumentValue GenericLiteralMap |
+  GenericLiteralMapArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_GenericLiteralMapArgument = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapArgument"
+_GenericLiteralMapArgument_value = Core.Name "value"
+_GenericLiteralMapArgument_variable = Core.Name "variable"
+data GenericLiteralMapNullableArgument =
+  GenericLiteralMapNullableArgumentValue (Maybe GenericLiteralMap) |
+  GenericLiteralMapNullableArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_GenericLiteralMapNullableArgument = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralMapNullableArgument"
+_GenericLiteralMapNullableArgument_value = Core.Name "value"
+_GenericLiteralMapNullableArgument_variable = Core.Name "variable"
+data GenericLiteralRange =
+  GenericLiteralRangeInteger IntegerRange |
+  GenericLiteralRangeString StringRange
+  deriving (Eq, Ord, Read, Show)
+_GenericLiteralRange = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralRange"
+_GenericLiteralRange_integer = Core.Name "integer"
+_GenericLiteralRange_string = Core.Name "string"
+newtype GenericLiteralSet =
+  GenericLiteralSet {
+    unGenericLiteralSet :: [GenericLiteral]}
+  deriving (Eq, Ord, Read, Show)
+_GenericLiteralSet = Core.Name "hydra.tinkerpop.gremlin.GenericLiteralSet"
+data HasArgs =
+  HasArgsString HasArgsWithKey |
+  HasArgsTraversalToken HasArgsWithToken
+  deriving (Eq, Ord, Read, Show)
+_HasArgs = Core.Name "hydra.tinkerpop.gremlin.HasArgs"
+_HasArgs_string = Core.Name "string"
+_HasArgs_traversalToken = Core.Name "traversalToken"
+data HasArgsWithKey =
+  HasArgsWithKey {
+    hasArgsWithKeyKey :: StringNullableArgument,
+    hasArgsWithKeyValue :: (Maybe HasValueClause)}
+  deriving (Eq, Ord, Read, Show)
+_HasArgsWithKey = Core.Name "hydra.tinkerpop.gremlin.HasArgsWithKey"
+_HasArgsWithKey_key = Core.Name "key"
+_HasArgsWithKey_value = Core.Name "value"
+data HasArgsWithToken =
+  HasArgsWithToken {
+    hasArgsWithTokenToken :: TraversalTokenArgument,
+    hasArgsWithTokenValue :: HasValueClause}
+  deriving (Eq, Ord, Read, Show)
+_HasArgsWithToken = Core.Name "hydra.tinkerpop.gremlin.HasArgsWithToken"
+_HasArgsWithToken_token = Core.Name "token"
+_HasArgsWithToken_value = Core.Name "value"
+data HasValueClause =
+  HasValueClauseObject GenericLiteralArgument |
+  HasValueClausePredicate TraversalPredicate |
+  HasValueClauseTraversal NestedTraversal |
+  HasValueClauseKeyObject StringKeyAndObject |
+  HasValueClauseKeyPredicate StringKeyAndPredicate
+  deriving (Eq, Ord, Read, Show)
+_HasValueClause = Core.Name "hydra.tinkerpop.gremlin.HasValueClause"
+_HasValueClause_object = Core.Name "object"
+_HasValueClause_predicate = Core.Name "predicate"
+_HasValueClause_traversal = Core.Name "traversal"
+_HasValueClause_keyObject = Core.Name "keyObject"
+_HasValueClause_keyPredicate = Core.Name "keyPredicate"
+newtype Identifier =
+  Identifier {
+    unIdentifier :: String}
+  deriving (Eq, Ord, Read, Show)
+_Identifier = Core.Name "hydra.tinkerpop.gremlin.Identifier"
+data IntegerArgument =
+  IntegerArgumentValue IntegerLiteral |
+  IntegerArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_IntegerArgument = Core.Name "hydra.tinkerpop.gremlin.IntegerArgument"
+_IntegerArgument_value = Core.Name "value"
+_IntegerArgument_variable = Core.Name "variable"
+data IntegerLiteral =
+  IntegerLiteralByte I.Int8 |
+  IntegerLiteralShort I.Int16 |
+  IntegerLiteralInt Int |
+  IntegerLiteralLong I.Int64 |
+  IntegerLiteralBig Integer
+  deriving (Eq, Ord, Read, Show)
+_IntegerLiteral = Core.Name "hydra.tinkerpop.gremlin.IntegerLiteral"
+_IntegerLiteral_byte = Core.Name "byte"
+_IntegerLiteral_short = Core.Name "short"
+_IntegerLiteral_int = Core.Name "int"
+_IntegerLiteral_long = Core.Name "long"
+_IntegerLiteral_big = Core.Name "big"
+data IntegerRange =
+  IntegerRange {
+    integerRangeLeft :: IntegerLiteral,
+    integerRangeRight :: IntegerLiteral}
+  deriving (Eq, Ord, Read, Show)
+_IntegerRange = Core.Name "hydra.tinkerpop.gremlin.IntegerRange"
+_IntegerRange_left = Core.Name "left"
+_IntegerRange_right = Core.Name "right"
+data IoOptionsKeys =
+  IoOptionsKeysReader |
+  IoOptionsKeysWriter
+  deriving (Eq, Ord, Read, Show)
+_IoOptionsKeys = Core.Name "hydra.tinkerpop.gremlin.IoOptionsKeys"
+_IoOptionsKeys_reader = Core.Name "reader"
+_IoOptionsKeys_writer = Core.Name "writer"
+data IoOptionsValues =
+  IoOptionsValuesGryo |
+  IoOptionsValuesGraphson |
+  IoOptionsValuesGraphml
+  deriving (Eq, Ord, Read, Show)
+_IoOptionsValues = Core.Name "hydra.tinkerpop.gremlin.IoOptionsValues"
+_IoOptionsValues_gryo = Core.Name "gryo"
+_IoOptionsValues_graphson = Core.Name "graphson"
+_IoOptionsValues_graphml = Core.Name "graphml"
+data Keyword =
+  KeywordEdges |
+  KeywordKeys |
+  KeywordNew |
+  KeywordValues
+  deriving (Eq, Ord, Read, Show)
+_Keyword = Core.Name "hydra.tinkerpop.gremlin.Keyword"
+_Keyword_edges = Core.Name "edges"
+_Keyword_keys = Core.Name "keys"
+_Keyword_new = Core.Name "new"
+_Keyword_values = Core.Name "values"
+data KeywordOrIdentifier =
+  KeywordOrIdentifierKeyword Keyword |
+  KeywordOrIdentifierIdentifier Identifier
+  deriving (Eq, Ord, Read, Show)
+_KeywordOrIdentifier = Core.Name "hydra.tinkerpop.gremlin.KeywordOrIdentifier"
+_KeywordOrIdentifier_keyword = Core.Name "keyword"
+_KeywordOrIdentifier_identifier = Core.Name "identifier"
+data MapEntry =
+  MapEntryKey MapKey |
+  MapEntryValue GenericLiteral
+  deriving (Eq, Ord, Read, Show)
+_MapEntry = Core.Name "hydra.tinkerpop.gremlin.MapEntry"
+_MapEntry_key = Core.Name "key"
+_MapEntry_value = Core.Name "value"
+data MapKey =
+  MapKeyString String |
+  MapKeyNumeric NumericLiteral |
+  MapKeyTraversalToken TraversalToken |
+  MapKeyTraversalDirection TraversalDirection |
+  MapKeySet GenericLiteralSet |
+  MapKeyCollection GenericLiteralCollection |
+  MapKeyMap GenericLiteralMap |
+  MapKeyKeyword Keyword |
+  MapKeyIdentifier Identifier
+  deriving (Eq, Ord, Read, Show)
+_MapKey = Core.Name "hydra.tinkerpop.gremlin.MapKey"
+_MapKey_string = Core.Name "string"
+_MapKey_numeric = Core.Name "numeric"
+_MapKey_traversalToken = Core.Name "traversalToken"
+_MapKey_traversalDirection = Core.Name "traversalDirection"
+_MapKey_set = Core.Name "set"
+_MapKey_collection = Core.Name "collection"
+_MapKey_map = Core.Name "map"
+_MapKey_keyword = Core.Name "keyword"
+_MapKey_identifier = Core.Name "identifier"
+data MergeArgs =
+  MergeArgsMap GenericLiteralMapNullableArgument |
+  MergeArgsTraversal NestedTraversal
+  deriving (Eq, Ord, Read, Show)
+_MergeArgs = Core.Name "hydra.tinkerpop.gremlin.MergeArgs"
+_MergeArgs_map = Core.Name "map"
+_MergeArgs_traversal = Core.Name "traversal"
+data MergeMapOption =
+  MergeMapOption {
+    mergeMapOptionMerge :: TraversalMergeArgument,
+    mergeMapOptionMap :: GenericLiteralMapNullableArgument,
+    mergeMapOptionCardinality :: (Maybe TraversalCardinality)}
+  deriving (Eq, Ord, Read, Show)
+_MergeMapOption = Core.Name "hydra.tinkerpop.gremlin.MergeMapOption"
+_MergeMapOption_merge = Core.Name "merge"
+_MergeMapOption_map = Core.Name "map"
+_MergeMapOption_cardinality = Core.Name "cardinality"
+data MergeTraversalOption =
+  MergeTraversalOption {
+    mergeTraversalOptionMerge :: TraversalMergeArgument,
+    mergeTraversalOptionTraversal :: NestedTraversal}
+  deriving (Eq, Ord, Read, Show)
+_MergeTraversalOption = Core.Name "hydra.tinkerpop.gremlin.MergeTraversalOption"
+_MergeTraversalOption_merge = Core.Name "merge"
+_MergeTraversalOption_traversal = Core.Name "traversal"
+data NestedTraversal =
+  NestedTraversalRoot RootTraversal |
+  NestedTraversalChained ChainedTraversal |
+  NestedTraversalAnonymous ChainedTraversal
+  deriving (Eq, Ord, Read, Show)
+_NestedTraversal = Core.Name "hydra.tinkerpop.gremlin.NestedTraversal"
+_NestedTraversal_root = Core.Name "root"
+_NestedTraversal_chained = Core.Name "chained"
+_NestedTraversal_anonymous = Core.Name "anonymous"
+data NumericArgument =
+  NumericArgumentValue NumericLiteral |
+  NumericArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_NumericArgument = Core.Name "hydra.tinkerpop.gremlin.NumericArgument"
+_NumericArgument_value = Core.Name "value"
+_NumericArgument_variable = Core.Name "variable"
+data NumericLiteral =
+  NumericLiteralInteger IntegerLiteral |
+  NumericLiteralFloat FloatLiteral
+  deriving (Eq, Ord, Read, Show)
+_NumericLiteral = Core.Name "hydra.tinkerpop.gremlin.NumericLiteral"
+_NumericLiteral_integer = Core.Name "integer"
+_NumericLiteral_float = Core.Name "float"
+data ObjectAndTraversal =
+  ObjectAndTraversal {
+    objectAndTraversalObject :: GenericLiteralArgument,
+    objectAndTraversalTraversal :: NestedTraversal}
+  deriving (Eq, Ord, Read, Show)
+_ObjectAndTraversal = Core.Name "hydra.tinkerpop.gremlin.ObjectAndTraversal"
+_ObjectAndTraversal_object = Core.Name "object"
+_ObjectAndTraversal_traversal = Core.Name "traversal"
+data OptionArgs =
+  OptionArgsPredicateTraversal PredicateAndTraversal |
+  OptionArgsMergeMap MergeMapOption |
+  OptionArgsMergeTraversal MergeTraversalOption |
+  OptionArgsObjectTraversal ObjectAndTraversal |
+  OptionArgsTraversal NestedTraversal
+  deriving (Eq, Ord, Read, Show)
+_OptionArgs = Core.Name "hydra.tinkerpop.gremlin.OptionArgs"
+_OptionArgs_predicateTraversal = Core.Name "predicateTraversal"
+_OptionArgs_mergeMap = Core.Name "mergeMap"
+_OptionArgs_mergeTraversal = Core.Name "mergeTraversal"
+_OptionArgs_objectTraversal = Core.Name "objectTraversal"
+_OptionArgs_traversal = Core.Name "traversal"
+data PageRankConstants =
+  PageRankConstantsEdges |
+  PageRankConstantsTimes |
+  PageRankConstantsPropertyName
+  deriving (Eq, Ord, Read, Show)
+_PageRankConstants = Core.Name "hydra.tinkerpop.gremlin.PageRankConstants"
+_PageRankConstants_edges = Core.Name "edges"
+_PageRankConstants_times = Core.Name "times"
+_PageRankConstants_propertyName = Core.Name "propertyName"
+data PeerPressureConstants =
+  PeerPressureConstantsEdges |
+  PeerPressureConstantsTimes |
+  PeerPressureConstantsPropertyName
+  deriving (Eq, Ord, Read, Show)
+_PeerPressureConstants = Core.Name "hydra.tinkerpop.gremlin.PeerPressureConstants"
+_PeerPressureConstants_edges = Core.Name "edges"
+_PeerPressureConstants_times = Core.Name "times"
+_PeerPressureConstants_propertyName = Core.Name "propertyName"
+data PopAndTraversal =
+  PopAndTraversal {
+    popAndTraversalPop :: TraversalPopArgument,
+    popAndTraversalTraversal :: NestedTraversal}
+  deriving (Eq, Ord, Read, Show)
+_PopAndTraversal = Core.Name "hydra.tinkerpop.gremlin.PopAndTraversal"
+_PopAndTraversal_pop = Core.Name "pop"
+_PopAndTraversal_traversal = Core.Name "traversal"
+data PredicateAndTraversal =
+  PredicateAndTraversal {
+    predicateAndTraversalPredicate :: TraversalPredicate,
+    predicateAndTraversalTraversal :: NestedTraversal}
+  deriving (Eq, Ord, Read, Show)
+_PredicateAndTraversal = Core.Name "hydra.tinkerpop.gremlin.PredicateAndTraversal"
+_PredicateAndTraversal_predicate = Core.Name "predicate"
+_PredicateAndTraversal_traversal = Core.Name "traversal"
+data PredicateOrObject =
+  PredicateOrObjectPredicate TraversalPredicate |
+  PredicateOrObjectObject GenericLiteralArgument
+  deriving (Eq, Ord, Read, Show)
+_PredicateOrObject = Core.Name "hydra.tinkerpop.gremlin.PredicateOrObject"
+_PredicateOrObject_predicate = Core.Name "predicate"
+_PredicateOrObject_object = Core.Name "object"
+data PredicateOrObjects =
+  PredicateOrObjectsPredicate TraversalPredicate |
+  PredicateOrObjectsObjects [GenericLiteralArgument]
+  deriving (Eq, Ord, Read, Show)
+_PredicateOrObjects = Core.Name "hydra.tinkerpop.gremlin.PredicateOrObjects"
+_PredicateOrObjects_predicate = Core.Name "predicate"
+_PredicateOrObjects_objects = Core.Name "objects"
+data PredicateOrStrings =
+  PredicateOrStringsPredicate TraversalPredicate |
+  PredicateOrStringsStrings [StringNullableArgument]
+  deriving (Eq, Ord, Read, Show)
+_PredicateOrStrings = Core.Name "hydra.tinkerpop.gremlin.PredicateOrStrings"
+_PredicateOrStrings_predicate = Core.Name "predicate"
+_PredicateOrStrings_strings = Core.Name "strings"
+data PredicateOrTraversal =
+  PredicateOrTraversalPredicate TraversalPredicate |
+  PredicateOrTraversalTraversal NestedTraversal
+  deriving (Eq, Ord, Read, Show)
+_PredicateOrTraversal = Core.Name "hydra.tinkerpop.gremlin.PredicateOrTraversal"
+_PredicateOrTraversal_predicate = Core.Name "predicate"
+_PredicateOrTraversal_traversal = Core.Name "traversal"
+data PredicateOrTraversalChoice =
+  PredicateOrTraversalChoice {
+    predicateOrTraversalChoicePredicate :: TraversalPredicate,
+    predicateOrTraversalChoiceTrue :: NestedTraversal,
+    predicateOrTraversalChoiceFalse :: (Maybe NestedTraversal)}
+  deriving (Eq, Ord, Read, Show)
+_PredicateOrTraversalChoice = Core.Name "hydra.tinkerpop.gremlin.PredicateOrTraversalChoice"
+_PredicateOrTraversalChoice_predicate = Core.Name "predicate"
+_PredicateOrTraversalChoice_true = Core.Name "true"
+_PredicateOrTraversalChoice_false = Core.Name "false"
+data PropertyArgs =
+  PropertyArgsCardinalityObjects CardinalityAndObjects |
+  PropertyArgsObjects [GenericLiteralArgument] |
+  PropertyArgsObject GenericLiteralMapNullableArgument |
+  PropertyArgsCardinalityObject CardinalityAndMap
+  deriving (Eq, Ord, Read, Show)
+_PropertyArgs = Core.Name "hydra.tinkerpop.gremlin.PropertyArgs"
+_PropertyArgs_cardinalityObjects = Core.Name "cardinalityObjects"
+_PropertyArgs_objects = Core.Name "objects"
+_PropertyArgs_object = Core.Name "object"
+_PropertyArgs_cardinalityObject = Core.Name "cardinalityObject"
+data Query =
+  QueryTraversalSource TraversalSourceQuery |
+  QueryRootTraversal RootTraversalQuery |
+  QueryToString |
+  QueryEmpty
+  deriving (Eq, Ord, Read, Show)
+_Query = Core.Name "hydra.tinkerpop.gremlin.Query"
+_Query_traversalSource = Core.Name "traversalSource"
+_Query_rootTraversal = Core.Name "rootTraversal"
+_Query_toString = Core.Name "toString"
+_Query_empty = Core.Name "empty"
+newtype QueryList =
+  QueryList {
+    unQueryList :: [Query]}
+  deriving (Eq, Ord, Read, Show)
+_QueryList = Core.Name "hydra.tinkerpop.gremlin.QueryList"
+data RangeArgs =
+  RangeArgs {
+    rangeArgsScope :: (Maybe TraversalScopeArgument),
+    rangeArgsMin :: IntegerArgument,
+    rangeArgsMax :: IntegerArgument}
+  deriving (Eq, Ord, Read, Show)
+_RangeArgs = Core.Name "hydra.tinkerpop.gremlin.RangeArgs"
+_RangeArgs_scope = Core.Name "scope"
+_RangeArgs_min = Core.Name "min"
+_RangeArgs_max = Core.Name "max"
+data RangeArgument =
+  RangeArgument {
+    rangeArgumentMin :: GenericLiteralArgument,
+    rangeArgumentMax :: GenericLiteralArgument}
+  deriving (Eq, Ord, Read, Show)
+_RangeArgument = Core.Name "hydra.tinkerpop.gremlin.RangeArgument"
+_RangeArgument_min = Core.Name "min"
+_RangeArgument_max = Core.Name "max"
+data RepeatArgs =
+  RepeatArgs {
+    repeatArgsString :: (Maybe StringArgument),
+    repeatArgsTraversal :: NestedTraversal}
+  deriving (Eq, Ord, Read, Show)
+_RepeatArgs = Core.Name "hydra.tinkerpop.gremlin.RepeatArgs"
+_RepeatArgs_string = Core.Name "string"
+_RepeatArgs_traversal = Core.Name "traversal"
+data ReplaceArgs =
+  ReplaceArgs {
+    replaceArgsScope :: (Maybe TraversalScopeArgument),
+    replaceArgsFrom :: StringNullableArgument,
+    replaceArgsTo :: StringNullableArgument}
+  deriving (Eq, Ord, Read, Show)
+_ReplaceArgs = Core.Name "hydra.tinkerpop.gremlin.ReplaceArgs"
+_ReplaceArgs_scope = Core.Name "scope"
+_ReplaceArgs_from = Core.Name "from"
+_ReplaceArgs_to = Core.Name "to"
+data RootTraversal =
+  RootTraversal {
+    rootTraversalSource :: TraversalSource,
+    rootTraversalSpawnMethod :: TraversalSourceSpawnMethod,
+    rootTraversalChained :: [TraversalMethod]}
+  deriving (Eq, Ord, Read, Show)
+_RootTraversal = Core.Name "hydra.tinkerpop.gremlin.RootTraversal"
+_RootTraversal_source = Core.Name "source"
+_RootTraversal_spawnMethod = Core.Name "spawnMethod"
+_RootTraversal_chained = Core.Name "chained"
+data RootTraversalQuery =
+  RootTraversalQuery {
+    rootTraversalQueryRoot :: RootTraversal,
+    rootTraversalQueryTerminalMethod :: (Maybe TraversalTerminalMethod)}
+  deriving (Eq, Ord, Read, Show)
+_RootTraversalQuery = Core.Name "hydra.tinkerpop.gremlin.RootTraversalQuery"
+_RootTraversalQuery_root = Core.Name "root"
+_RootTraversalQuery_terminalMethod = Core.Name "terminalMethod"
+data SampleByScope =
+  SampleByScope {
+    sampleByScopeScope :: (Maybe TraversalScopeArgument),
+    sampleByScopeInteger :: IntegerArgument}
+  deriving (Eq, Ord, Read, Show)
+_SampleByScope = Core.Name "hydra.tinkerpop.gremlin.SampleByScope"
+_SampleByScope_scope = Core.Name "scope"
+_SampleByScope_integer = Core.Name "integer"
+data ScopeAndInteger =
+  ScopeAndInteger {
+    scopeAndIntegerScope :: (Maybe TraversalScopeArgument),
+    scopeAndIntegerInteger :: IntegerArgument}
+  deriving (Eq, Ord, Read, Show)
+_ScopeAndInteger = Core.Name "hydra.tinkerpop.gremlin.ScopeAndInteger"
+_ScopeAndInteger_scope = Core.Name "scope"
+_ScopeAndInteger_integer = Core.Name "integer"
+data ScopeStringArgs =
+  ScopeStringArgs {
+    scopeStringArgsScope :: TraversalScopeArgument,
+    scopeStringArgsStrings :: [StringNullableArgument]}
+  deriving (Eq, Ord, Read, Show)
+_ScopeStringArgs = Core.Name "hydra.tinkerpop.gremlin.ScopeStringArgs"
+_ScopeStringArgs_scope = Core.Name "scope"
+_ScopeStringArgs_strings = Core.Name "strings"
+data SelectArgs =
+  SelectArgsColumn TraversalColumnArgument |
+  SelectArgsPopStrings SelectByKeys |
+  SelectArgsPopTraversal PopAndTraversal |
+  SelectArgsStrings [StringArgument] |
+  SelectArgsTraversal NestedTraversal
+  deriving (Eq, Ord, Read, Show)
+_SelectArgs = Core.Name "hydra.tinkerpop.gremlin.SelectArgs"
+_SelectArgs_column = Core.Name "column"
+_SelectArgs_popStrings = Core.Name "popStrings"
+_SelectArgs_popTraversal = Core.Name "popTraversal"
+_SelectArgs_strings = Core.Name "strings"
+_SelectArgs_traversal = Core.Name "traversal"
+data SelectByKeys =
+  SelectByKeys {
+    selectByKeysPop :: TraversalPopArgument,
+    selectByKeysKeys :: [StringArgument]}
+  deriving (Eq, Ord, Read, Show)
+_SelectByKeys = Core.Name "hydra.tinkerpop.gremlin.SelectByKeys"
+_SelectByKeys_pop = Core.Name "pop"
+_SelectByKeys_keys = Core.Name "keys"
+data ServiceArguments =
+  ServiceArgumentsMap (Maybe GenericLiteralMapArgument) |
+  ServiceArgumentsTraversal (Maybe NestedTraversal)
+  deriving (Eq, Ord, Read, Show)
+_ServiceArguments = Core.Name "hydra.tinkerpop.gremlin.ServiceArguments"
+_ServiceArguments_map = Core.Name "map"
+_ServiceArguments_traversal = Core.Name "traversal"
+data ServiceCall =
+  ServiceCall {
+    serviceCallService :: StringArgument,
+    serviceCallArguments :: ServiceArguments}
+  deriving (Eq, Ord, Read, Show)
+_ServiceCall = Core.Name "hydra.tinkerpop.gremlin.ServiceCall"
+_ServiceCall_service = Core.Name "service"
+_ServiceCall_arguments = Core.Name "arguments"
+data ShortestPathConstants =
+  ShortestPathConstantsTarget |
+  ShortestPathConstantsEdges |
+  ShortestPathConstantsDistance |
+  ShortestPathConstantsMaxDistance |
+  ShortestPathConstantsIncludeEdges
+  deriving (Eq, Ord, Read, Show)
+_ShortestPathConstants = Core.Name "hydra.tinkerpop.gremlin.ShortestPathConstants"
+_ShortestPathConstants_target = Core.Name "target"
+_ShortestPathConstants_edges = Core.Name "edges"
+_ShortestPathConstants_distance = Core.Name "distance"
+_ShortestPathConstants_maxDistance = Core.Name "maxDistance"
+_ShortestPathConstants_includeEdges = Core.Name "includeEdges"
+data SplitArgs =
+  SplitArgs {
+    splitArgsScope :: (Maybe TraversalScopeArgument),
+    splitArgsDelimiter :: StringNullableArgument}
+  deriving (Eq, Ord, Read, Show)
+_SplitArgs = Core.Name "hydra.tinkerpop.gremlin.SplitArgs"
+_SplitArgs_scope = Core.Name "scope"
+_SplitArgs_delimiter = Core.Name "delimiter"
+data StringAndObject =
+  StringAndObject {
+    stringAndObjectKey :: StringArgument,
+    stringAndObjectValue :: GenericLiteralArgument}
+  deriving (Eq, Ord, Read, Show)
+_StringAndObject = Core.Name "hydra.tinkerpop.gremlin.StringAndObject"
+_StringAndObject_key = Core.Name "key"
+_StringAndObject_value = Core.Name "value"
+data StringAndOptionalObject =
+  StringAndOptionalObject {
+    stringAndOptionalObjectKey :: StringArgument,
+    stringAndOptionalObjectValue :: (Maybe GenericLiteralArgument)}
+  deriving (Eq, Ord, Read, Show)
+_StringAndOptionalObject = Core.Name "hydra.tinkerpop.gremlin.StringAndOptionalObject"
+_StringAndOptionalObject_key = Core.Name "key"
+_StringAndOptionalObject_value = Core.Name "value"
+data StringArgument =
+  StringArgumentValue String |
+  StringArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_StringArgument = Core.Name "hydra.tinkerpop.gremlin.StringArgument"
+_StringArgument_value = Core.Name "value"
+_StringArgument_variable = Core.Name "variable"
+data StringArgumentOrNestedTraversal =
+  StringArgumentOrNestedTraversalString StringArgument |
+  StringArgumentOrNestedTraversalTraversal NestedTraversal
+  deriving (Eq, Ord, Read, Show)
+_StringArgumentOrNestedTraversal = Core.Name "hydra.tinkerpop.gremlin.StringArgumentOrNestedTraversal"
+_StringArgumentOrNestedTraversal_string = Core.Name "string"
+_StringArgumentOrNestedTraversal_traversal = Core.Name "traversal"
+data StringKeyAndObject =
+  StringKeyAndObject {
+    stringKeyAndObjectKey :: StringNullableArgument,
+    stringKeyAndObjectObject :: GenericLiteralArgument}
+  deriving (Eq, Ord, Read, Show)
+_StringKeyAndObject = Core.Name "hydra.tinkerpop.gremlin.StringKeyAndObject"
+_StringKeyAndObject_key = Core.Name "key"
+_StringKeyAndObject_object = Core.Name "object"
+data StringKeyAndPredicate =
+  StringKeyAndPredicate {
+    stringKeyAndPredicateKey :: StringNullableArgument,
+    stringKeyAndPredicatePredicate :: TraversalPredicate}
+  deriving (Eq, Ord, Read, Show)
+_StringKeyAndPredicate = Core.Name "hydra.tinkerpop.gremlin.StringKeyAndPredicate"
+_StringKeyAndPredicate_key = Core.Name "key"
+_StringKeyAndPredicate_predicate = Core.Name "predicate"
+data StringNullableArgument =
+  StringNullableArgumentValue (Maybe String) |
+  StringNullableArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_StringNullableArgument = Core.Name "hydra.tinkerpop.gremlin.StringNullableArgument"
+_StringNullableArgument_value = Core.Name "value"
+_StringNullableArgument_variable = Core.Name "variable"
+data StringRange =
+  StringRange {
+    stringRangeLeft :: String,
+    stringRangeRight :: String}
+  deriving (Eq, Ord, Read, Show)
+_StringRange = Core.Name "hydra.tinkerpop.gremlin.StringRange"
+_StringRange_left = Core.Name "left"
+_StringRange_right = Core.Name "right"
+data StructureVertex =
+  StructureVertex {
+    structureVertexNew :: Bool,
+    structureVertexId :: GenericLiteralArgument,
+    structureVertexLabel :: StringArgument}
+  deriving (Eq, Ord, Read, Show)
+_StructureVertex = Core.Name "hydra.tinkerpop.gremlin.StructureVertex"
+_StructureVertex_new = Core.Name "new"
+_StructureVertex_id = Core.Name "id"
+_StructureVertex_label = Core.Name "label"
+data StructureVertexArgument =
+  StructureVertexArgumentValue StructureVertex |
+  StructureVertexArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_StructureVertexArgument = Core.Name "hydra.tinkerpop.gremlin.StructureVertexArgument"
+_StructureVertexArgument_value = Core.Name "value"
+_StructureVertexArgument_variable = Core.Name "variable"
+data SubstringArgs =
+  SubstringArgs {
+    substringArgsScope :: (Maybe TraversalScopeArgument),
+    substringArgsStart :: IntegerArgument,
+    substringArgsEnd :: (Maybe IntegerArgument)}
+  deriving (Eq, Ord, Read, Show)
+_SubstringArgs = Core.Name "hydra.tinkerpop.gremlin.SubstringArgs"
+_SubstringArgs_scope = Core.Name "scope"
+_SubstringArgs_start = Core.Name "start"
+_SubstringArgs_end = Core.Name "end"
+data TailArgs =
+  TailArgs {
+    tailArgsScope :: (Maybe TraversalScopeArgument),
+    tailArgsInteger :: (Maybe IntegerArgument)}
+  deriving (Eq, Ord, Read, Show)
+_TailArgs = Core.Name "hydra.tinkerpop.gremlin.TailArgs"
+_TailArgs_scope = Core.Name "scope"
+_TailArgs_integer = Core.Name "integer"
+data TerminatedTraversal =
+  TerminatedTraversal {
+    terminatedTraversalRoot :: RootTraversal,
+    terminatedTraversalTerminal :: TraversalTerminalMethod}
+  deriving (Eq, Ord, Read, Show)
+_TerminatedTraversal = Core.Name "hydra.tinkerpop.gremlin.TerminatedTraversal"
+_TerminatedTraversal_root = Core.Name "root"
+_TerminatedTraversal_terminal = Core.Name "terminal"
+data ToArgs =
+  ToArgsDirection DirectionAndVarargs |
+  ToArgsString StringArgument |
+  ToArgsVertex StructureVertexArgument |
+  ToArgsTraversal NestedTraversal
+  deriving (Eq, Ord, Read, Show)
+_ToArgs = Core.Name "hydra.tinkerpop.gremlin.ToArgs"
+_ToArgs_direction = Core.Name "direction"
+_ToArgs_string = Core.Name "string"
+_ToArgs_vertex = Core.Name "vertex"
+_ToArgs_traversal = Core.Name "traversal"
+data TransactionPart =
+  TransactionPartBegin |
+  TransactionPartCommit |
+  TransactionPartRollback
+  deriving (Eq, Ord, Read, Show)
+_TransactionPart = Core.Name "hydra.tinkerpop.gremlin.TransactionPart"
+_TransactionPart_begin = Core.Name "begin"
+_TransactionPart_commit = Core.Name "commit"
+_TransactionPart_rollback = Core.Name "rollback"
+data TraversalBiFunctionArgument =
+  TraversalBiFunctionArgumentValue TraversalOperator |
+  TraversalBiFunctionArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalBiFunctionArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalBiFunctionArgument"
+_TraversalBiFunctionArgument_value = Core.Name "value"
+_TraversalBiFunctionArgument_variable = Core.Name "variable"
+data TraversalCardinality =
+  TraversalCardinalitySingle GenericLiteral |
+  TraversalCardinalitySet GenericLiteral |
+  TraversalCardinalityList GenericLiteral
+  deriving (Eq, Ord, Read, Show)
+_TraversalCardinality = Core.Name "hydra.tinkerpop.gremlin.TraversalCardinality"
+_TraversalCardinality_single = Core.Name "single"
+_TraversalCardinality_set = Core.Name "set"
+_TraversalCardinality_list = Core.Name "list"
+data TraversalCardinalityArgument =
+  TraversalCardinalityArgumentValue TraversalCardinality |
+  TraversalCardinalityArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalCardinalityArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalCardinalityArgument"
+_TraversalCardinalityArgument_value = Core.Name "value"
+_TraversalCardinalityArgument_variable = Core.Name "variable"
+data TraversalColumn =
+  TraversalColumnKeys |
+  TraversalColumnValues
+  deriving (Eq, Ord, Read, Show)
+_TraversalColumn = Core.Name "hydra.tinkerpop.gremlin.TraversalColumn"
+_TraversalColumn_keys = Core.Name "keys"
+_TraversalColumn_values = Core.Name "values"
+data TraversalColumnArgument =
+  TraversalColumnArgumentValue TraversalColumn |
+  TraversalColumnArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalColumnArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalColumnArgument"
+_TraversalColumnArgument_value = Core.Name "value"
+_TraversalColumnArgument_variable = Core.Name "variable"
+data TraversalComparatorArgument =
+  TraversalComparatorArgumentValue TraversalOrder |
+  TraversalComparatorArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalComparatorArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalComparatorArgument"
+_TraversalComparatorArgument_value = Core.Name "value"
+_TraversalComparatorArgument_variable = Core.Name "variable"
+data TraversalDT =
+  TraversalDTSecond |
+  TraversalDTMinute |
+  TraversalDTHour |
+  TraversalDTDay
+  deriving (Eq, Ord, Read, Show)
+_TraversalDT = Core.Name "hydra.tinkerpop.gremlin.TraversalDT"
+_TraversalDT_second = Core.Name "second"
+_TraversalDT_minute = Core.Name "minute"
+_TraversalDT_hour = Core.Name "hour"
+_TraversalDT_day = Core.Name "day"
+data TraversalDTArgument =
+  TraversalDTArgumentValue TraversalDT |
+  TraversalDTArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalDTArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalDTArgument"
+_TraversalDTArgument_value = Core.Name "value"
+_TraversalDTArgument_variable = Core.Name "variable"
+data TraversalDirection =
+  TraversalDirectionIn |
+  TraversalDirectionOut |
+  TraversalDirectionBoth |
+  TraversalDirectionFrom |
+  TraversalDirectionTo
+  deriving (Eq, Ord, Read, Show)
+_TraversalDirection = Core.Name "hydra.tinkerpop.gremlin.TraversalDirection"
+_TraversalDirection_in = Core.Name "in"
+_TraversalDirection_out = Core.Name "out"
+_TraversalDirection_both = Core.Name "both"
+_TraversalDirection_from = Core.Name "from"
+_TraversalDirection_to = Core.Name "to"
+data TraversalDirectionArgument =
+  TraversalDirectionArgumentValue TraversalDirection |
+  TraversalDirectionArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalDirectionArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalDirectionArgument"
+_TraversalDirectionArgument_value = Core.Name "value"
+_TraversalDirectionArgument_variable = Core.Name "variable"
+data TraversalFunction =
+  TraversalFunctionToken TraversalToken |
+  TraversalFunctionColumn TraversalColumn
+  deriving (Eq, Ord, Read, Show)
+_TraversalFunction = Core.Name "hydra.tinkerpop.gremlin.TraversalFunction"
+_TraversalFunction_token = Core.Name "token"
+_TraversalFunction_column = Core.Name "column"
+data TraversalFunctionArgument =
+  TraversalFunctionArgumentValue TraversalFunction |
+  TraversalFunctionArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalFunctionArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalFunctionArgument"
+_TraversalFunctionArgument_value = Core.Name "value"
+_TraversalFunctionArgument_variable = Core.Name "variable"
+data TraversalGType =
+  TraversalGTypeBigDecimal |
+  TraversalGTypeBigDecimalU |
+  TraversalGTypeBigInt |
+  TraversalGTypeBigIntU |
+  TraversalGTypeBinary |
+  TraversalGTypeBinaryU |
+  TraversalGTypeBoolean |
+  TraversalGTypeBooleanU |
+  TraversalGTypeByte |
+  TraversalGTypeByteU |
+  TraversalGTypeChar |
+  TraversalGTypeCharU |
+  TraversalGTypeDateTime |
+  TraversalGTypeDateTimeU |
+  TraversalGTypeDouble |
+  TraversalGTypeDoubleU |
+  TraversalGTypeDuration |
+  TraversalGTypeDurationU |
+  TraversalGTypeEdge |
+  TraversalGTypeEdgeU |
+  TraversalGTypeFloat |
+  TraversalGTypeFloatU |
+  TraversalGTypeGraph |
+  TraversalGTypeGraphU |
+  TraversalGTypeInt |
+  TraversalGTypeIntU |
+  TraversalGTypeList |
+  TraversalGTypeListU |
+  TraversalGTypeLong |
+  TraversalGTypeLongU |
+  TraversalGTypeMap |
+  TraversalGTypeMapU |
+  TraversalGTypeNull |
+  TraversalGTypeNullU |
+  TraversalGTypeNumber |
+  TraversalGTypeNumberU |
+  TraversalGTypePath |
+  TraversalGTypePathU |
+  TraversalGTypeProperty |
+  TraversalGTypePropertyU |
+  TraversalGTypeSet |
+  TraversalGTypeSetU |
+  TraversalGTypeShort |
+  TraversalGTypeShortU |
+  TraversalGTypeString |
+  TraversalGTypeStringU |
+  TraversalGTypeTree |
+  TraversalGTypeTreeU |
+  TraversalGTypeUuid |
+  TraversalGTypeUuidL |
+  TraversalGTypeVertex |
+  TraversalGTypeVertexU |
+  TraversalGTypeVproperty |
+  TraversalGTypeVpropertyU
+  deriving (Eq, Ord, Read, Show)
+_TraversalGType = Core.Name "hydra.tinkerpop.gremlin.TraversalGType"
+_TraversalGType_bigDecimal = Core.Name "bigDecimal"
+_TraversalGType_bigDecimalU = Core.Name "bigDecimalU"
+_TraversalGType_bigInt = Core.Name "bigInt"
+_TraversalGType_bigIntU = Core.Name "bigIntU"
+_TraversalGType_binary = Core.Name "binary"
+_TraversalGType_binaryU = Core.Name "binaryU"
+_TraversalGType_boolean = Core.Name "boolean"
+_TraversalGType_booleanU = Core.Name "booleanU"
+_TraversalGType_byte = Core.Name "byte"
+_TraversalGType_byteU = Core.Name "byteU"
+_TraversalGType_char = Core.Name "char"
+_TraversalGType_charU = Core.Name "charU"
+_TraversalGType_dateTime = Core.Name "dateTime"
+_TraversalGType_dateTimeU = Core.Name "dateTimeU"
+_TraversalGType_double = Core.Name "double"
+_TraversalGType_doubleU = Core.Name "doubleU"
+_TraversalGType_duration = Core.Name "duration"
+_TraversalGType_durationU = Core.Name "durationU"
+_TraversalGType_edge = Core.Name "edge"
+_TraversalGType_edgeU = Core.Name "edgeU"
+_TraversalGType_float = Core.Name "float"
+_TraversalGType_floatU = Core.Name "floatU"
+_TraversalGType_graph = Core.Name "graph"
+_TraversalGType_graphU = Core.Name "graphU"
+_TraversalGType_int = Core.Name "int"
+_TraversalGType_intU = Core.Name "intU"
+_TraversalGType_list = Core.Name "list"
+_TraversalGType_listU = Core.Name "listU"
+_TraversalGType_long = Core.Name "long"
+_TraversalGType_longU = Core.Name "longU"
+_TraversalGType_map = Core.Name "map"
+_TraversalGType_mapU = Core.Name "mapU"
+_TraversalGType_null = Core.Name "null"
+_TraversalGType_nullU = Core.Name "nullU"
+_TraversalGType_number = Core.Name "number"
+_TraversalGType_numberU = Core.Name "numberU"
+_TraversalGType_path = Core.Name "path"
+_TraversalGType_pathU = Core.Name "pathU"
+_TraversalGType_property = Core.Name "property"
+_TraversalGType_propertyU = Core.Name "propertyU"
+_TraversalGType_set = Core.Name "set"
+_TraversalGType_setU = Core.Name "setU"
+_TraversalGType_short = Core.Name "short"
+_TraversalGType_shortU = Core.Name "shortU"
+_TraversalGType_string = Core.Name "string"
+_TraversalGType_stringU = Core.Name "stringU"
+_TraversalGType_tree = Core.Name "tree"
+_TraversalGType_treeU = Core.Name "treeU"
+_TraversalGType_uuid = Core.Name "uuid"
+_TraversalGType_uuidL = Core.Name "uuidL"
+_TraversalGType_vertex = Core.Name "vertex"
+_TraversalGType_vertexU = Core.Name "vertexU"
+_TraversalGType_vproperty = Core.Name "vproperty"
+_TraversalGType_vpropertyU = Core.Name "vpropertyU"
+data TraversalGTypeArgument =
+  TraversalGTypeArgumentValue TraversalGType |
+  TraversalGTypeArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalGTypeArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalGTypeArgument"
+_TraversalGTypeArgument_value = Core.Name "value"
+_TraversalGTypeArgument_variable = Core.Name "variable"
+data TraversalMerge =
+  TraversalMergeOnCreate |
+  TraversalMergeOnMatch |
+  TraversalMergeOutV |
+  TraversalMergeInV
+  deriving (Eq, Ord, Read, Show)
+_TraversalMerge = Core.Name "hydra.tinkerpop.gremlin.TraversalMerge"
+_TraversalMerge_onCreate = Core.Name "onCreate"
+_TraversalMerge_onMatch = Core.Name "onMatch"
+_TraversalMerge_outV = Core.Name "outV"
+_TraversalMerge_inV = Core.Name "inV"
+data TraversalMergeArgument =
+  TraversalMergeArgumentValue TraversalMerge |
+  TraversalMergeArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalMergeArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalMergeArgument"
+_TraversalMergeArgument_value = Core.Name "value"
+_TraversalMergeArgument_variable = Core.Name "variable"
+data TraversalMethod =
+  TraversalMethodV [GenericLiteralArgument] |
+  TraversalMethodE [GenericLiteralArgument] |
+  TraversalMethodAddE StringArgumentOrNestedTraversal |
+  TraversalMethodAddV (Maybe StringArgumentOrNestedTraversal) |
+  TraversalMethodMergeE MergeArgs |
+  TraversalMethodMergeV MergeArgs |
+  TraversalMethodAggregate StringArgument |
+  TraversalMethodAll TraversalPredicate |
+  TraversalMethodAnd [NestedTraversal] |
+  TraversalMethodAny TraversalPredicate |
+  TraversalMethodAs AsArgs |
+  TraversalMethodAsBool |
+  TraversalMethodAsDate |
+  TraversalMethodAsNumber (Maybe TraversalGTypeArgument) |
+  TraversalMethodAsString (Maybe TraversalScopeArgument) |
+  TraversalMethodBarrier (Maybe BarrierArgs) |
+  TraversalMethodBoth [StringNullableArgument] |
+  TraversalMethodBothE [StringNullableArgument] |
+  TraversalMethodBothV |
+  TraversalMethodBranch NestedTraversal |
+  TraversalMethodBy ByArgs |
+  TraversalMethodCall ServiceCall |
+  TraversalMethodCap AsArgs |
+  TraversalMethodChoose ChooseArgs |
+  TraversalMethodCoalesce [NestedTraversal] |
+  TraversalMethodCoin NumericArgument |
+  TraversalMethodCombine GenericLiteralArgument |
+  TraversalMethodConcat ConcatArgs |
+  TraversalMethodConjoin StringArgument |
+  TraversalMethodConnectedComponent |
+  TraversalMethodConstant GenericLiteralArgument |
+  TraversalMethodCount (Maybe TraversalScopeArgument) |
+  TraversalMethodCyclicPath |
+  TraversalMethodDateAdd DateAddArgs |
+  TraversalMethodDateDiff DateDiffArgs |
+  TraversalMethodDedup DedupArgs |
+  TraversalMethodDifference GenericLiteralArgument |
+  TraversalMethodDiscard |
+  TraversalMethodDisjunct GenericLiteralArgument |
+  TraversalMethodDrop |
+  TraversalMethodElement [StringNullableArgument] |
+  TraversalMethodElementMap [StringNullableArgument] |
+  TraversalMethodEmit (Maybe PredicateOrTraversal) |
+  TraversalMethodFail (Maybe StringArgument) |
+  TraversalMethodFilter PredicateOrTraversal |
+  TraversalMethodFlatMap NestedTraversal |
+  TraversalMethodFold (Maybe FoldArgs) |
+  TraversalMethodFormat StringArgument |
+  TraversalMethodFrom FromArgs |
+  TraversalMethodGroup (Maybe StringArgument) |
+  TraversalMethodGroupCount (Maybe StringArgument) |
+  TraversalMethodHas HasArgs |
+  TraversalMethodHasId PredicateOrObjects |
+  TraversalMethodHasKey PredicateOrStrings |
+  TraversalMethodHasLabel PredicateOrStrings |
+  TraversalMethodHasNot StringNullableArgument |
+  TraversalMethodHasValue PredicateOrObjects |
+  TraversalMethodId |
+  TraversalMethodIdentity |
+  TraversalMethodIn [StringNullableArgument] |
+  TraversalMethodInE [StringNullableArgument] |
+  TraversalMethodInV |
+  TraversalMethodIndex |
+  TraversalMethodInject [GenericLiteralArgument] |
+  TraversalMethodIntersect GenericLiteralArgument |
+  TraversalMethodIs PredicateOrObject |
+  TraversalMethodKey |
+  TraversalMethodLabel |
+  TraversalMethodLength (Maybe TraversalScopeArgument) |
+  TraversalMethodLimit ScopeAndInteger |
+  TraversalMethodLocal NestedTraversal |
+  TraversalMethodLoops (Maybe StringArgument) |
+  TraversalMethodLTrim (Maybe TraversalScopeArgument) |
+  TraversalMethodMap NestedTraversal |
+  TraversalMethodMatch [NestedTraversal] |
+  TraversalMethodMath StringArgument |
+  TraversalMethodMax (Maybe TraversalScopeArgument) |
+  TraversalMethodMean (Maybe TraversalScopeArgument) |
+  TraversalMethodMerge GenericLiteralArgument |
+  TraversalMethodMin (Maybe TraversalScopeArgument) |
+  TraversalMethodNone TraversalPredicate |
+  TraversalMethodNot NestedTraversal |
+  TraversalMethodOption OptionArgs |
+  TraversalMethodOptional NestedTraversal |
+  TraversalMethodOr [NestedTraversal] |
+  TraversalMethodOrder (Maybe TraversalScopeArgument) |
+  TraversalMethodOtherV |
+  TraversalMethodOut [StringNullableArgument] |
+  TraversalMethodOutE [StringNullableArgument] |
+  TraversalMethodOutV |
+  TraversalMethodPageRank (Maybe NumericArgument) |
+  TraversalMethodPath |
+  TraversalMethodPeerPressure |
+  TraversalMethodProduct GenericLiteralArgument |
+  TraversalMethodProfile (Maybe StringArgument) |
+  TraversalMethodProject AsArgs |
+  TraversalMethodProperties [StringNullableArgument] |
+  TraversalMethodProperty PropertyArgs |
+  TraversalMethodPropertyMap [StringNullableArgument] |
+  TraversalMethodRange RangeArgs |
+  TraversalMethodRead |
+  TraversalMethodRepeat RepeatArgs |
+  TraversalMethodReplace ReplaceArgs |
+  TraversalMethodReverse |
+  TraversalMethodRTrim (Maybe TraversalScopeArgument) |
+  TraversalMethodSack (Maybe TraversalBiFunctionArgument) |
+  TraversalMethodSample SampleByScope |
+  TraversalMethodSelect SelectArgs |
+  TraversalMethodShortestPath |
+  TraversalMethodSideEffect NestedTraversal |
+  TraversalMethodSimplePath |
+  TraversalMethodSkip ScopeAndInteger |
+  TraversalMethodSplit SplitArgs |
+  TraversalMethodSubgraph StringArgument |
+  TraversalMethodSubstring SubstringArgs |
+  TraversalMethodSum (Maybe TraversalScopeArgument) |
+  TraversalMethodTail (Maybe TailArgs) |
+  TraversalMethodTimeLimit IntegerArgument |
+  TraversalMethodTimes IntegerArgument |
+  TraversalMethodTo ToArgs |
+  TraversalMethodToE DirectionAndVarargs |
+  TraversalMethodToLower (Maybe TraversalScopeArgument) |
+  TraversalMethodToUpper (Maybe TraversalScopeArgument) |
+  TraversalMethodToV TraversalDirectionArgument |
+  TraversalMethodTree (Maybe StringArgument) |
+  TraversalMethodTrim (Maybe TraversalScopeArgument) |
+  TraversalMethodUnfold |
+  TraversalMethodUnion [NestedTraversal] |
+  TraversalMethodUntil PredicateOrTraversal |
+  TraversalMethodValue |
+  TraversalMethodValueMap ValueMapArgs |
+  TraversalMethodValues [StringNullableArgument] |
+  TraversalMethodWhere WhereArgs |
+  TraversalMethodWith WithArgs |
+  TraversalMethodWrite
+  deriving (Eq, Ord, Read, Show)
+_TraversalMethod = Core.Name "hydra.tinkerpop.gremlin.TraversalMethod"
+_TraversalMethod_v = Core.Name "v"
+_TraversalMethod_e = Core.Name "e"
+_TraversalMethod_addE = Core.Name "addE"
+_TraversalMethod_addV = Core.Name "addV"
+_TraversalMethod_mergeE = Core.Name "mergeE"
+_TraversalMethod_mergeV = Core.Name "mergeV"
+_TraversalMethod_aggregate = Core.Name "aggregate"
+_TraversalMethod_all = Core.Name "all"
+_TraversalMethod_and = Core.Name "and"
+_TraversalMethod_any = Core.Name "any"
+_TraversalMethod_as = Core.Name "as"
+_TraversalMethod_asBool = Core.Name "asBool"
+_TraversalMethod_asDate = Core.Name "asDate"
+_TraversalMethod_asNumber = Core.Name "asNumber"
+_TraversalMethod_asString = Core.Name "asString"
+_TraversalMethod_barrier = Core.Name "barrier"
+_TraversalMethod_both = Core.Name "both"
+_TraversalMethod_bothE = Core.Name "bothE"
+_TraversalMethod_bothV = Core.Name "bothV"
+_TraversalMethod_branch = Core.Name "branch"
+_TraversalMethod_by = Core.Name "by"
+_TraversalMethod_call = Core.Name "call"
+_TraversalMethod_cap = Core.Name "cap"
+_TraversalMethod_choose = Core.Name "choose"
+_TraversalMethod_coalesce = Core.Name "coalesce"
+_TraversalMethod_coin = Core.Name "coin"
+_TraversalMethod_combine = Core.Name "combine"
+_TraversalMethod_concat = Core.Name "concat"
+_TraversalMethod_conjoin = Core.Name "conjoin"
+_TraversalMethod_connectedComponent = Core.Name "connectedComponent"
+_TraversalMethod_constant = Core.Name "constant"
+_TraversalMethod_count = Core.Name "count"
+_TraversalMethod_cyclicPath = Core.Name "cyclicPath"
+_TraversalMethod_dateAdd = Core.Name "dateAdd"
+_TraversalMethod_dateDiff = Core.Name "dateDiff"
+_TraversalMethod_dedup = Core.Name "dedup"
+_TraversalMethod_difference = Core.Name "difference"
+_TraversalMethod_discard = Core.Name "discard"
+_TraversalMethod_disjunct = Core.Name "disjunct"
+_TraversalMethod_drop = Core.Name "drop"
+_TraversalMethod_element = Core.Name "element"
+_TraversalMethod_elementMap = Core.Name "elementMap"
+_TraversalMethod_emit = Core.Name "emit"
+_TraversalMethod_fail = Core.Name "fail"
+_TraversalMethod_filter = Core.Name "filter"
+_TraversalMethod_flatMap = Core.Name "flatMap"
+_TraversalMethod_fold = Core.Name "fold"
+_TraversalMethod_format = Core.Name "format"
+_TraversalMethod_from = Core.Name "from"
+_TraversalMethod_group = Core.Name "group"
+_TraversalMethod_groupCount = Core.Name "groupCount"
+_TraversalMethod_has = Core.Name "has"
+_TraversalMethod_hasId = Core.Name "hasId"
+_TraversalMethod_hasKey = Core.Name "hasKey"
+_TraversalMethod_hasLabel = Core.Name "hasLabel"
+_TraversalMethod_hasNot = Core.Name "hasNot"
+_TraversalMethod_hasValue = Core.Name "hasValue"
+_TraversalMethod_id = Core.Name "id"
+_TraversalMethod_identity = Core.Name "identity"
+_TraversalMethod_in = Core.Name "in"
+_TraversalMethod_inE = Core.Name "inE"
+_TraversalMethod_inV = Core.Name "inV"
+_TraversalMethod_index = Core.Name "index"
+_TraversalMethod_inject = Core.Name "inject"
+_TraversalMethod_intersect = Core.Name "intersect"
+_TraversalMethod_is = Core.Name "is"
+_TraversalMethod_key = Core.Name "key"
+_TraversalMethod_label = Core.Name "label"
+_TraversalMethod_length = Core.Name "length"
+_TraversalMethod_limit = Core.Name "limit"
+_TraversalMethod_local = Core.Name "local"
+_TraversalMethod_loops = Core.Name "loops"
+_TraversalMethod_lTrim = Core.Name "lTrim"
+_TraversalMethod_map = Core.Name "map"
+_TraversalMethod_match = Core.Name "match"
+_TraversalMethod_math = Core.Name "math"
+_TraversalMethod_max = Core.Name "max"
+_TraversalMethod_mean = Core.Name "mean"
+_TraversalMethod_merge = Core.Name "merge"
+_TraversalMethod_min = Core.Name "min"
+_TraversalMethod_none = Core.Name "none"
+_TraversalMethod_not = Core.Name "not"
+_TraversalMethod_option = Core.Name "option"
+_TraversalMethod_optional = Core.Name "optional"
+_TraversalMethod_or = Core.Name "or"
+_TraversalMethod_order = Core.Name "order"
+_TraversalMethod_otherV = Core.Name "otherV"
+_TraversalMethod_out = Core.Name "out"
+_TraversalMethod_outE = Core.Name "outE"
+_TraversalMethod_outV = Core.Name "outV"
+_TraversalMethod_pageRank = Core.Name "pageRank"
+_TraversalMethod_path = Core.Name "path"
+_TraversalMethod_peerPressure = Core.Name "peerPressure"
+_TraversalMethod_product = Core.Name "product"
+_TraversalMethod_profile = Core.Name "profile"
+_TraversalMethod_project = Core.Name "project"
+_TraversalMethod_properties = Core.Name "properties"
+_TraversalMethod_property = Core.Name "property"
+_TraversalMethod_propertyMap = Core.Name "propertyMap"
+_TraversalMethod_range = Core.Name "range"
+_TraversalMethod_read = Core.Name "read"
+_TraversalMethod_repeat = Core.Name "repeat"
+_TraversalMethod_replace = Core.Name "replace"
+_TraversalMethod_reverse = Core.Name "reverse"
+_TraversalMethod_rTrim = Core.Name "rTrim"
+_TraversalMethod_sack = Core.Name "sack"
+_TraversalMethod_sample = Core.Name "sample"
+_TraversalMethod_select = Core.Name "select"
+_TraversalMethod_shortestPath = Core.Name "shortestPath"
+_TraversalMethod_sideEffect = Core.Name "sideEffect"
+_TraversalMethod_simplePath = Core.Name "simplePath"
+_TraversalMethod_skip = Core.Name "skip"
+_TraversalMethod_split = Core.Name "split"
+_TraversalMethod_subgraph = Core.Name "subgraph"
+_TraversalMethod_substring = Core.Name "substring"
+_TraversalMethod_sum = Core.Name "sum"
+_TraversalMethod_tail = Core.Name "tail"
+_TraversalMethod_timeLimit = Core.Name "timeLimit"
+_TraversalMethod_times = Core.Name "times"
+_TraversalMethod_to = Core.Name "to"
+_TraversalMethod_toE = Core.Name "toE"
+_TraversalMethod_toLower = Core.Name "toLower"
+_TraversalMethod_toUpper = Core.Name "toUpper"
+_TraversalMethod_toV = Core.Name "toV"
+_TraversalMethod_tree = Core.Name "tree"
+_TraversalMethod_trim = Core.Name "trim"
+_TraversalMethod_unfold = Core.Name "unfold"
+_TraversalMethod_union = Core.Name "union"
+_TraversalMethod_until = Core.Name "until"
+_TraversalMethod_value = Core.Name "value"
+_TraversalMethod_valueMap = Core.Name "valueMap"
+_TraversalMethod_values = Core.Name "values"
+_TraversalMethod_where = Core.Name "where"
+_TraversalMethod_with = Core.Name "with"
+_TraversalMethod_write = Core.Name "write"
+data TraversalOperator =
+  TraversalOperatorAddAll |
+  TraversalOperatorAnd |
+  TraversalOperatorAssign |
+  TraversalOperatorDiv |
+  TraversalOperatorMax |
+  TraversalOperatorMin |
+  TraversalOperatorMinus |
+  TraversalOperatorMult |
+  TraversalOperatorOr |
+  TraversalOperatorSum |
+  TraversalOperatorSumLong
+  deriving (Eq, Ord, Read, Show)
+_TraversalOperator = Core.Name "hydra.tinkerpop.gremlin.TraversalOperator"
+_TraversalOperator_addAll = Core.Name "addAll"
+_TraversalOperator_and = Core.Name "and"
+_TraversalOperator_assign = Core.Name "assign"
+_TraversalOperator_div = Core.Name "div"
+_TraversalOperator_max = Core.Name "max"
+_TraversalOperator_min = Core.Name "min"
+_TraversalOperator_minus = Core.Name "minus"
+_TraversalOperator_mult = Core.Name "mult"
+_TraversalOperator_or = Core.Name "or"
+_TraversalOperator_sum = Core.Name "sum"
+_TraversalOperator_sumLong = Core.Name "sumLong"
+data TraversalOrder =
+  TraversalOrderAsc |
+  TraversalOrderDesc |
+  TraversalOrderShuffle
+  deriving (Eq, Ord, Read, Show)
+_TraversalOrder = Core.Name "hydra.tinkerpop.gremlin.TraversalOrder"
+_TraversalOrder_asc = Core.Name "asc"
+_TraversalOrder_desc = Core.Name "desc"
+_TraversalOrder_shuffle = Core.Name "shuffle"
+data TraversalOrderArgument =
+  TraversalOrderArgumentValue TraversalOrder |
+  TraversalOrderArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalOrderArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalOrderArgument"
+_TraversalOrderArgument_value = Core.Name "value"
+_TraversalOrderArgument_variable = Core.Name "variable"
+data TraversalPick =
+  TraversalPickAny |
+  TraversalPickNone |
+  TraversalPickUnproductive
+  deriving (Eq, Ord, Read, Show)
+_TraversalPick = Core.Name "hydra.tinkerpop.gremlin.TraversalPick"
+_TraversalPick_any = Core.Name "any"
+_TraversalPick_none = Core.Name "none"
+_TraversalPick_unproductive = Core.Name "unproductive"
+data TraversalPop =
+  TraversalPopFirst |
+  TraversalPopLast |
+  TraversalPopAll |
+  TraversalPopMixed
+  deriving (Eq, Ord, Read, Show)
+_TraversalPop = Core.Name "hydra.tinkerpop.gremlin.TraversalPop"
+_TraversalPop_first = Core.Name "first"
+_TraversalPop_last = Core.Name "last"
+_TraversalPop_all = Core.Name "all"
+_TraversalPop_mixed = Core.Name "mixed"
+data TraversalPopArgument =
+  TraversalPopArgumentValue TraversalPop |
+  TraversalPopArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalPopArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalPopArgument"
+_TraversalPopArgument_value = Core.Name "value"
+_TraversalPopArgument_variable = Core.Name "variable"
+data TraversalPredicate =
+  TraversalPredicateEq GenericLiteralArgument |
+  TraversalPredicateNeq GenericLiteralArgument |
+  TraversalPredicateLt GenericLiteralArgument |
+  TraversalPredicateLte GenericLiteralArgument |
+  TraversalPredicateGt GenericLiteralArgument |
+  TraversalPredicateGte GenericLiteralArgument |
+  TraversalPredicateInside RangeArgument |
+  TraversalPredicateOutside RangeArgument |
+  TraversalPredicateBetween RangeArgument |
+  TraversalPredicateWithin (Maybe GenericLiteralArgument) |
+  TraversalPredicateWithout (Maybe GenericLiteralArgument) |
+  TraversalPredicateNot TraversalPredicate |
+  TraversalPredicateStartingWith StringArgument |
+  TraversalPredicateNotStartingWith StringArgument |
+  TraversalPredicateEndingWith StringArgument |
+  TraversalPredicateNotEndingWith StringArgument |
+  TraversalPredicateContaining StringArgument |
+  TraversalPredicateNotContaining StringArgument |
+  TraversalPredicateRegex StringArgument |
+  TraversalPredicateNotRegex StringArgument |
+  TraversalPredicateTypeOf TypeOfArg |
+  TraversalPredicateAnd TwoTraversalPredicates |
+  TraversalPredicateOr TwoTraversalPredicates |
+  TraversalPredicateNegate TraversalPredicate
+  deriving (Eq, Ord, Read, Show)
+_TraversalPredicate = Core.Name "hydra.tinkerpop.gremlin.TraversalPredicate"
+_TraversalPredicate_eq = Core.Name "eq"
+_TraversalPredicate_neq = Core.Name "neq"
+_TraversalPredicate_lt = Core.Name "lt"
+_TraversalPredicate_lte = Core.Name "lte"
+_TraversalPredicate_gt = Core.Name "gt"
+_TraversalPredicate_gte = Core.Name "gte"
+_TraversalPredicate_inside = Core.Name "inside"
+_TraversalPredicate_outside = Core.Name "outside"
+_TraversalPredicate_between = Core.Name "between"
+_TraversalPredicate_within = Core.Name "within"
+_TraversalPredicate_without = Core.Name "without"
+_TraversalPredicate_not = Core.Name "not"
+_TraversalPredicate_startingWith = Core.Name "startingWith"
+_TraversalPredicate_notStartingWith = Core.Name "notStartingWith"
+_TraversalPredicate_endingWith = Core.Name "endingWith"
+_TraversalPredicate_notEndingWith = Core.Name "notEndingWith"
+_TraversalPredicate_containing = Core.Name "containing"
+_TraversalPredicate_notContaining = Core.Name "notContaining"
+_TraversalPredicate_regex = Core.Name "regex"
+_TraversalPredicate_notRegex = Core.Name "notRegex"
+_TraversalPredicate_typeOf = Core.Name "typeOf"
+_TraversalPredicate_and = Core.Name "and"
+_TraversalPredicate_or = Core.Name "or"
+_TraversalPredicate_negate = Core.Name "negate"
+data TraversalSackMethodArgument =
+  TraversalSackMethodArgumentValue |
+  TraversalSackMethodArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalSackMethodArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalSackMethodArgument"
+_TraversalSackMethodArgument_value = Core.Name "value"
+_TraversalSackMethodArgument_variable = Core.Name "variable"
+data TraversalScope =
+  TraversalScopeLocal |
+  TraversalScopeGlobal
+  deriving (Eq, Ord, Read, Show)
+_TraversalScope = Core.Name "hydra.tinkerpop.gremlin.TraversalScope"
+_TraversalScope_local = Core.Name "local"
+_TraversalScope_global = Core.Name "global"
+data TraversalScopeArgument =
+  TraversalScopeArgumentValue TraversalScope |
+  TraversalScopeArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalScopeArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalScopeArgument"
+_TraversalScopeArgument_value = Core.Name "value"
+_TraversalScopeArgument_variable = Core.Name "variable"
+newtype TraversalSource =
+  TraversalSource {
+    unTraversalSource :: [TraversalSourceSelfMethod]}
+  deriving (Eq, Ord, Read, Show)
+_TraversalSource = Core.Name "hydra.tinkerpop.gremlin.TraversalSource"
+data TraversalSourceQuery =
+  TraversalSourceQuery {
+    traversalSourceQuerySource :: TraversalSource,
+    traversalSourceQueryTransactionPart :: (Maybe TransactionPart)}
+  deriving (Eq, Ord, Read, Show)
+_TraversalSourceQuery = Core.Name "hydra.tinkerpop.gremlin.TraversalSourceQuery"
+_TraversalSourceQuery_source = Core.Name "source"
+_TraversalSourceQuery_transactionPart = Core.Name "transactionPart"
+data TraversalSourceSelfMethod =
+  TraversalSourceSelfMethodWithBulk Bool |
+  TraversalSourceSelfMethodWithPath |
+  TraversalSourceSelfMethodWithSack WithSackArgs |
+  TraversalSourceSelfMethodWithSideEffect StringAndObject |
+  TraversalSourceSelfMethodWithStrategies [TraversalStrategy] |
+  TraversalSourceSelfMethodWithoutStrategies [Identifier] |
+  TraversalSourceSelfMethodWith StringAndOptionalObject
+  deriving (Eq, Ord, Read, Show)
+_TraversalSourceSelfMethod = Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSelfMethod"
+_TraversalSourceSelfMethod_withBulk = Core.Name "withBulk"
+_TraversalSourceSelfMethod_withPath = Core.Name "withPath"
+_TraversalSourceSelfMethod_withSack = Core.Name "withSack"
+_TraversalSourceSelfMethod_withSideEffect = Core.Name "withSideEffect"
+_TraversalSourceSelfMethod_withStrategies = Core.Name "withStrategies"
+_TraversalSourceSelfMethod_withoutStrategies = Core.Name "withoutStrategies"
+_TraversalSourceSelfMethod_with = Core.Name "with"
+data TraversalSourceSpawnMethod =
+  TraversalSourceSpawnMethodAddE StringArgumentOrNestedTraversal |
+  TraversalSourceSpawnMethodAddV (Maybe StringArgumentOrNestedTraversal) |
+  TraversalSourceSpawnMethodE [GenericLiteralArgument] |
+  TraversalSourceSpawnMethodV [GenericLiteralArgument] |
+  TraversalSourceSpawnMethodMergeV MergeArgs |
+  TraversalSourceSpawnMethodMergeE MergeArgs |
+  TraversalSourceSpawnMethodInject [GenericLiteralArgument] |
+  TraversalSourceSpawnMethodIo StringArgument |
+  TraversalSourceSpawnMethodCall (Maybe ServiceCall) |
+  TraversalSourceSpawnMethodUnion [NestedTraversal]
+  deriving (Eq, Ord, Read, Show)
+_TraversalSourceSpawnMethod = Core.Name "hydra.tinkerpop.gremlin.TraversalSourceSpawnMethod"
+_TraversalSourceSpawnMethod_addE = Core.Name "addE"
+_TraversalSourceSpawnMethod_addV = Core.Name "addV"
+_TraversalSourceSpawnMethod_e = Core.Name "e"
+_TraversalSourceSpawnMethod_v = Core.Name "v"
+_TraversalSourceSpawnMethod_mergeV = Core.Name "mergeV"
+_TraversalSourceSpawnMethod_mergeE = Core.Name "mergeE"
+_TraversalSourceSpawnMethod_inject = Core.Name "inject"
+_TraversalSourceSpawnMethod_io = Core.Name "io"
+_TraversalSourceSpawnMethod_call = Core.Name "call"
+_TraversalSourceSpawnMethod_union = Core.Name "union"
+data TraversalStrategy =
+  TraversalStrategy {
+    traversalStrategyNew :: Bool,
+    traversalStrategyClass :: Identifier,
+    traversalStrategyConfigurations :: [Configuration]}
+  deriving (Eq, Ord, Read, Show)
+_TraversalStrategy = Core.Name "hydra.tinkerpop.gremlin.TraversalStrategy"
+_TraversalStrategy_new = Core.Name "new"
+_TraversalStrategy_class = Core.Name "class"
+_TraversalStrategy_configurations = Core.Name "configurations"
+data TraversalTerminalMethod =
+  TraversalTerminalMethodExplain |
+  TraversalTerminalMethodIterate |
+  TraversalTerminalMethodHasNext |
+  TraversalTerminalMethodTryNext |
+  TraversalTerminalMethodNext (Maybe IntegerLiteral) |
+  TraversalTerminalMethodToList |
+  TraversalTerminalMethodToSet |
+  TraversalTerminalMethodToBulkSet
+  deriving (Eq, Ord, Read, Show)
+_TraversalTerminalMethod = Core.Name "hydra.tinkerpop.gremlin.TraversalTerminalMethod"
+_TraversalTerminalMethod_explain = Core.Name "explain"
+_TraversalTerminalMethod_iterate = Core.Name "iterate"
+_TraversalTerminalMethod_hasNext = Core.Name "hasNext"
+_TraversalTerminalMethod_tryNext = Core.Name "tryNext"
+_TraversalTerminalMethod_next = Core.Name "next"
+_TraversalTerminalMethod_toList = Core.Name "toList"
+_TraversalTerminalMethod_toSet = Core.Name "toSet"
+_TraversalTerminalMethod_toBulkSet = Core.Name "toBulkSet"
+data TraversalToken =
+  TraversalTokenId |
+  TraversalTokenLabel |
+  TraversalTokenKey |
+  TraversalTokenValue
+  deriving (Eq, Ord, Read, Show)
+_TraversalToken = Core.Name "hydra.tinkerpop.gremlin.TraversalToken"
+_TraversalToken_id = Core.Name "id"
+_TraversalToken_label = Core.Name "label"
+_TraversalToken_key = Core.Name "key"
+_TraversalToken_value = Core.Name "value"
+data TraversalTokenArgument =
+  TraversalTokenArgumentValue TraversalToken |
+  TraversalTokenArgumentVariable Identifier
+  deriving (Eq, Ord, Read, Show)
+_TraversalTokenArgument = Core.Name "hydra.tinkerpop.gremlin.TraversalTokenArgument"
+_TraversalTokenArgument_value = Core.Name "value"
+_TraversalTokenArgument_variable = Core.Name "variable"
+data TwoTraversalPredicates =
+  TwoTraversalPredicates {
+    twoTraversalPredicatesLeft :: TraversalPredicate,
+    twoTraversalPredicatesRight :: TraversalPredicate}
+  deriving (Eq, Ord, Read, Show)
+_TwoTraversalPredicates = Core.Name "hydra.tinkerpop.gremlin.TwoTraversalPredicates"
+_TwoTraversalPredicates_left = Core.Name "left"
+_TwoTraversalPredicates_right = Core.Name "right"
+data TypeOfArg =
+  TypeOfArgGType TraversalGType |
+  TypeOfArgString StringArgument
+  deriving (Eq, Ord, Read, Show)
+_TypeOfArg = Core.Name "hydra.tinkerpop.gremlin.TypeOfArg"
+_TypeOfArg_gType = Core.Name "gType"
+_TypeOfArg_string = Core.Name "string"
+data ValueMapArgs =
+  ValueMapArgsString [StringNullableArgument] |
+  ValueMapArgsBoolean ValueMapBooleanArgs
+  deriving (Eq, Ord, Read, Show)
+_ValueMapArgs = Core.Name "hydra.tinkerpop.gremlin.ValueMapArgs"
+_ValueMapArgs_string = Core.Name "string"
+_ValueMapArgs_boolean = Core.Name "boolean"
+data ValueMapBooleanArgs =
+  ValueMapBooleanArgs {
+    valueMapBooleanArgsValue :: BooleanArgument,
+    valueMapBooleanArgsKeys :: (Maybe [StringNullableArgument])}
+  deriving (Eq, Ord, Read, Show)
+_ValueMapBooleanArgs = Core.Name "hydra.tinkerpop.gremlin.ValueMapBooleanArgs"
+_ValueMapBooleanArgs_value = Core.Name "value"
+_ValueMapBooleanArgs_keys = Core.Name "keys"
+data WhereArgs =
+  WhereArgsPredicate WhereWithPredicateArgs |
+  WhereArgsString StringArgument |
+  WhereArgsTraversal NestedTraversal
+  deriving (Eq, Ord, Read, Show)
+_WhereArgs = Core.Name "hydra.tinkerpop.gremlin.WhereArgs"
+_WhereArgs_predicate = Core.Name "predicate"
+_WhereArgs_string = Core.Name "string"
+_WhereArgs_traversal = Core.Name "traversal"
+data WhereWithPredicateArgs =
+  WhereWithPredicateArgs {
+    whereWithPredicateArgsLeftArg :: (Maybe StringArgument),
+    whereWithPredicateArgsPredicate :: TraversalPredicate}
+  deriving (Eq, Ord, Read, Show)
+_WhereWithPredicateArgs = Core.Name "hydra.tinkerpop.gremlin.WhereWithPredicateArgs"
+_WhereWithPredicateArgs_leftArg = Core.Name "leftArg"
+_WhereWithPredicateArgs_predicate = Core.Name "predicate"
+data WithArgs =
+  WithArgs {
+    withArgsKeys :: WithArgsKeys,
+    withArgsValues :: (Maybe WithArgsValues)}
+  deriving (Eq, Ord, Read, Show)
+_WithArgs = Core.Name "hydra.tinkerpop.gremlin.WithArgs"
+_WithArgs_keys = Core.Name "keys"
+_WithArgs_values = Core.Name "values"
+data WithArgsKeys =
+  WithArgsKeysWithOption WithOptionKeys |
+  WithArgsKeysString StringArgument
+  deriving (Eq, Ord, Read, Show)
+_WithArgsKeys = Core.Name "hydra.tinkerpop.gremlin.WithArgsKeys"
+_WithArgsKeys_withOption = Core.Name "withOption"
+_WithArgsKeys_string = Core.Name "string"
+data WithArgsValues =
+  WithArgsValuesWithOptions WithOptionsValues |
+  WithArgsValuesIo IoOptionsValues |
+  WithArgsValuesObject GenericLiteralArgument
+  deriving (Eq, Ord, Read, Show)
+_WithArgsValues = Core.Name "hydra.tinkerpop.gremlin.WithArgsValues"
+_WithArgsValues_withOptions = Core.Name "withOptions"
+_WithArgsValues_io = Core.Name "io"
+_WithArgsValues_object = Core.Name "object"
+data WithOptionKeys =
+  WithOptionKeysShortestPath ShortestPathConstants |
+  WithOptionKeysConnectedComponent ConnectedComponentConstants |
+  WithOptionKeysPageRank PageRankConstants |
+  WithOptionKeysPeerPressure PeerPressureConstants |
+  WithOptionKeysIo IoOptionsKeys |
+  WithOptionKeysWithOptionsTokens |
+  WithOptionKeysWithOptionsIndexer
+  deriving (Eq, Ord, Read, Show)
+_WithOptionKeys = Core.Name "hydra.tinkerpop.gremlin.WithOptionKeys"
+_WithOptionKeys_shortestPath = Core.Name "shortestPath"
+_WithOptionKeys_connectedComponent = Core.Name "connectedComponent"
+_WithOptionKeys_pageRank = Core.Name "pageRank"
+_WithOptionKeys_peerPressure = Core.Name "peerPressure"
+_WithOptionKeys_io = Core.Name "io"
+_WithOptionKeys_withOptionsTokens = Core.Name "withOptionsTokens"
+_WithOptionKeys_withOptionsIndexer = Core.Name "withOptionsIndexer"
+data WithOptionsValues =
+  WithOptionsValuesTokens |
+  WithOptionsValuesNone |
+  WithOptionsValuesIds |
+  WithOptionsValuesLabels |
+  WithOptionsValuesKeys |
+  WithOptionsValuesValues |
+  WithOptionsValuesAll |
+  WithOptionsValuesList |
+  WithOptionsValuesMap
+  deriving (Eq, Ord, Read, Show)
+_WithOptionsValues = Core.Name "hydra.tinkerpop.gremlin.WithOptionsValues"
+_WithOptionsValues_tokens = Core.Name "tokens"
+_WithOptionsValues_none = Core.Name "none"
+_WithOptionsValues_ids = Core.Name "ids"
+_WithOptionsValues_labels = Core.Name "labels"
+_WithOptionsValues_keys = Core.Name "keys"
+_WithOptionsValues_values = Core.Name "values"
+_WithOptionsValues_all = Core.Name "all"
+_WithOptionsValues_list = Core.Name "list"
+_WithOptionsValues_map = Core.Name "map"
+data WithSackArgs =
+  WithSackArgs {
+    withSackArgsInitialValue :: GenericLiteralArgument,
+    withSackArgsBiFunction :: (Maybe TraversalBiFunctionArgument)}
+  deriving (Eq, Ord, Read, Show)
+_WithSackArgs = Core.Name "hydra.tinkerpop.gremlin.WithSackArgs"
+_WithSackArgs_initialValue = Core.Name "initialValue"
+_WithSackArgs_biFunction = Core.Name "biFunction"
diff --git a/src/main/haskell/Hydra/Tinkerpop/Language.hs b/src/main/haskell/Hydra/Tinkerpop/Language.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Tinkerpop/Language.hs
@@ -0,0 +1,128 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Language constraints based on TinkerPop Graph.Features
+
+module Hydra.Tinkerpop.Language where
+import qualified Hydra.Ast as Ast
+import qualified Hydra.Coders as Coders
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Checking as Checking
+import qualified Hydra.Error.Core as ErrorCore
+import qualified Hydra.Error.File as ErrorFile
+import qualified Hydra.Error.Packaging as ErrorPackaging
+import qualified Hydra.Error.System as ErrorSystem
+import qualified Hydra.Errors as Errors
+import qualified Hydra.File as File
+import qualified Hydra.Graph as Graph
+import qualified Hydra.Json.Model as Model
+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets
+import qualified Hydra.Packaging as Packaging
+import qualified Hydra.Parsing as Parsing
+import qualified Hydra.Paths as Paths
+import qualified Hydra.Query as Query
+import qualified Hydra.Relational as Relational
+import qualified Hydra.Strip as Strip
+import qualified Hydra.System as System
+import qualified Hydra.Tabular as Tabular
+import qualified Hydra.Testing as Testing
+import qualified Hydra.Time as Time
+import qualified Hydra.Tinkerpop.Features as Features
+import qualified Hydra.Topology as Topology
+import qualified Hydra.Typed as Typed
+import qualified Hydra.Typing as Typing
+import qualified Hydra.Util as Util
+import qualified Hydra.Validation as Validation
+import qualified Hydra.Variants as Variants
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+-- | Populate language constraints based on TinkerPop Graph.Features
+tinkerpopLanguage :: Coders.LanguageName -> Features.Features -> Features.ExtraFeatures t0 -> Coders.Language
+tinkerpopLanguage name features extras =
+
+      let vpFeatures =
+              Features.vertexPropertyFeaturesDataTypeFeatures (Features.vertexFeaturesProperties (Features.featuresVertex features))
+          cond = \v -> \b -> Logic.ifElse b (Optionals.pure v) Nothing
+          supportsLists =
+                  Logic.or (Features.dataTypeFeaturesSupportsBooleanArrayValues vpFeatures) (Logic.or (Features.dataTypeFeaturesSupportsByteArrayValues vpFeatures) (Logic.or (Features.dataTypeFeaturesSupportsDoubleArrayValues vpFeatures) (Logic.or (Features.dataTypeFeaturesSupportsFloatArrayValues vpFeatures) (Logic.or (Features.dataTypeFeaturesSupportsIntegerArrayValues vpFeatures) (Logic.or (Features.dataTypeFeaturesSupportsLongArrayValues vpFeatures) (Features.dataTypeFeaturesSupportsStringArrayValues vpFeatures))))))
+          supportsLiterals = True
+          supportsMaps = Features.dataTypeFeaturesSupportsMapValues vpFeatures
+          literalVariants =
+                  Sets.fromList (Optionals.cat [
+                    cond Variants.LiteralVariantBinary (Features.dataTypeFeaturesSupportsByteArrayValues vpFeatures),
+                    (cond Variants.LiteralVariantBoolean (Features.dataTypeFeaturesSupportsBooleanValues vpFeatures)),
+                    (cond Variants.LiteralVariantFloat (Logic.or (Features.dataTypeFeaturesSupportsFloatValues vpFeatures) (Features.dataTypeFeaturesSupportsDoubleValues vpFeatures))),
+                    (cond Variants.LiteralVariantInteger (Logic.or (Features.dataTypeFeaturesSupportsIntegerValues vpFeatures) (Features.dataTypeFeaturesSupportsLongValues vpFeatures))),
+                    (cond Variants.LiteralVariantString (Features.dataTypeFeaturesSupportsStringValues vpFeatures))])
+          floatTypes =
+                  Sets.fromList (Optionals.cat [
+                    cond Core.FloatTypeFloat32 (Features.dataTypeFeaturesSupportsFloatValues vpFeatures),
+                    (cond Core.FloatTypeFloat64 (Features.dataTypeFeaturesSupportsDoubleValues vpFeatures))])
+          integerTypes =
+                  Sets.fromList (Optionals.cat [
+                    cond Core.IntegerTypeInt32 (Features.dataTypeFeaturesSupportsIntegerValues vpFeatures),
+                    (cond Core.IntegerTypeInt64 (Features.dataTypeFeaturesSupportsLongValues vpFeatures))])
+          termVariants =
+                  Sets.fromList (Optionals.cat [
+                    cond Variants.TermVariantList supportsLists,
+                    (cond Variants.TermVariantLiteral supportsLiterals),
+                    (cond Variants.TermVariantMap supportsMaps),
+                    (Optionals.pure Variants.TermVariantOptional)])
+          typeVariants =
+                  Sets.fromList (Optionals.cat [
+                    cond Variants.TypeVariantList supportsLists,
+                    (cond Variants.TypeVariantLiteral supportsLiterals),
+                    (cond Variants.TypeVariantMap supportsMaps),
+                    (Optionals.pure Variants.TypeVariantOptional),
+                    (Optionals.pure Variants.TypeVariantWrap)])
+          typePredicate =
+                  \typ ->
+                    let dt = Strip.deannotateType typ
+                    in case dt of
+                      Core.TypeList v0 -> case (Strip.deannotateType v0) of
+                        Core.TypeLiteral v1 -> case v1 of
+                          Core.LiteralTypeBoolean -> Features.dataTypeFeaturesSupportsBooleanArrayValues vpFeatures
+                          Core.LiteralTypeFloat v2 -> case v2 of
+                            Core.FloatTypeFloat64 -> Features.dataTypeFeaturesSupportsDoubleArrayValues vpFeatures
+                            Core.FloatTypeFloat32 -> Features.dataTypeFeaturesSupportsFloatArrayValues vpFeatures
+                            _ -> False
+                          Core.LiteralTypeInteger v2 -> case v2 of
+                            Core.IntegerTypeUint8 -> Features.dataTypeFeaturesSupportsByteArrayValues vpFeatures
+                            Core.IntegerTypeInt32 -> Features.dataTypeFeaturesSupportsIntegerArrayValues vpFeatures
+                            Core.IntegerTypeInt64 -> Features.dataTypeFeaturesSupportsLongArrayValues vpFeatures
+                            _ -> False
+                          Core.LiteralTypeString -> Features.dataTypeFeaturesSupportsStringArrayValues vpFeatures
+                          _ -> False
+                        _ -> False
+                      Core.TypeLiteral _ -> True
+                      Core.TypeMap v0 -> Features.extraFeaturesSupportsMapKey extras (Core.mapTypeKeys v0)
+                      Core.TypeWrap _ -> True
+                      Core.TypeOptional v0 -> case (Strip.deannotateType v0) of
+                        Core.TypeLiteral _ -> True
+                        _ -> False
+                      _ -> True
+      in Coders.Language {
+        Coders.languageName = name,
+        Coders.languageConstraints = Coders.LanguageConstraints {
+          Coders.languageConstraintsLiteralVariants = literalVariants,
+          Coders.languageConstraintsFloatTypes = floatTypes,
+          Coders.languageConstraintsIntegerTypes = integerTypes,
+          Coders.languageConstraintsTermVariants = termVariants,
+          Coders.languageConstraintsTypeVariants = typeVariants,
+          Coders.languageConstraintsTypes = typePredicate},
+        Coders.languageSupportedFeatures = (Sets.fromList [
+          Coders.LanguageFeaturePartialApplication,
+          Coders.LanguageFeatureNestedCaseStatements,
+          Coders.LanguageFeatureNestedPolymorphicLetBindings]),
+        Coders.languageCaseConventions = Coders.CaseConventions {
+          Coders.caseConventionsConstant = Util.CaseConventionUpperSnake,
+          Coders.caseConventionsDirectory = Util.CaseConventionLowerSnake,
+          Coders.caseConventionsEnumValue = Util.CaseConventionPascal,
+          Coders.caseConventionsField = Util.CaseConventionCamel,
+          Coders.caseConventionsFile = Util.CaseConventionLowerSnake,
+          Coders.caseConventionsModule = Util.CaseConventionLowerSnake,
+          Coders.caseConventionsTerm = Util.CaseConventionCamel,
+          Coders.caseConventionsTermVariable = Util.CaseConventionCamel,
+          Coders.caseConventionsType = Util.CaseConventionPascal,
+          Coders.caseConventionsTypeVariable = Util.CaseConventionPascal},
+        Coders.languageDefaultFileExtension = (File.FileExtension "groovy")}
diff --git a/src/main/haskell/Hydra/Validate/Neo4j.hs b/src/main/haskell/Hydra/Validate/Neo4j.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Validate/Neo4j.hs
@@ -0,0 +1,241 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Validation functions for Neo4j property graphs
+
+module Hydra.Validate.Neo4j where
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Neo4j as Neo4j
+import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets
+import qualified Hydra.Neo4j.Model as Model
+import qualified Hydra.Validation as Validation
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Set as S
+-- | All Neo4j validation rule names, as fully qualified 'hydra.error.neo4j.<UnionType>.<variant>' strings.
+allNeo4jRuleNames :: [Core.Name]
+allNeo4jRuleNames =
+    [
+      Core.Name "hydra.error.neo4j.InvalidNodeError.keyViolation",
+      (Core.Name "hydra.error.neo4j.InvalidNodeError.missingImpliedLabel"),
+      (Core.Name "hydra.error.neo4j.InvalidNodeError.missingProperty"),
+      (Core.Name "hydra.error.neo4j.InvalidNodeError.noSuchLabel"),
+      (Core.Name "hydra.error.neo4j.InvalidNodeError.uniquenessViolation"),
+      (Core.Name "hydra.error.neo4j.InvalidNodeError.wrongPropertyType"),
+      (Core.Name "hydra.error.neo4j.InvalidRelationshipError.endNodeNotFound"),
+      (Core.Name "hydra.error.neo4j.InvalidRelationshipError.keyViolation"),
+      (Core.Name "hydra.error.neo4j.InvalidRelationshipError.missingProperty"),
+      (Core.Name "hydra.error.neo4j.InvalidRelationshipError.noMatchingPattern"),
+      (Core.Name "hydra.error.neo4j.InvalidRelationshipError.noSuchType"),
+      (Core.Name "hydra.error.neo4j.InvalidRelationshipError.startNodeNotFound"),
+      (Core.Name "hydra.error.neo4j.InvalidRelationshipError.uniquenessViolation"),
+      (Core.Name "hydra.error.neo4j.InvalidRelationshipError.wrongPropertyType")]
+-- | Append a rule-tagged InvalidNodeError finding to a ValidationResult, classifying as error or warning per the profile and respecting maxErrors/maxWarnings bounds.
+appendFindingNode :: Validation.ValidationProfile -> Validation.ValidationResult t0 -> Maybe (Core.Name, t0) -> Validation.ValidationResult t0
+appendFindingNode p acc finding =
+    Optionals.cases finding acc (\rp ->
+      let ruleName = Pairs.first rp
+          payload = Pairs.second rp
+          errs = Validation.validationResultErrors acc
+          wrns = Validation.validationResultWarnings acc
+      in (Logic.ifElse (Sets.member ruleName (Validation.validationProfileErrorRules p)) (Logic.ifElse (Equality.lt (Lists.length errs) (Validation.validationProfileMaxErrors p)) (Validation.ValidationResult {
+        Validation.validationResultErrors = (Lists.concat2 errs (Lists.singleton payload)),
+        Validation.validationResultWarnings = wrns}) acc) (Logic.ifElse (Sets.member ruleName (Validation.validationProfileWarningRules p)) (Logic.ifElse (Equality.lt (Lists.length wrns) (Validation.validationProfileMaxWarnings p)) (Validation.ValidationResult {
+        Validation.validationResultErrors = errs,
+        Validation.validationResultWarnings = (Lists.concat2 wrns (Lists.singleton payload))}) acc) acc)))
+-- | Append a rule-tagged InvalidRelationshipError finding to a ValidationResult.
+appendFindingRelationship :: Validation.ValidationProfile -> Validation.ValidationResult t0 -> Maybe (Core.Name, t0) -> Validation.ValidationResult t0
+appendFindingRelationship p acc finding =
+    Optionals.cases finding acc (\rp ->
+      let ruleName = Pairs.first rp
+          payload = Pairs.second rp
+          errs = Validation.validationResultErrors acc
+          wrns = Validation.validationResultWarnings acc
+      in (Logic.ifElse (Sets.member ruleName (Validation.validationProfileErrorRules p)) (Logic.ifElse (Equality.lt (Lists.length errs) (Validation.validationProfileMaxErrors p)) (Validation.ValidationResult {
+        Validation.validationResultErrors = (Lists.concat2 errs (Lists.singleton payload)),
+        Validation.validationResultWarnings = wrns}) acc) (Logic.ifElse (Sets.member ruleName (Validation.validationProfileWarningRules p)) (Logic.ifElse (Equality.lt (Lists.length wrns) (Validation.validationProfileMaxWarnings p)) (Validation.ValidationResult {
+        Validation.validationResultErrors = errs,
+        Validation.validationResultWarnings = (Lists.concat2 wrns (Lists.singleton payload))}) acc) acc)))
+-- | The default (open-world) validation profile for Neo4j validation. Every rule except the closed-world noSuchLabel/noSuchType rules is classified as an error; no warnings; maxErrors=1, maxWarnings=20.
+defaultNeo4jProfile :: Validation.ValidationProfile
+defaultNeo4jProfile =
+    Validation.ValidationProfile {
+      Validation.validationProfileErrorRules = (Sets.fromList [
+        Core.Name "hydra.error.neo4j.InvalidNodeError.keyViolation",
+        (Core.Name "hydra.error.neo4j.InvalidNodeError.missingImpliedLabel"),
+        (Core.Name "hydra.error.neo4j.InvalidNodeError.missingProperty"),
+        (Core.Name "hydra.error.neo4j.InvalidNodeError.uniquenessViolation"),
+        (Core.Name "hydra.error.neo4j.InvalidNodeError.wrongPropertyType"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.endNodeNotFound"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.keyViolation"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.missingProperty"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.noMatchingPattern"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.startNodeNotFound"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.uniquenessViolation"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.wrongPropertyType")]),
+      Validation.validationProfileWarningRules = Sets.empty,
+      Validation.validationProfileMaxErrors = 1,
+      Validation.validationProfileMaxWarnings = 20}
+-- | True iff the given rule name appears in the profile's errorRules or warningRules.
+enabledNeo4j :: Validation.ValidationProfile -> Core.Name -> Bool
+enabledNeo4j p ruleName =
+    Logic.or (Sets.member ruleName (Validation.validationProfileErrorRules p)) (Sets.member ruleName (Validation.validationProfileWarningRules p))
+-- | Given a list of nodes, return a function from element id to that node's labels (or nothing if no node has that id).
+labelsForId :: [Model.Node] -> Model.ElementId -> Maybe (S.Set Model.NodeLabel)
+labelsForId nodes eid =
+
+      let m = Maps.fromList (Lists.map (\n -> (Model.unElementId (Model.nodeId n), (Model.nodeLabels n))) nodes)
+      in (Maps.lookup (Model.unElementId eid) m)
+-- | True iff the given Value has the kind required by the given ValueType.
+matchesValueType :: Model.ValueType -> Model.Value -> Bool
+matchesValueType vt v =
+    case vt of
+      Model.ValueTypeBoolean -> case v of
+        Model.ValueBoolean _ -> True
+        _ -> False
+      Model.ValueTypeString -> case v of
+        Model.ValueString _ -> True
+        _ -> False
+      Model.ValueTypeInteger -> case v of
+        Model.ValueInteger _ -> True
+        _ -> False
+      Model.ValueTypeFloat -> case v of
+        Model.ValueFloat _ -> True
+        _ -> False
+      Model.ValueTypeDate -> case v of
+        Model.ValueDate _ -> True
+        _ -> False
+      Model.ValueTypeLocalTime -> case v of
+        Model.ValueLocalTime _ -> True
+        _ -> False
+      Model.ValueTypeZonedTime -> case v of
+        Model.ValueTime _ -> True
+        _ -> False
+      Model.ValueTypeLocalDateTime -> case v of
+        Model.ValueLocalDateTime _ -> True
+        _ -> False
+      Model.ValueTypeZonedDateTime -> case v of
+        Model.ValueDateTime _ -> True
+        _ -> False
+      Model.ValueTypeDuration -> case v of
+        Model.ValueDuration _ -> True
+        _ -> False
+      Model.ValueTypePoint -> case v of
+        Model.ValuePoint _ -> True
+        _ -> False
+      Model.ValueTypeList v0 -> case v of
+        Model.ValueList v1 -> Lists.foldl (\acc -> \x -> Logic.and acc (matchesValueType v0 x)) True v1
+        _ -> False
+      Model.ValueTypeVector _ -> case v of
+        Model.ValueList _ -> True
+        _ -> False
+      Model.ValueTypeUnion v0 -> Lists.foldl (\acc -> \m -> Logic.or acc (matchesValueType m v)) False v0
+-- | The strict (closed-world) validation profile for Neo4j validation. Like the default, but a node or relationship that matches no element type is also an error.
+strictNeo4jProfile :: Validation.ValidationProfile
+strictNeo4jProfile =
+    Validation.ValidationProfile {
+      Validation.validationProfileErrorRules = (Sets.fromList [
+        Core.Name "hydra.error.neo4j.InvalidNodeError.keyViolation",
+        (Core.Name "hydra.error.neo4j.InvalidNodeError.missingImpliedLabel"),
+        (Core.Name "hydra.error.neo4j.InvalidNodeError.missingProperty"),
+        (Core.Name "hydra.error.neo4j.InvalidNodeError.noSuchLabel"),
+        (Core.Name "hydra.error.neo4j.InvalidNodeError.uniquenessViolation"),
+        (Core.Name "hydra.error.neo4j.InvalidNodeError.wrongPropertyType"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.endNodeNotFound"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.keyViolation"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.missingProperty"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.noMatchingPattern"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.noSuchType"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.startNodeNotFound"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.uniquenessViolation"),
+        (Core.Name "hydra.error.neo4j.InvalidRelationshipError.wrongPropertyType")]),
+      Validation.validationProfileWarningRules = Sets.empty,
+      Validation.validationProfileMaxErrors = 1,
+      Validation.validationProfileMaxWarnings = 20}
+-- | Validate a Neo4j graph (nodes and relationships) against a GraphType under the given ValidationProfile, returning a ValidationResult InvalidGraphError. Each element is validated element-wise and its findings lifted into graph-level findings tagged with the element id. Cross-element uniqueness/key checks are not yet performed.
+validateGraph :: Validation.ValidationProfile -> Model.GraphType -> [Model.Node] -> [Model.Relationship] -> Validation.ValidationResult Neo4j.InvalidGraphError
+validateGraph p gt nodes rels =
+
+      let resolver = Just (labelsForId nodes)
+          nodeFindings =
+                  Lists.bind nodes (\n -> Lists.map (\e -> Neo4j.InvalidGraphErrorNode (Neo4j.InvalidGraphNodeError {
+                    Neo4j.invalidGraphNodeErrorId = (Model.nodeId n),
+                    Neo4j.invalidGraphNodeErrorError = e})) (Validation.validationResultErrors (validateNode p gt n)))
+          relFindings =
+                  Lists.bind rels (\r -> Lists.map (\e -> Neo4j.InvalidGraphErrorRelationship (Neo4j.InvalidGraphRelationshipError {
+                    Neo4j.invalidGraphRelationshipErrorId = (Model.relationshipId r),
+                    Neo4j.invalidGraphRelationshipErrorError = e})) (Validation.validationResultErrors (validateRelationship p resolver gt r)))
+          allErrs = Lists.take (Validation.validationProfileMaxErrors p) (Lists.concat2 nodeFindings relFindings)
+      in Validation.ValidationResult {
+        Validation.validationResultErrors = allErrs,
+        Validation.validationResultWarnings = []}
+-- | Validate a node against a GraphType under the given ValidationProfile, returning a ValidationResult InvalidNodeError. The node is checked against every node element type whose identifying label it carries; a node matching none is valid unless the closed-world noSuchLabel rule is enabled.
+validateNode :: Validation.ValidationProfile -> Model.GraphType -> Model.Node -> Validation.ValidationResult Neo4j.InvalidNodeError
+validateNode p gt el =
+
+      let nodeLabels = Model.nodeLabels el
+          props = Model.nodeProperties el
+          matches =
+                  Lists.filter (\net -> Sets.member (Model.nodeElementTypeIdentifyingLabel net) nodeLabels) (Model.graphTypeNodes gt)
+          noMatchCheck =
+                  Logic.ifElse (enabledNeo4j p (Core.Name "hydra.error.neo4j.InvalidNodeError.noSuchLabel")) (Optionals.map (\f -> (Core.Name "hydra.error.neo4j.InvalidNodeError.noSuchLabel", f)) (Logic.ifElse (Lists.null matches) (Just (Neo4j.InvalidNodeErrorNoSuchLabel (Neo4j.NoSuchLabelError {
+                    Neo4j.noSuchLabelErrorLabels = (Sets.toList nodeLabels)}))) Nothing)) Nothing
+          matchChecks =
+                  Lists.bind matches (\net -> Lists.concat2 (Lists.map (\lab -> Logic.ifElse (enabledNeo4j p (Core.Name "hydra.error.neo4j.InvalidNodeError.missingImpliedLabel")) (Optionals.map (\f -> (Core.Name "hydra.error.neo4j.InvalidNodeError.missingImpliedLabel", f)) (Logic.ifElse (Sets.member lab nodeLabels) Nothing (Just (Neo4j.InvalidNodeErrorMissingImpliedLabel (Neo4j.MissingLabelError {
+                    Neo4j.missingLabelErrorLabel = lab}))))) Nothing) (Sets.toList (Model.nodeElementTypeImpliedLabels net))) (Lists.bind (Model.nodeElementTypeConstraints net) (\cd -> case (Model.constraintDefinitionBody cd) of
+                    Model.ConstraintPropertyExistence v0 -> [
+                      Logic.ifElse (enabledNeo4j p (Core.Name "hydra.error.neo4j.InvalidNodeError.missingProperty")) (Optionals.map (\f -> (Core.Name "hydra.error.neo4j.InvalidNodeError.missingProperty", f)) (Optionals.cases (Maps.lookup (Model.propertyExistenceConstraintProperty v0) props) (Just (Neo4j.InvalidNodeErrorMissingProperty (Neo4j.PropertyExistenceError {
+                        Neo4j.propertyExistenceErrorKey = (Model.propertyExistenceConstraintProperty v0)}))) (\_ -> Nothing))) Nothing]
+                    Model.ConstraintKey v0 -> Lists.map (\k -> Logic.ifElse (enabledNeo4j p (Core.Name "hydra.error.neo4j.InvalidNodeError.missingProperty")) (Optionals.map (\f -> (Core.Name "hydra.error.neo4j.InvalidNodeError.missingProperty", f)) (Optionals.cases (Maps.lookup k props) (Just (Neo4j.InvalidNodeErrorMissingProperty (Neo4j.PropertyExistenceError {
+                      Neo4j.propertyExistenceErrorKey = k}))) (\_ -> Nothing))) Nothing) (Model.keyConstraintProperties v0)
+                    Model.ConstraintPropertyType v0 -> [
+                      Logic.ifElse (enabledNeo4j p (Core.Name "hydra.error.neo4j.InvalidNodeError.wrongPropertyType")) (Optionals.map (\f -> (Core.Name "hydra.error.neo4j.InvalidNodeError.wrongPropertyType", f)) (Optionals.cases (Maps.lookup (Model.propertyTypeConstraintProperty v0) props) Nothing (\val -> Logic.ifElse (matchesValueType (Model.propertyTypeConstraintType v0) val) Nothing (Just (Neo4j.InvalidNodeErrorWrongPropertyType (Neo4j.PropertyTypeError {
+                        Neo4j.propertyTypeErrorKey = (Model.propertyTypeConstraintProperty v0),
+                        Neo4j.propertyTypeErrorExpectedType = (Model.propertyTypeConstraintType v0),
+                        Neo4j.propertyTypeErrorValue = val})))))) Nothing]
+                    Model.ConstraintPropertyUniqueness _ -> [])))
+      in (Lists.foldl (\acc -> \guarded -> Logic.ifElse (Equality.gte (Lists.length (Validation.validationResultErrors acc)) (Validation.validationProfileMaxErrors p)) acc (appendFindingNode p acc guarded)) (Validation.ValidationResult {
+        Validation.validationResultErrors = [],
+        Validation.validationResultWarnings = []}) (Lists.cons noMatchCheck matchChecks))
+-- | Validate a relationship against a GraphType under the given ValidationProfile, returning a ValidationResult InvalidRelationshipError. Endpoint labels select the applicable (possibly overloaded) relationship element type; property constraints of the matched type are enforced.
+validateRelationship :: Validation.ValidationProfile -> Maybe (Model.ElementId -> Maybe (S.Set Model.NodeLabel)) -> Model.GraphType -> Model.Relationship -> Validation.ValidationResult Neo4j.InvalidRelationshipError
+validateRelationship p labelsForId gt rel =
+
+      let relType = Model.relationshipType rel
+          props = Model.relationshipProperties rel
+          startLabels = Optionals.cases labelsForId Nothing (\f -> f (Model.relationshipStart rel))
+          endLabels = Optionals.cases labelsForId Nothing (\f -> f (Model.relationshipEnd rel))
+          candidates =
+                  Lists.filter (\ret -> Equality.equal (Model.unRelationshipType (Model.relationshipElementTypeType ret)) (Model.unRelationshipType relType)) (Model.graphTypeRelationships gt)
+          matched =
+                  Lists.filter (\ret -> Logic.and (Optionals.cases startLabels True (\ls -> Sets.member (Model.relationshipElementTypeStartLabel ret) ls)) (Optionals.cases endLabels True (\ls -> Sets.member (Model.relationshipElementTypeEndLabel ret) ls))) candidates
+          noSuchTypeCheck =
+                  Logic.ifElse (enabledNeo4j p (Core.Name "hydra.error.neo4j.InvalidRelationshipError.noSuchType")) (Optionals.map (\f -> (Core.Name "hydra.error.neo4j.InvalidRelationshipError.noSuchType", f)) (Logic.ifElse (Lists.null candidates) (Just (Neo4j.InvalidRelationshipErrorNoSuchType (Neo4j.NoSuchRelationshipTypeError {
+                    Neo4j.noSuchRelationshipTypeErrorType = relType}))) Nothing)) Nothing
+          noPatternCheck =
+                  Logic.ifElse (enabledNeo4j p (Core.Name "hydra.error.neo4j.InvalidRelationshipError.noMatchingPattern")) (Optionals.map (\f -> (Core.Name "hydra.error.neo4j.InvalidRelationshipError.noMatchingPattern", f)) (Logic.ifElse (Logic.and (Logic.not (Lists.null candidates)) (Logic.and (Logic.and (Optionals.isGiven startLabels) (Optionals.isGiven endLabels)) (Lists.null matched))) (Just (Neo4j.InvalidRelationshipErrorNoMatchingPattern (Neo4j.NoMatchingPatternError {
+                    Neo4j.noMatchingPatternErrorAllowedPatterns = (Lists.map (\ret -> Neo4j.RelationshipPattern {
+                      Neo4j.relationshipPatternStartLabel = (Model.relationshipElementTypeStartLabel ret),
+                      Neo4j.relationshipPatternEndLabel = (Model.relationshipElementTypeEndLabel ret)}) candidates),
+                    Neo4j.noMatchingPatternErrorActualStartLabels = (Optionals.cases startLabels [] (\ls -> Sets.toList ls)),
+                    Neo4j.noMatchingPatternErrorActualEndLabels = (Optionals.cases endLabels [] (\ls -> Sets.toList ls))}))) Nothing)) Nothing
+          propChecks =
+                  Lists.bind matched (\ret -> Lists.bind (Model.relationshipElementTypeConstraints ret) (\cd -> case (Model.constraintDefinitionBody cd) of
+                    Model.ConstraintPropertyExistence v0 -> [
+                      Logic.ifElse (enabledNeo4j p (Core.Name "hydra.error.neo4j.InvalidRelationshipError.missingProperty")) (Optionals.map (\f -> (Core.Name "hydra.error.neo4j.InvalidRelationshipError.missingProperty", f)) (Optionals.cases (Maps.lookup (Model.propertyExistenceConstraintProperty v0) props) (Just (Neo4j.InvalidRelationshipErrorMissingProperty (Neo4j.PropertyExistenceError {
+                        Neo4j.propertyExistenceErrorKey = (Model.propertyExistenceConstraintProperty v0)}))) (\_ -> Nothing))) Nothing]
+                    Model.ConstraintKey v0 -> Lists.map (\k -> Logic.ifElse (enabledNeo4j p (Core.Name "hydra.error.neo4j.InvalidRelationshipError.missingProperty")) (Optionals.map (\f -> (Core.Name "hydra.error.neo4j.InvalidRelationshipError.missingProperty", f)) (Optionals.cases (Maps.lookup k props) (Just (Neo4j.InvalidRelationshipErrorMissingProperty (Neo4j.PropertyExistenceError {
+                      Neo4j.propertyExistenceErrorKey = k}))) (\_ -> Nothing))) Nothing) (Model.keyConstraintProperties v0)
+                    Model.ConstraintPropertyType v0 -> [
+                      Logic.ifElse (enabledNeo4j p (Core.Name "hydra.error.neo4j.InvalidRelationshipError.wrongPropertyType")) (Optionals.map (\f -> (Core.Name "hydra.error.neo4j.InvalidRelationshipError.wrongPropertyType", f)) (Optionals.cases (Maps.lookup (Model.propertyTypeConstraintProperty v0) props) Nothing (\val -> Logic.ifElse (matchesValueType (Model.propertyTypeConstraintType v0) val) Nothing (Just (Neo4j.InvalidRelationshipErrorWrongPropertyType (Neo4j.PropertyTypeError {
+                        Neo4j.propertyTypeErrorKey = (Model.propertyTypeConstraintProperty v0),
+                        Neo4j.propertyTypeErrorExpectedType = (Model.propertyTypeConstraintType v0),
+                        Neo4j.propertyTypeErrorValue = val})))))) Nothing]
+                    Model.ConstraintPropertyUniqueness _ -> []))
+      in (Lists.foldl (\acc -> \guarded -> Logic.ifElse (Equality.gte (Lists.length (Validation.validationResultErrors acc)) (Validation.validationProfileMaxErrors p)) acc (appendFindingRelationship p acc guarded)) (Validation.ValidationResult {
+        Validation.validationResultErrors = [],
+        Validation.validationResultWarnings = []}) (Lists.cons noSuchTypeCheck (Lists.cons noPatternCheck propChecks)))
diff --git a/src/main/haskell/Hydra/Validate/Pg.hs b/src/main/haskell/Hydra/Validate/Pg.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/Hydra/Validate/Pg.hs
@@ -0,0 +1,187 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | Validation functions for property graphs
+
+module Hydra.Validate.Pg where
+import qualified Hydra.Core as Core
+import qualified Hydra.Error.Pg as Pg
+import qualified Hydra.Overlay.Haskell.Lib.Equality as Equality
+import qualified Hydra.Overlay.Haskell.Lib.Lists as Lists
+import qualified Hydra.Overlay.Haskell.Lib.Logic as Logic
+import qualified Hydra.Overlay.Haskell.Lib.Maps as Maps
+import qualified Hydra.Overlay.Haskell.Lib.Optionals as Optionals
+import qualified Hydra.Overlay.Haskell.Lib.Pairs as Pairs
+import qualified Hydra.Overlay.Haskell.Lib.Sets as Sets
+import qualified Hydra.Pg.Model as Model
+import qualified Hydra.Validation as Validation
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+import qualified Data.Map as M
+-- | Append a rule-tagged InvalidEdgeError finding to a ValidationResult.
+appendFindingEdge :: Validation.ValidationProfile -> Validation.ValidationResult t0 -> Maybe (Core.Name, t0) -> Validation.ValidationResult t0
+appendFindingEdge p acc finding =
+    Optionals.cases finding acc (\rp ->
+      let ruleName = Pairs.first rp
+          payload = Pairs.second rp
+          errs = Validation.validationResultErrors acc
+          wrns = Validation.validationResultWarnings acc
+      in (Logic.ifElse (Sets.member ruleName (Validation.validationProfileErrorRules p)) (Logic.ifElse (Equality.lt (Lists.length errs) (Validation.validationProfileMaxErrors p)) (Validation.ValidationResult {
+        Validation.validationResultErrors = (Lists.concat2 errs (Lists.singleton payload)),
+        Validation.validationResultWarnings = wrns}) acc) (Logic.ifElse (Sets.member ruleName (Validation.validationProfileWarningRules p)) (Logic.ifElse (Equality.lt (Lists.length wrns) (Validation.validationProfileMaxWarnings p)) (Validation.ValidationResult {
+        Validation.validationResultErrors = errs,
+        Validation.validationResultWarnings = (Lists.concat2 wrns (Lists.singleton payload))}) acc) acc)))
+-- | Append a rule-tagged InvalidGraphError finding to a ValidationResult.
+appendFindingGraph :: Validation.ValidationProfile -> Validation.ValidationResult t0 -> Maybe (Core.Name, t0) -> Validation.ValidationResult t0
+appendFindingGraph p acc finding =
+    Optionals.cases finding acc (\rp ->
+      let ruleName = Pairs.first rp
+          payload = Pairs.second rp
+          errs = Validation.validationResultErrors acc
+          wrns = Validation.validationResultWarnings acc
+      in (Logic.ifElse (Sets.member ruleName (Validation.validationProfileErrorRules p)) (Logic.ifElse (Equality.lt (Lists.length errs) (Validation.validationProfileMaxErrors p)) (Validation.ValidationResult {
+        Validation.validationResultErrors = (Lists.concat2 errs (Lists.singleton payload)),
+        Validation.validationResultWarnings = wrns}) acc) (Logic.ifElse (Sets.member ruleName (Validation.validationProfileWarningRules p)) (Logic.ifElse (Equality.lt (Lists.length wrns) (Validation.validationProfileMaxWarnings p)) (Validation.ValidationResult {
+        Validation.validationResultErrors = errs,
+        Validation.validationResultWarnings = (Lists.concat2 wrns (Lists.singleton payload))}) acc) acc)))
+-- | Append a rule-tagged InvalidElementPropertyError finding to a ValidationResult.
+appendFindingProperty :: Validation.ValidationProfile -> Validation.ValidationResult t0 -> Maybe (Core.Name, t0) -> Validation.ValidationResult t0
+appendFindingProperty p acc finding =
+    Optionals.cases finding acc (\rp ->
+      let ruleName = Pairs.first rp
+          payload = Pairs.second rp
+          errs = Validation.validationResultErrors acc
+          wrns = Validation.validationResultWarnings acc
+      in (Logic.ifElse (Sets.member ruleName (Validation.validationProfileErrorRules p)) (Logic.ifElse (Equality.lt (Lists.length errs) (Validation.validationProfileMaxErrors p)) (Validation.ValidationResult {
+        Validation.validationResultErrors = (Lists.concat2 errs (Lists.singleton payload)),
+        Validation.validationResultWarnings = wrns}) acc) (Logic.ifElse (Sets.member ruleName (Validation.validationProfileWarningRules p)) (Logic.ifElse (Equality.lt (Lists.length wrns) (Validation.validationProfileMaxWarnings p)) (Validation.ValidationResult {
+        Validation.validationResultErrors = errs,
+        Validation.validationResultWarnings = (Lists.concat2 wrns (Lists.singleton payload))}) acc) acc)))
+-- | Append a rule-tagged InvalidVertexError finding to a ValidationResult, classifying as error or warning per the profile and respecting maxErrors/maxWarnings bounds.
+appendFindingVertex :: Validation.ValidationProfile -> Validation.ValidationResult t0 -> Maybe (Core.Name, t0) -> Validation.ValidationResult t0
+appendFindingVertex p acc finding =
+    Optionals.cases finding acc (\rp ->
+      let ruleName = Pairs.first rp
+          payload = Pairs.second rp
+          errs = Validation.validationResultErrors acc
+          wrns = Validation.validationResultWarnings acc
+      in (Logic.ifElse (Sets.member ruleName (Validation.validationProfileErrorRules p)) (Logic.ifElse (Equality.lt (Lists.length errs) (Validation.validationProfileMaxErrors p)) (Validation.ValidationResult {
+        Validation.validationResultErrors = (Lists.concat2 errs (Lists.singleton payload)),
+        Validation.validationResultWarnings = wrns}) acc) (Logic.ifElse (Sets.member ruleName (Validation.validationProfileWarningRules p)) (Logic.ifElse (Equality.lt (Lists.length wrns) (Validation.validationProfileMaxWarnings p)) (Validation.ValidationResult {
+        Validation.validationResultErrors = errs,
+        Validation.validationResultWarnings = (Lists.concat2 wrns (Lists.singleton payload))}) acc) acc)))
+-- | The default validation profile for property-graph validation. Every PG rule classified as an error; no warnings; maxErrors=1, maxWarnings=20.
+defaultPgProfile :: Validation.ValidationProfile
+defaultPgProfile =
+    Validation.ValidationProfile {
+      Validation.validationProfileErrorRules = (Sets.fromList [
+        Core.Name "hydra.error.pg.InvalidVertexError.id",
+        (Core.Name "hydra.error.pg.InvalidVertexError.label"),
+        (Core.Name "hydra.error.pg.InvalidVertexError.property"),
+        (Core.Name "hydra.error.pg.InvalidEdgeError.id"),
+        (Core.Name "hydra.error.pg.InvalidEdgeError.inVertexLabel"),
+        (Core.Name "hydra.error.pg.InvalidEdgeError.inVertexNotFound"),
+        (Core.Name "hydra.error.pg.InvalidEdgeError.label"),
+        (Core.Name "hydra.error.pg.InvalidEdgeError.outVertexLabel"),
+        (Core.Name "hydra.error.pg.InvalidEdgeError.outVertexNotFound"),
+        (Core.Name "hydra.error.pg.InvalidEdgeError.property"),
+        (Core.Name "hydra.error.pg.InvalidPropertyError.invalidValue"),
+        (Core.Name "hydra.error.pg.InvalidPropertyError.missingRequired"),
+        (Core.Name "hydra.error.pg.InvalidPropertyError.unexpectedKey")]),
+      Validation.validationProfileWarningRules = Sets.empty,
+      Validation.validationProfileMaxErrors = 1,
+      Validation.validationProfileMaxWarnings = 20}
+-- | True iff the given rule name appears in the profile's errorRules or warningRules.
+enabledPg :: Validation.ValidationProfile -> Core.Name -> Bool
+enabledPg p ruleName =
+    Logic.or (Sets.member ruleName (Validation.validationProfileErrorRules p)) (Sets.member ruleName (Validation.validationProfileWarningRules p))
+-- | Validate an edge against its EdgeType under the given ValidationProfile, returning a ValidationResult InvalidEdgeError.
+validateEdge :: Validation.ValidationProfile -> (t0 -> t1 -> Maybe Pg.InvalidValueError) -> Maybe (t1 -> Maybe Model.VertexLabel) -> Model.EdgeType t0 -> Model.Edge t1 -> Validation.ValidationResult Pg.InvalidEdgeError
+validateEdge p checkValue labelForVertexId typ el =
+    Lists.foldl (\acc -> \guarded -> Logic.ifElse (Equality.gte (Lists.length (Validation.validationResultErrors acc)) (Validation.validationProfileMaxErrors p)) acc (appendFindingEdge p acc guarded)) (Validation.ValidationResult {
+      Validation.validationResultErrors = [],
+      Validation.validationResultWarnings = []}) [
+      Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidEdgeError.label")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidEdgeError.label", f)) (
+        let expected = Model.edgeTypeLabel typ
+            actual = Model.edgeLabel el
+        in (Logic.ifElse (Equality.equal (Model.unEdgeLabel actual) (Model.unEdgeLabel expected)) Nothing (Just (Pg.InvalidEdgeErrorLabel (Pg.NoSuchEdgeLabelError {
+          Pg.noSuchEdgeLabelErrorLabel = actual})))))) Nothing,
+      (Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidEdgeError.id")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidEdgeError.id", f)) (Optionals.map (\err -> Pg.InvalidEdgeErrorId err) (checkValue (Model.edgeTypeId typ) (Model.edgeId el)))) Nothing),
+      (Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidEdgeError.property")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidEdgeError.property", f)) (Optionals.map (\err -> Pg.InvalidEdgeErrorProperty err) (Lists.maybeHead (Validation.validationResultErrors (validateProperties p checkValue (Model.edgeTypeProperties typ) (Model.edgeProperties el)))))) Nothing),
+      (Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidEdgeError.outVertexNotFound")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidEdgeError.outVertexNotFound", f)) (Optionals.cases labelForVertexId Nothing (\f -> Optionals.cases (f (Model.edgeOut el)) (Just Pg.InvalidEdgeErrorOutVertexNotFound) (\_label -> Nothing)))) Nothing),
+      (Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidEdgeError.outVertexLabel")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidEdgeError.outVertexLabel", f)) (Optionals.cases labelForVertexId Nothing (\f -> Optionals.cases (f (Model.edgeOut el)) Nothing (\label -> Logic.ifElse (Equality.equal (Model.unVertexLabel label) (Model.unVertexLabel (Model.edgeTypeOut typ))) Nothing (Just (Pg.InvalidEdgeErrorOutVertexLabel (Pg.WrongVertexLabelError {
+        Pg.wrongVertexLabelErrorExpected = (Model.edgeTypeOut typ),
+        Pg.wrongVertexLabelErrorActual = label}))))))) Nothing),
+      (Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidEdgeError.inVertexNotFound")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidEdgeError.inVertexNotFound", f)) (Optionals.cases labelForVertexId Nothing (\f -> Optionals.cases (f (Model.edgeIn el)) (Just Pg.InvalidEdgeErrorInVertexNotFound) (\_label -> Nothing)))) Nothing),
+      (Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidEdgeError.inVertexLabel")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidEdgeError.inVertexLabel", f)) (Optionals.cases labelForVertexId Nothing (\f -> Optionals.cases (f (Model.edgeIn el)) Nothing (\label -> Logic.ifElse (Equality.equal (Model.unVertexLabel label) (Model.unVertexLabel (Model.edgeTypeIn typ))) Nothing (Just (Pg.InvalidEdgeErrorInVertexLabel (Pg.WrongVertexLabelError {
+        Pg.wrongVertexLabelErrorExpected = (Model.edgeTypeIn typ),
+        Pg.wrongVertexLabelErrorActual = label}))))))) Nothing)]
+-- | Validate a property graph against a GraphSchema under the given ValidationProfile, threading a ValidationResult InvalidGraphError accumulator. Errors hard-stop traversal once maxErrors is reached.
+validateGraph :: Ord t0 => (Validation.ValidationProfile -> Validation.ValidationResult (Pg.InvalidGraphError t0) -> (t1 -> t0 -> Maybe Pg.InvalidValueError) -> Model.GraphSchema t1 -> Model.Graph t0 -> Validation.ValidationResult (Pg.InvalidGraphError t0))
+validateGraph p acc0 checkValue schema graph =
+
+      let labelForVertexId = Just (\i -> Optionals.map Model.vertexLabel (Maps.lookup i (Model.graphVertices graph)))
+          vertexFindings =
+                  Lists.bind (Maps.elems (Model.graphVertices graph)) (\el ->
+                    let tOpt = Maps.lookup (Model.vertexLabel el) (Model.graphSchemaVertices schema)
+                        perVertex =
+                                Optionals.cases tOpt (Validation.ValidationResult {
+                                  Validation.validationResultErrors = [
+                                    Pg.InvalidVertexErrorLabel (Pg.NoSuchVertexLabelError {
+                                      Pg.noSuchVertexLabelErrorLabel = (Model.vertexLabel el)})],
+                                  Validation.validationResultWarnings = []}) (\t -> validateVertex p checkValue t el)
+                    in (Lists.map (\ve -> Pg.InvalidGraphErrorVertex (Pg.InvalidGraphVertexError {
+                      Pg.invalidGraphVertexErrorId = (Model.vertexId el),
+                      Pg.invalidGraphVertexErrorError = ve})) (Validation.validationResultErrors perVertex)))
+          edgeFindings =
+                  Lists.bind (Maps.elems (Model.graphEdges graph)) (\el ->
+                    let tOpt = Maps.lookup (Model.edgeLabel el) (Model.graphSchemaEdges schema)
+                        perEdge =
+                                Optionals.cases tOpt (Validation.ValidationResult {
+                                  Validation.validationResultErrors = [
+                                    Pg.InvalidEdgeErrorLabel (Pg.NoSuchEdgeLabelError {
+                                      Pg.noSuchEdgeLabelErrorLabel = (Model.edgeLabel el)})],
+                                  Validation.validationResultWarnings = []}) (\t -> validateEdge p checkValue labelForVertexId t el)
+                    in (Lists.map (\ee -> Pg.InvalidGraphErrorEdge (Pg.InvalidGraphEdgeError {
+                      Pg.invalidGraphEdgeErrorId = (Model.edgeId el),
+                      Pg.invalidGraphEdgeErrorError = ee})) (Validation.validationResultErrors perEdge)))
+          liftedErrs = Lists.concat2 vertexFindings edgeFindings
+          newErrs =
+                  Lists.take (Validation.validationProfileMaxErrors p) (Lists.concat2 (Validation.validationResultErrors acc0) liftedErrs)
+      in Validation.ValidationResult {
+        Validation.validationResultErrors = newErrs,
+        Validation.validationResultWarnings = (Validation.validationResultWarnings acc0)}
+-- | Validate a map of properties against a list of PropertyType under the given ValidationProfile, returning a ValidationResult InvalidElementPropertyError.
+validateProperties :: Validation.ValidationProfile -> (t0 -> t1 -> Maybe Pg.InvalidValueError) -> [Model.PropertyType t0] -> M.Map Model.PropertyKey t1 -> Validation.ValidationResult Pg.InvalidElementPropertyError
+validateProperties p checkValue types props =
+
+      let m = Maps.fromList (Lists.map (\pt -> (Model.propertyTypeKey pt, (Model.propertyTypeValue pt))) types)
+          missingChecks =
+                  Lists.map (\t -> Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidPropertyError.missingRequired")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidPropertyError.missingRequired", f)) (Logic.ifElse (Model.propertyTypeRequired t) (Optionals.cases (Maps.lookup (Model.propertyTypeKey t) props) (Just (Pg.InvalidElementPropertyError {
+                    Pg.invalidElementPropertyErrorKey = (Model.propertyTypeKey t),
+                    Pg.invalidElementPropertyErrorError = (Pg.InvalidPropertyErrorMissingRequired (Model.propertyTypeKey t))})) (\_ -> Nothing)) Nothing)) Nothing) types
+          valueChecks =
+                  Lists.bind (Maps.toList props) (\kv ->
+                    let key = Pairs.first kv
+                        val = Pairs.second kv
+                    in [
+                      Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidPropertyError.unexpectedKey")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidPropertyError.unexpectedKey", f)) (Optionals.cases (Maps.lookup key m) (Just (Pg.InvalidElementPropertyError {
+                        Pg.invalidElementPropertyErrorKey = key,
+                        Pg.invalidElementPropertyErrorError = (Pg.InvalidPropertyErrorUnexpectedKey key)})) (\_ -> Nothing))) Nothing,
+                      (Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidPropertyError.invalidValue")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidPropertyError.invalidValue", f)) (Optionals.cases (Maps.lookup key m) Nothing (\typ -> Optionals.map (\err -> Pg.InvalidElementPropertyError {
+                        Pg.invalidElementPropertyErrorKey = key,
+                        Pg.invalidElementPropertyErrorError = (Pg.InvalidPropertyErrorInvalidValue err)}) (checkValue typ val)))) Nothing)])
+      in (Lists.foldl (\acc -> \guarded -> Logic.ifElse (Equality.gte (Lists.length (Validation.validationResultErrors acc)) (Validation.validationProfileMaxErrors p)) acc (appendFindingProperty p acc guarded)) (Validation.ValidationResult {
+        Validation.validationResultErrors = [],
+        Validation.validationResultWarnings = []}) (Lists.concat2 missingChecks valueChecks))
+-- | Validate a vertex against its VertexType under the given ValidationProfile, returning a ValidationResult InvalidVertexError.
+validateVertex :: Validation.ValidationProfile -> (t0 -> t1 -> Maybe Pg.InvalidValueError) -> Model.VertexType t0 -> Model.Vertex t1 -> Validation.ValidationResult Pg.InvalidVertexError
+validateVertex p checkValue typ el =
+    Lists.foldl (\acc -> \guarded -> Logic.ifElse (Equality.gte (Lists.length (Validation.validationResultErrors acc)) (Validation.validationProfileMaxErrors p)) acc (appendFindingVertex p acc guarded)) (Validation.ValidationResult {
+      Validation.validationResultErrors = [],
+      Validation.validationResultWarnings = []}) [
+      Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidVertexError.label")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidVertexError.label", f)) (
+        let expected = Model.vertexTypeLabel typ
+            actual = Model.vertexLabel el
+        in (Logic.ifElse (Equality.equal (Model.unVertexLabel actual) (Model.unVertexLabel expected)) Nothing (Just (Pg.InvalidVertexErrorLabel (Pg.NoSuchVertexLabelError {
+          Pg.noSuchVertexLabelErrorLabel = actual})))))) Nothing,
+      (Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidVertexError.id")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidVertexError.id", f)) (Optionals.map (\err -> Pg.InvalidVertexErrorId err) (checkValue (Model.vertexTypeId typ) (Model.vertexId el)))) Nothing),
+      (Logic.ifElse (enabledPg p (Core.Name "hydra.error.pg.InvalidVertexError.property")) (Optionals.map (\f -> (Core.Name "hydra.error.pg.InvalidVertexError.property", f)) (Optionals.map (\err -> Pg.InvalidVertexErrorProperty err) (Lists.maybeHead (Validation.validationResultErrors (validateProperties p checkValue (Model.vertexTypeProperties typ) (Model.vertexProperties el)))))) Nothing)]
diff --git a/src/main/haskell/OpenGql/Grammar.hs b/src/main/haskell/OpenGql/Grammar.hs
new file mode 100644
--- /dev/null
+++ b/src/main/haskell/OpenGql/Grammar.hs
@@ -0,0 +1,4482 @@
+-- Note: this is an automatically generated file. Do not edit.
+-- | A GQL model based on the OpenGQL ANTLR grammar, version 15b256b (2024-09-05), available at: https://github.com/opengql/grammar/blob/main/GQL.g4
+
+module OpenGql.Grammar where
+import qualified Hydra.Core as Core
+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
+import qualified Data.Scientific as Sci
+data GqlProgram =
+  GqlProgram {
+    gqlProgramActivity :: (Maybe ProgramActivity),
+    gqlProgramClose :: (Maybe SessionCloseCommand)}
+  deriving (Eq, Ord, Read, Show)
+_GqlProgram = Core.Name "openGql.grammar.GqlProgram"
+_GqlProgram_activity = Core.Name "activity"
+_GqlProgram_close = Core.Name "close"
+data ProgramActivity =
+  ProgramActivitySession SessionActivity |
+  ProgramActivityTransaction TransactionActivity
+  deriving (Eq, Ord, Read, Show)
+_ProgramActivity = Core.Name "openGql.grammar.ProgramActivity"
+_ProgramActivity_session = Core.Name "session"
+_ProgramActivity_transaction = Core.Name "transaction"
+data SessionActivity =
+  SessionActivityReset [SessionResetCommand] |
+  SessionActivitySetAndResetCommands SessionSetAndResetCommands
+  deriving (Eq, Ord, Read, Show)
+_SessionActivity = Core.Name "openGql.grammar.SessionActivity"
+_SessionActivity_reset = Core.Name "reset"
+_SessionActivity_setAndResetCommands = Core.Name "setAndResetCommands"
+data SessionSetAndResetCommands =
+  SessionSetAndResetCommands {
+    sessionSetAndResetCommandsSet :: [SessionSetCommand],
+    sessionSetAndResetCommandsReset :: [SessionResetCommand]}
+  deriving (Eq, Ord, Read, Show)
+_SessionSetAndResetCommands = Core.Name "openGql.grammar.SessionSetAndResetCommands"
+_SessionSetAndResetCommands_set = Core.Name "set"
+_SessionSetAndResetCommands_reset = Core.Name "reset"
+data TransactionActivity =
+  TransactionActivityStart StartAndMaybeProcedureAndMaybeEnd |
+  TransactionActivityProcedure ProcedureAndMaybeEnd |
+  TransactionActivityEnd EndTransactionCommand
+  deriving (Eq, Ord, Read, Show)
+_TransactionActivity = Core.Name "openGql.grammar.TransactionActivity"
+_TransactionActivity_start = Core.Name "start"
+_TransactionActivity_procedure = Core.Name "procedure"
+_TransactionActivity_end = Core.Name "end"
+data StartAndMaybeProcedureAndMaybeEnd =
+  StartAndMaybeProcedureAndMaybeEnd {
+    startAndMaybeProcedureAndMaybeEndStart :: StartTransactionCommand,
+    startAndMaybeProcedureAndMaybeEndProcedureAndEnd :: (Maybe ProcedureAndMaybeEnd)}
+  deriving (Eq, Ord, Read, Show)
+_StartAndMaybeProcedureAndMaybeEnd = Core.Name "openGql.grammar.StartAndMaybeProcedureAndMaybeEnd"
+_StartAndMaybeProcedureAndMaybeEnd_start = Core.Name "start"
+_StartAndMaybeProcedureAndMaybeEnd_procedureAndEnd = Core.Name "procedureAndEnd"
+data ProcedureAndMaybeEnd =
+  ProcedureAndMaybeEnd {
+    procedureAndMaybeEndProcedure :: ProcedureSpecification,
+    procedureAndMaybeEndEnd :: (Maybe EndTransactionCommand)}
+  deriving (Eq, Ord, Read, Show)
+_ProcedureAndMaybeEnd = Core.Name "openGql.grammar.ProcedureAndMaybeEnd"
+_ProcedureAndMaybeEnd_procedure = Core.Name "procedure"
+_ProcedureAndMaybeEnd_end = Core.Name "end"
+data EndTransactionCommand =
+  EndTransactionCommandRollback RollbackCommand |
+  EndTransactionCommandCommit CommitCommand
+  deriving (Eq, Ord, Read, Show)
+_EndTransactionCommand = Core.Name "openGql.grammar.EndTransactionCommand"
+_EndTransactionCommand_rollback = Core.Name "rollback"
+_EndTransactionCommand_commit = Core.Name "commit"
+data SessionSetCommand =
+  SessionSetCommandSchema SessionSetSchemaClause |
+  SessionSetCommandGraph SessionSetGraphClause |
+  SessionSetCommandTimeZone SessionSetTimeZoneClause |
+  SessionSetCommandParameter SessionSetParameterClause
+  deriving (Eq, Ord, Read, Show)
+_SessionSetCommand = Core.Name "openGql.grammar.SessionSetCommand"
+_SessionSetCommand_schema = Core.Name "schema"
+_SessionSetCommand_graph = Core.Name "graph"
+_SessionSetCommand_timeZone = Core.Name "timeZone"
+_SessionSetCommand_parameter = Core.Name "parameter"
+type SessionSetSchemaClause = SchemaReference
+_SessionSetSchemaClause = Core.Name "openGql.grammar.SessionSetSchemaClause"
+type SessionSetGraphClause = GraphExpression
+_SessionSetGraphClause = Core.Name "openGql.grammar.SessionSetGraphClause"
+type SessionSetTimeZoneClause = SetTimeZoneValue
+_SessionSetTimeZoneClause = Core.Name "openGql.grammar.SessionSetTimeZoneClause"
+type SetTimeZoneValue = TimeZoneString
+_SetTimeZoneValue = Core.Name "openGql.grammar.SetTimeZoneValue"
+data SessionSetParameterClause =
+  SessionSetParameterClauseGraph SessionSetGraphParameterClause |
+  SessionSetParameterClauseBindings SessionSetBindingTableParameterClause |
+  SessionSetParameterClauseValue SessionSetValueParameterClause
+  deriving (Eq, Ord, Read, Show)
+_SessionSetParameterClause = Core.Name "openGql.grammar.SessionSetParameterClause"
+_SessionSetParameterClause_graph = Core.Name "graph"
+_SessionSetParameterClause_bindings = Core.Name "bindings"
+_SessionSetParameterClause_value = Core.Name "value"
+data SessionSetGraphParameterClause =
+  SessionSetGraphParameterClause {
+    sessionSetGraphParameterClauseGraph :: SessionSetParameterName,
+    sessionSetGraphParameterClauseInitializer :: OptTypedGraphInitializer}
+  deriving (Eq, Ord, Read, Show)
+_SessionSetGraphParameterClause = Core.Name "openGql.grammar.SessionSetGraphParameterClause"
+_SessionSetGraphParameterClause_graph = Core.Name "graph"
+_SessionSetGraphParameterClause_initializer = Core.Name "initializer"
+data SessionSetBindingTableParameterClause =
+  SessionSetBindingTableParameterClause {
+    sessionSetBindingTableParameterClauseBinding :: Bool,
+    sessionSetBindingTableParameterClauseParam :: SessionSetParameterName,
+    sessionSetBindingTableParameterClauseInit :: OptTypedBindingTableInitializer}
+  deriving (Eq, Ord, Read, Show)
+_SessionSetBindingTableParameterClause = Core.Name "openGql.grammar.SessionSetBindingTableParameterClause"
+_SessionSetBindingTableParameterClause_binding = Core.Name "binding"
+_SessionSetBindingTableParameterClause_param = Core.Name "param"
+_SessionSetBindingTableParameterClause_init = Core.Name "init"
+data SessionSetValueParameterClause =
+  SessionSetValueParameterClause {
+    sessionSetValueParameterClauseValue :: SessionSetParameterName,
+    sessionSetValueParameterClauseInitializer :: OptTypedValueInitializer}
+  deriving (Eq, Ord, Read, Show)
+_SessionSetValueParameterClause = Core.Name "openGql.grammar.SessionSetValueParameterClause"
+_SessionSetValueParameterClause_value = Core.Name "value"
+_SessionSetValueParameterClause_initializer = Core.Name "initializer"
+data SessionSetParameterName =
+  SessionSetParameterName {
+    sessionSetParameterNameIfNotExists :: Bool,
+    sessionSetParameterNameParameter :: SessionParameterSpecification}
+  deriving (Eq, Ord, Read, Show)
+_SessionSetParameterName = Core.Name "openGql.grammar.SessionSetParameterName"
+_SessionSetParameterName_ifNotExists = Core.Name "ifNotExists"
+_SessionSetParameterName_parameter = Core.Name "parameter"
+type SessionResetCommand = (Maybe SessionResetArguments)
+_SessionResetCommand = Core.Name "openGql.grammar.SessionResetCommand"
+data SessionResetArguments =
+  SessionResetArgumentsParametersOrCharacteristics AllParametersOrCharacteristics |
+  SessionResetArgumentsSchema |
+  SessionResetArgumentsGraph |
+  SessionResetArgumentsTimeZone |
+  SessionResetArgumentsParameterSessionSpecification ParameterSessionSpecification
+  deriving (Eq, Ord, Read, Show)
+_SessionResetArguments = Core.Name "openGql.grammar.SessionResetArguments"
+_SessionResetArguments_parametersOrCharacteristics = Core.Name "parametersOrCharacteristics"
+_SessionResetArguments_schema = Core.Name "schema"
+_SessionResetArguments_graph = Core.Name "graph"
+_SessionResetArguments_timeZone = Core.Name "timeZone"
+_SessionResetArguments_parameterSessionSpecification = Core.Name "parameterSessionSpecification"
+data AllParametersOrCharacteristics =
+  AllParametersOrCharacteristics {
+    allParametersOrCharacteristicsAll :: Bool,
+    allParametersOrCharacteristicsType :: ParametersOrCharacteristics}
+  deriving (Eq, Ord, Read, Show)
+_AllParametersOrCharacteristics = Core.Name "openGql.grammar.AllParametersOrCharacteristics"
+_AllParametersOrCharacteristics_all = Core.Name "all"
+_AllParametersOrCharacteristics_type = Core.Name "type"
+data ParametersOrCharacteristics =
+  ParametersOrCharacteristicsParameters |
+  ParametersOrCharacteristicsCharacteristics
+  deriving (Eq, Ord, Read, Show)
+_ParametersOrCharacteristics = Core.Name "openGql.grammar.ParametersOrCharacteristics"
+_ParametersOrCharacteristics_parameters = Core.Name "parameters"
+_ParametersOrCharacteristics_characteristics = Core.Name "characteristics"
+data ParameterSessionSpecification =
+  ParameterSessionSpecification {
+    parameterSessionSpecificationParameter :: Bool,
+    parameterSessionSpecificationSessionParameterSpecification :: SessionParameterSpecification}
+  deriving (Eq, Ord, Read, Show)
+_ParameterSessionSpecification = Core.Name "openGql.grammar.ParameterSessionSpecification"
+_ParameterSessionSpecification_parameter = Core.Name "parameter"
+_ParameterSessionSpecification_sessionParameterSpecification = Core.Name "sessionParameterSpecification"
+type SessionCloseCommand = ()
+_SessionCloseCommand = Core.Name "openGql.grammar.SessionCloseCommand"
+type SessionParameterSpecification = ParameterName
+_SessionParameterSpecification = Core.Name "openGql.grammar.SessionParameterSpecification"
+type StartTransactionCommand = (Maybe TransactionCharacteristics)
+_StartTransactionCommand = Core.Name "openGql.grammar.StartTransactionCommand"
+type TransactionCharacteristics = [TransactionMode]
+_TransactionCharacteristics = Core.Name "openGql.grammar.TransactionCharacteristics"
+type TransactionMode = TransactionAccessMode
+_TransactionMode = Core.Name "openGql.grammar.TransactionMode"
+data TransactionAccessMode =
+  TransactionAccessModeReadOnly |
+  TransactionAccessModeReadWrite
+  deriving (Eq, Ord, Read, Show)
+_TransactionAccessMode = Core.Name "openGql.grammar.TransactionAccessMode"
+_TransactionAccessMode_readOnly = Core.Name "readOnly"
+_TransactionAccessMode_readWrite = Core.Name "readWrite"
+type RollbackCommand = ()
+_RollbackCommand = Core.Name "openGql.grammar.RollbackCommand"
+type CommitCommand = ()
+_CommitCommand = Core.Name "openGql.grammar.CommitCommand"
+type NestedProcedureSpecification = ProcedureSpecification
+_NestedProcedureSpecification = Core.Name "openGql.grammar.NestedProcedureSpecification"
+type ProcedureSpecification = ProcedureBody
+_ProcedureSpecification = Core.Name "openGql.grammar.ProcedureSpecification"
+type NestedDataModifyingProcedureSpecification = ProcedureBody
+_NestedDataModifyingProcedureSpecification = Core.Name "openGql.grammar.NestedDataModifyingProcedureSpecification"
+type NestedQuerySpecification = ProcedureBody
+_NestedQuerySpecification = Core.Name "openGql.grammar.NestedQuerySpecification"
+data ProcedureBody =
+  ProcedureBody {
+    procedureBodyAtSchema :: (Maybe AtSchemaClause),
+    procedureBodyBindings :: (Maybe BindingVariableDefinitionBlock),
+    procedureBodyStatements :: StatementBlock}
+  deriving (Eq, Ord, Read, Show)
+_ProcedureBody = Core.Name "openGql.grammar.ProcedureBody"
+_ProcedureBody_atSchema = Core.Name "atSchema"
+_ProcedureBody_bindings = Core.Name "bindings"
+_ProcedureBody_statements = Core.Name "statements"
+type BindingVariableDefinitionBlock = [BindingVariableDefinition]
+_BindingVariableDefinitionBlock = Core.Name "openGql.grammar.BindingVariableDefinitionBlock"
+data BindingVariableDefinition =
+  BindingVariableDefinitionGraph GraphVariableDefinition |
+  BindingVariableDefinitionTable BindingTableVariableDefinition |
+  BindingVariableDefinitionValue ValueVariableDefinition
+  deriving (Eq, Ord, Read, Show)
+_BindingVariableDefinition = Core.Name "openGql.grammar.BindingVariableDefinition"
+_BindingVariableDefinition_graph = Core.Name "graph"
+_BindingVariableDefinition_table = Core.Name "table"
+_BindingVariableDefinition_value = Core.Name "value"
+data StatementBlock =
+  StatementBlock {
+    statementBlockStatement :: Statement,
+    statementBlockNextStatements :: [NextStatement]}
+  deriving (Eq, Ord, Read, Show)
+_StatementBlock = Core.Name "openGql.grammar.StatementBlock"
+_StatementBlock_statement = Core.Name "statement"
+_StatementBlock_nextStatements = Core.Name "nextStatements"
+data Statement =
+  StatementLinearCatalogModifying LinearCatalogModifyingStatement |
+  StatementLinearDataModifying LinearDataModifyingStatement |
+  StatementCompositeQuery CompositeQueryStatement
+  deriving (Eq, Ord, Read, Show)
+_Statement = Core.Name "openGql.grammar.Statement"
+_Statement_linearCatalogModifying = Core.Name "linearCatalogModifying"
+_Statement_linearDataModifying = Core.Name "linearDataModifying"
+_Statement_compositeQuery = Core.Name "compositeQuery"
+data NextStatement =
+  NextStatement {
+    nextStatementYieldClause :: (Maybe YieldClause),
+    nextStatementStatement :: Statement}
+  deriving (Eq, Ord, Read, Show)
+_NextStatement = Core.Name "openGql.grammar.NextStatement"
+_NextStatement_yieldClause = Core.Name "yieldClause"
+_NextStatement_statement = Core.Name "statement"
+data GraphVariableDefinition =
+  GraphVariableDefinition {
+    graphVariableDefinitionVariable :: BindingVariable,
+    graphVariableDefinitionInitializer :: OptTypedGraphInitializer}
+  deriving (Eq, Ord, Read, Show)
+_GraphVariableDefinition = Core.Name "openGql.grammar.GraphVariableDefinition"
+_GraphVariableDefinition_variable = Core.Name "variable"
+_GraphVariableDefinition_initializer = Core.Name "initializer"
+data OptTypedGraphInitializer =
+  OptTypedGraphInitializer {
+    optTypedGraphInitializerType :: (Maybe TypedGraphReferenceValueType),
+    optTypedGraphInitializerInitializer :: GraphInitializer}
+  deriving (Eq, Ord, Read, Show)
+_OptTypedGraphInitializer = Core.Name "openGql.grammar.OptTypedGraphInitializer"
+_OptTypedGraphInitializer_type = Core.Name "type"
+_OptTypedGraphInitializer_initializer = Core.Name "initializer"
+data TypedGraphReferenceValueType =
+  TypedGraphReferenceValueType {
+    typedGraphReferenceValueTypeTyped :: (Maybe Typed),
+    typedGraphReferenceValueTypeValueType :: GraphReferenceValueType}
+  deriving (Eq, Ord, Read, Show)
+_TypedGraphReferenceValueType = Core.Name "openGql.grammar.TypedGraphReferenceValueType"
+_TypedGraphReferenceValueType_typed = Core.Name "typed"
+_TypedGraphReferenceValueType_valueType = Core.Name "valueType"
+type GraphInitializer = ()
+_GraphInitializer = Core.Name "openGql.grammar.GraphInitializer"
+data BindingTableVariableDefinition =
+  BindingTableVariableDefinition {
+    bindingTableVariableDefinitionBinding :: Bool,
+    bindingTableVariableDefinitionVariable :: BindingVariable,
+    bindingTableVariableDefinitionInitializer :: OptTypedBindingTableInitializer}
+  deriving (Eq, Ord, Read, Show)
+_BindingTableVariableDefinition = Core.Name "openGql.grammar.BindingTableVariableDefinition"
+_BindingTableVariableDefinition_binding = Core.Name "binding"
+_BindingTableVariableDefinition_variable = Core.Name "variable"
+_BindingTableVariableDefinition_initializer = Core.Name "initializer"
+data OptTypedBindingTableInitializer =
+  OptTypedBindingTableInitializer {
+    optTypedBindingTableInitializerType :: (Maybe TypedBindingTableReferenceValueType),
+    optTypedBindingTableInitializerInitializer :: BindingTableInitializer}
+  deriving (Eq, Ord, Read, Show)
+_OptTypedBindingTableInitializer = Core.Name "openGql.grammar.OptTypedBindingTableInitializer"
+_OptTypedBindingTableInitializer_type = Core.Name "type"
+_OptTypedBindingTableInitializer_initializer = Core.Name "initializer"
+data TypedBindingTableReferenceValueType =
+  TypedBindingTableReferenceValueType {
+    typedBindingTableReferenceValueTypeTyped :: (Maybe Typed),
+    typedBindingTableReferenceValueTypeValueType :: BindingTableReferenceValueType}
+  deriving (Eq, Ord, Read, Show)
+_TypedBindingTableReferenceValueType = Core.Name "openGql.grammar.TypedBindingTableReferenceValueType"
+_TypedBindingTableReferenceValueType_typed = Core.Name "typed"
+_TypedBindingTableReferenceValueType_valueType = Core.Name "valueType"
+type BindingTableInitializer = ()
+_BindingTableInitializer = Core.Name "openGql.grammar.BindingTableInitializer"
+data ValueVariableDefinition =
+  ValueVariableDefinition {
+    valueVariableDefinitionVariable :: BindingVariable,
+    valueVariableDefinitionInitializer :: OptTypedValueInitializer}
+  deriving (Eq, Ord, Read, Show)
+_ValueVariableDefinition = Core.Name "openGql.grammar.ValueVariableDefinition"
+_ValueVariableDefinition_variable = Core.Name "variable"
+_ValueVariableDefinition_initializer = Core.Name "initializer"
+data OptTypedValueInitializer =
+  OptTypedValueInitializer {
+    optTypedValueInitializerType :: (Maybe TypedValueType),
+    optTypedValueInitializerInitializer :: ValueInitializer}
+  deriving (Eq, Ord, Read, Show)
+_OptTypedValueInitializer = Core.Name "openGql.grammar.OptTypedValueInitializer"
+_OptTypedValueInitializer_type = Core.Name "type"
+_OptTypedValueInitializer_initializer = Core.Name "initializer"
+data TypedValueType =
+  TypedValueType {
+    typedValueTypeTyped :: (Maybe Typed),
+    typedValueTypeValueType :: ValueType}
+  deriving (Eq, Ord, Read, Show)
+_TypedValueType = Core.Name "openGql.grammar.TypedValueType"
+_TypedValueType_typed = Core.Name "typed"
+_TypedValueType_valueType = Core.Name "valueType"
+type ValueInitializer = ()
+_ValueInitializer = Core.Name "openGql.grammar.ValueInitializer"
+data GraphExpression =
+  GraphExpressionObject ObjectExpressionPrimary |
+  GraphExpressionReference GraphReference |
+  GraphExpressionName ObjectNameOrBindingVariable |
+  GraphExpressionCurrent CurrentGraph
+  deriving (Eq, Ord, Read, Show)
+_GraphExpression = Core.Name "openGql.grammar.GraphExpression"
+_GraphExpression_object = Core.Name "object"
+_GraphExpression_reference = Core.Name "reference"
+_GraphExpression_name = Core.Name "name"
+_GraphExpression_current = Core.Name "current"
+data CurrentGraph =
+  CurrentGraphGraph |
+  CurrentGraphPropertyGraph
+  deriving (Eq, Ord, Read, Show)
+_CurrentGraph = Core.Name "openGql.grammar.CurrentGraph"
+_CurrentGraph_graph = Core.Name "graph"
+_CurrentGraph_propertyGraph = Core.Name "propertyGraph"
+data BindingTableExpression =
+  BindingTableExpressionNested NestedBindingTableQuerySpecification |
+  BindingTableExpressionObject ObjectExpressionPrimary |
+  BindingTableExpressionTable BindingTableReference |
+  BindingTableExpressionName ObjectNameOrBindingVariable
+  deriving (Eq, Ord, Read, Show)
+_BindingTableExpression = Core.Name "openGql.grammar.BindingTableExpression"
+_BindingTableExpression_nested = Core.Name "nested"
+_BindingTableExpression_object = Core.Name "object"
+_BindingTableExpression_table = Core.Name "table"
+_BindingTableExpression_name = Core.Name "name"
+type NestedBindingTableQuerySpecification = ()
+_NestedBindingTableQuerySpecification = Core.Name "openGql.grammar.NestedBindingTableQuerySpecification"
+data ObjectExpressionPrimary =
+  ObjectExpressionPrimaryVariable PrimaryValueExpression |
+  ObjectExpressionPrimaryParenthesized ParenthesizedValueExpression |
+  ObjectExpressionPrimaryNonParenthesized NonParenthesizedPrimaryValueExpressionSpecialCase
+  deriving (Eq, Ord, Read, Show)
+_ObjectExpressionPrimary = Core.Name "openGql.grammar.ObjectExpressionPrimary"
+_ObjectExpressionPrimary_variable = Core.Name "variable"
+_ObjectExpressionPrimary_parenthesized = Core.Name "parenthesized"
+_ObjectExpressionPrimary_nonParenthesized = Core.Name "nonParenthesized"
+type LinearCatalogModifyingStatement = [SimpleCatalogModifyingStatement]
+_LinearCatalogModifyingStatement = Core.Name "openGql.grammar.LinearCatalogModifyingStatement"
+data SimpleCatalogModifyingStatement =
+  SimpleCatalogModifyingStatementPrimitive PrimitiveCatalogModifyingStatement |
+  SimpleCatalogModifyingStatementCallProcedure CallCatalogModifyingProcedureStatement
+  deriving (Eq, Ord, Read, Show)
+_SimpleCatalogModifyingStatement = Core.Name "openGql.grammar.SimpleCatalogModifyingStatement"
+_SimpleCatalogModifyingStatement_primitive = Core.Name "primitive"
+_SimpleCatalogModifyingStatement_callProcedure = Core.Name "callProcedure"
+data PrimitiveCatalogModifyingStatement =
+  PrimitiveCatalogModifyingStatementCreateSchema CreateSchemaStatement |
+  PrimitiveCatalogModifyingStatementDropSchema DropSchemaStatement |
+  PrimitiveCatalogModifyingStatementCreateGraph CreateGraphStatement |
+  PrimitiveCatalogModifyingStatementDropGraph DropGraphStatement |
+  PrimitiveCatalogModifyingStatementCreateGraphType CreateGraphTypeStatement |
+  PrimitiveCatalogModifyingStatementDropGraphType DropGraphTypeStatement
+  deriving (Eq, Ord, Read, Show)
+_PrimitiveCatalogModifyingStatement = Core.Name "openGql.grammar.PrimitiveCatalogModifyingStatement"
+_PrimitiveCatalogModifyingStatement_createSchema = Core.Name "createSchema"
+_PrimitiveCatalogModifyingStatement_dropSchema = Core.Name "dropSchema"
+_PrimitiveCatalogModifyingStatement_createGraph = Core.Name "createGraph"
+_PrimitiveCatalogModifyingStatement_dropGraph = Core.Name "dropGraph"
+_PrimitiveCatalogModifyingStatement_createGraphType = Core.Name "createGraphType"
+_PrimitiveCatalogModifyingStatement_dropGraphType = Core.Name "dropGraphType"
+data CreateSchemaStatement =
+  CreateSchemaStatement {
+    createSchemaStatementIfNotExists :: Bool,
+    createSchemaStatementParentAndName :: CatalogSchemaParentAndName}
+  deriving (Eq, Ord, Read, Show)
+_CreateSchemaStatement = Core.Name "openGql.grammar.CreateSchemaStatement"
+_CreateSchemaStatement_ifNotExists = Core.Name "ifNotExists"
+_CreateSchemaStatement_parentAndName = Core.Name "parentAndName"
+data DropSchemaStatement =
+  DropSchemaStatement {
+    dropSchemaStatementIfExists :: Bool,
+    dropSchemaStatementParentAndName :: CatalogSchemaParentAndName}
+  deriving (Eq, Ord, Read, Show)
+_DropSchemaStatement = Core.Name "openGql.grammar.DropSchemaStatement"
+_DropSchemaStatement_ifExists = Core.Name "ifExists"
+_DropSchemaStatement_parentAndName = Core.Name "parentAndName"
+data CreateGraphStatement =
+  CreateGraphStatement {
+    createGraphStatementCreateOption :: CreateGraphOption,
+    createGraphStatementParentAndName :: CatalogGraphParentAndName,
+    createGraphStatementType :: GraphTypeOption,
+    createGraphStatementSource :: (Maybe GraphSource)}
+  deriving (Eq, Ord, Read, Show)
+_CreateGraphStatement = Core.Name "openGql.grammar.CreateGraphStatement"
+_CreateGraphStatement_createOption = Core.Name "createOption"
+_CreateGraphStatement_parentAndName = Core.Name "parentAndName"
+_CreateGraphStatement_type = Core.Name "type"
+_CreateGraphStatement_source = Core.Name "source"
+data CreateGraphOption =
+  CreateGraphOptionGraphIfNotExists Bool |
+  CreateGraphOptionOrReplace
+  deriving (Eq, Ord, Read, Show)
+_CreateGraphOption = Core.Name "openGql.grammar.CreateGraphOption"
+_CreateGraphOption_graphIfNotExists = Core.Name "graphIfNotExists"
+_CreateGraphOption_orReplace = Core.Name "orReplace"
+data GraphTypeOption =
+  GraphTypeOptionOpenGraphType OpenGraphType |
+  GraphTypeOptionOfGraphType OfGraphType
+  deriving (Eq, Ord, Read, Show)
+_GraphTypeOption = Core.Name "openGql.grammar.GraphTypeOption"
+_GraphTypeOption_openGraphType = Core.Name "openGraphType"
+_GraphTypeOption_ofGraphType = Core.Name "ofGraphType"
+data OpenGraphType =
+  OpenGraphType {
+    openGraphTypeTyped :: (Maybe Typed),
+    openGraphTypeGraph :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_OpenGraphType = Core.Name "openGql.grammar.OpenGraphType"
+_OpenGraphType_typed = Core.Name "typed"
+_OpenGraphType_graph = Core.Name "graph"
+data OfGraphType =
+  OfGraphTypeLikeGraph GraphTypeLikeGraph |
+  OfGraphTypeReference TypedGraphTypeReference |
+  OfGraphTypeNested TypedNestedGraphTypeSpecification
+  deriving (Eq, Ord, Read, Show)
+_OfGraphType = Core.Name "openGql.grammar.OfGraphType"
+_OfGraphType_likeGraph = Core.Name "likeGraph"
+_OfGraphType_reference = Core.Name "reference"
+_OfGraphType_nested = Core.Name "nested"
+type GraphTypeLikeGraph = GraphExpression
+_GraphTypeLikeGraph = Core.Name "openGql.grammar.GraphTypeLikeGraph"
+type GraphSource = GraphExpression
+_GraphSource = Core.Name "openGql.grammar.GraphSource"
+data TypedGraphTypeReference =
+  TypedGraphTypeReference {
+    typedGraphTypeReferenceTyped :: (Maybe Typed),
+    typedGraphTypeReferenceReference :: GraphTypeReference}
+  deriving (Eq, Ord, Read, Show)
+_TypedGraphTypeReference = Core.Name "openGql.grammar.TypedGraphTypeReference"
+_TypedGraphTypeReference_typed = Core.Name "typed"
+_TypedGraphTypeReference_reference = Core.Name "reference"
+data TypedNestedGraphTypeSpecification =
+  TypedNestedGraphTypeSpecification {
+    typedNestedGraphTypeSpecificationTyped :: (Maybe Typed),
+    typedNestedGraphTypeSpecificationGraph :: Bool,
+    typedNestedGraphTypeSpecificationSpecification :: NestedGraphTypeSpecification}
+  deriving (Eq, Ord, Read, Show)
+_TypedNestedGraphTypeSpecification = Core.Name "openGql.grammar.TypedNestedGraphTypeSpecification"
+_TypedNestedGraphTypeSpecification_typed = Core.Name "typed"
+_TypedNestedGraphTypeSpecification_graph = Core.Name "graph"
+_TypedNestedGraphTypeSpecification_specification = Core.Name "specification"
+data DropGraphStatement =
+  DropGraphStatement {
+    dropGraphStatementIfExists :: Bool,
+    dropGraphStatementParentAndName :: CatalogGraphParentAndName}
+  deriving (Eq, Ord, Read, Show)
+_DropGraphStatement = Core.Name "openGql.grammar.DropGraphStatement"
+_DropGraphStatement_ifExists = Core.Name "ifExists"
+_DropGraphStatement_parentAndName = Core.Name "parentAndName"
+data CreateGraphTypeStatement =
+  CreateGraphTypeStatement {
+    createGraphTypeStatementCreateOption :: CreateGraphTypeOption,
+    createGraphTypeStatementParentAndName :: CatalogGraphTypeParentAndName,
+    createGraphTypeStatementSource :: GraphTypeSource}
+  deriving (Eq, Ord, Read, Show)
+_CreateGraphTypeStatement = Core.Name "openGql.grammar.CreateGraphTypeStatement"
+_CreateGraphTypeStatement_createOption = Core.Name "createOption"
+_CreateGraphTypeStatement_parentAndName = Core.Name "parentAndName"
+_CreateGraphTypeStatement_source = Core.Name "source"
+data CreateGraphTypeOption =
+  CreateGraphTypeOptionTypeIfNotExists Bool |
+  CreateGraphTypeOptionOrReplace
+  deriving (Eq, Ord, Read, Show)
+_CreateGraphTypeOption = Core.Name "openGql.grammar.CreateGraphTypeOption"
+_CreateGraphTypeOption_typeIfNotExists = Core.Name "typeIfNotExists"
+_CreateGraphTypeOption_orReplace = Core.Name "orReplace"
+data GraphTypeSource =
+  GraphTypeSourceCopyOf CopyOfGraphType |
+  GraphTypeSourceLikeGraph GraphTypeLikeGraph |
+  GraphTypeSourceNestedSpecification NestedGraphTypeSpecification
+  deriving (Eq, Ord, Read, Show)
+_GraphTypeSource = Core.Name "openGql.grammar.GraphTypeSource"
+_GraphTypeSource_copyOf = Core.Name "copyOf"
+_GraphTypeSource_likeGraph = Core.Name "likeGraph"
+_GraphTypeSource_nestedSpecification = Core.Name "nestedSpecification"
+type CopyOfGraphType = GraphTypeReference
+_CopyOfGraphType = Core.Name "openGql.grammar.CopyOfGraphType"
+data DropGraphTypeStatement =
+  DropGraphTypeStatement {
+    dropGraphTypeStatementIfExists :: Bool,
+    dropGraphTypeStatementParentAndName :: CatalogGraphTypeParentAndName}
+  deriving (Eq, Ord, Read, Show)
+_DropGraphTypeStatement = Core.Name "openGql.grammar.DropGraphTypeStatement"
+_DropGraphTypeStatement_ifExists = Core.Name "ifExists"
+_DropGraphTypeStatement_parentAndName = Core.Name "parentAndName"
+type CallCatalogModifyingProcedureStatement = CallProcedureStatement
+_CallCatalogModifyingProcedureStatement = Core.Name "openGql.grammar.CallCatalogModifyingProcedureStatement"
+data LinearDataModifyingStatement =
+  LinearDataModifyingStatementFocused FocusedLinearDataModifyingStatement |
+  LinearDataModifyingStatementAmbient AmbientLinearDataModifyingStatement
+  deriving (Eq, Ord, Read, Show)
+_LinearDataModifyingStatement = Core.Name "openGql.grammar.LinearDataModifyingStatement"
+_LinearDataModifyingStatement_focused = Core.Name "focused"
+_LinearDataModifyingStatement_ambient = Core.Name "ambient"
+data FocusedLinearDataModifyingStatement =
+  FocusedLinearDataModifyingStatementSimple FocusedLinearDataModifyingStatementBody |
+  FocusedLinearDataModifyingStatementNested FocusedNestedDataModifyingProcedureSpecification
+  deriving (Eq, Ord, Read, Show)
+_FocusedLinearDataModifyingStatement = Core.Name "openGql.grammar.FocusedLinearDataModifyingStatement"
+_FocusedLinearDataModifyingStatement_simple = Core.Name "simple"
+_FocusedLinearDataModifyingStatement_nested = Core.Name "nested"
+data FocusedLinearDataModifyingStatementBody =
+  FocusedLinearDataModifyingStatementBody {
+    focusedLinearDataModifyingStatementBodyUseGraph :: UseGraphClause,
+    focusedLinearDataModifyingStatementBodySimpleAccess :: SimpleLinearDataAccessingStatement,
+    focusedLinearDataModifyingStatementBodyPrimitiveResult :: (Maybe PrimitiveResultStatement)}
+  deriving (Eq, Ord, Read, Show)
+_FocusedLinearDataModifyingStatementBody = Core.Name "openGql.grammar.FocusedLinearDataModifyingStatementBody"
+_FocusedLinearDataModifyingStatementBody_useGraph = Core.Name "useGraph"
+_FocusedLinearDataModifyingStatementBody_simpleAccess = Core.Name "simpleAccess"
+_FocusedLinearDataModifyingStatementBody_primitiveResult = Core.Name "primitiveResult"
+data FocusedNestedDataModifyingProcedureSpecification =
+  FocusedNestedDataModifyingProcedureSpecification {
+    focusedNestedDataModifyingProcedureSpecificationUseGraph :: UseGraphClause,
+    focusedNestedDataModifyingProcedureSpecificationNestedSpec :: NestedDataModifyingProcedureSpecification}
+  deriving (Eq, Ord, Read, Show)
+_FocusedNestedDataModifyingProcedureSpecification =
+    Core.Name "openGql.grammar.FocusedNestedDataModifyingProcedureSpecification"
+_FocusedNestedDataModifyingProcedureSpecification_useGraph = Core.Name "useGraph"
+_FocusedNestedDataModifyingProcedureSpecification_nestedSpec = Core.Name "nestedSpec"
+data AmbientLinearDataModifyingStatement =
+  AmbientLinearDataModifyingStatementSimple AmbientLinearDataModifyingStatementBody |
+  AmbientLinearDataModifyingStatementNested NestedDataModifyingProcedureSpecification
+  deriving (Eq, Ord, Read, Show)
+_AmbientLinearDataModifyingStatement = Core.Name "openGql.grammar.AmbientLinearDataModifyingStatement"
+_AmbientLinearDataModifyingStatement_simple = Core.Name "simple"
+_AmbientLinearDataModifyingStatement_nested = Core.Name "nested"
+data AmbientLinearDataModifyingStatementBody =
+  AmbientLinearDataModifyingStatementBody {
+    ambientLinearDataModifyingStatementBodySimpleAccess :: SimpleLinearDataAccessingStatement,
+    ambientLinearDataModifyingStatementBodyPrimitiveResult :: (Maybe PrimitiveResultStatement)}
+  deriving (Eq, Ord, Read, Show)
+_AmbientLinearDataModifyingStatementBody = Core.Name "openGql.grammar.AmbientLinearDataModifyingStatementBody"
+_AmbientLinearDataModifyingStatementBody_simpleAccess = Core.Name "simpleAccess"
+_AmbientLinearDataModifyingStatementBody_primitiveResult = Core.Name "primitiveResult"
+type SimpleLinearDataAccessingStatement = [SimpleDataAccessingStatement]
+_SimpleLinearDataAccessingStatement = Core.Name "openGql.grammar.SimpleLinearDataAccessingStatement"
+data SimpleDataAccessingStatement =
+  SimpleDataAccessingStatementQuery SimpleQueryStatement |
+  SimpleDataAccessingStatementModifying SimpleDataModifyingStatement
+  deriving (Eq, Ord, Read, Show)
+_SimpleDataAccessingStatement = Core.Name "openGql.grammar.SimpleDataAccessingStatement"
+_SimpleDataAccessingStatement_query = Core.Name "query"
+_SimpleDataAccessingStatement_modifying = Core.Name "modifying"
+data SimpleDataModifyingStatement =
+  SimpleDataModifyingStatementPrimitive PrimitiveDataModifyingStatement |
+  SimpleDataModifyingStatementCallProcedure CallDataModifyingProcedureStatement
+  deriving (Eq, Ord, Read, Show)
+_SimpleDataModifyingStatement = Core.Name "openGql.grammar.SimpleDataModifyingStatement"
+_SimpleDataModifyingStatement_primitive = Core.Name "primitive"
+_SimpleDataModifyingStatement_callProcedure = Core.Name "callProcedure"
+data PrimitiveDataModifyingStatement =
+  PrimitiveDataModifyingStatementInsert InsertStatement |
+  PrimitiveDataModifyingStatementSet SetStatement |
+  PrimitiveDataModifyingStatementRemove RemoveStatement |
+  PrimitiveDataModifyingStatementDelete DeleteStatement
+  deriving (Eq, Ord, Read, Show)
+_PrimitiveDataModifyingStatement = Core.Name "openGql.grammar.PrimitiveDataModifyingStatement"
+_PrimitiveDataModifyingStatement_insert = Core.Name "insert"
+_PrimitiveDataModifyingStatement_set = Core.Name "set"
+_PrimitiveDataModifyingStatement_remove = Core.Name "remove"
+_PrimitiveDataModifyingStatement_delete = Core.Name "delete"
+type InsertStatement = InsertGraphPattern
+_InsertStatement = Core.Name "openGql.grammar.InsertStatement"
+type SetStatement = SetItemList
+_SetStatement = Core.Name "openGql.grammar.SetStatement"
+type SetItemList = [SetItem]
+_SetItemList = Core.Name "openGql.grammar.SetItemList"
+data SetItem =
+  SetItemProperty SetPropertyItem |
+  SetItemAllProperties SetAllPropertiesItem |
+  SetItemLabel SetLabelItem
+  deriving (Eq, Ord, Read, Show)
+_SetItem = Core.Name "openGql.grammar.SetItem"
+_SetItem_property = Core.Name "property"
+_SetItem_allProperties = Core.Name "allProperties"
+_SetItem_label = Core.Name "label"
+data SetPropertyItem =
+  SetPropertyItem {
+    setPropertyItemVariable :: BindingVariableReference,
+    setPropertyItemPropertyName :: PropertyName,
+    setPropertyItemValue :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_SetPropertyItem = Core.Name "openGql.grammar.SetPropertyItem"
+_SetPropertyItem_variable = Core.Name "variable"
+_SetPropertyItem_propertyName = Core.Name "propertyName"
+_SetPropertyItem_value = Core.Name "value"
+data SetAllPropertiesItem =
+  SetAllPropertiesItem {
+    setAllPropertiesItemVariable :: BindingVariableReference,
+    setAllPropertiesItemProperties :: (Maybe PropertyKeyValuePairList)}
+  deriving (Eq, Ord, Read, Show)
+_SetAllPropertiesItem = Core.Name "openGql.grammar.SetAllPropertiesItem"
+_SetAllPropertiesItem_variable = Core.Name "variable"
+_SetAllPropertiesItem_properties = Core.Name "properties"
+data SetLabelItem =
+  SetLabelItem {
+    setLabelItemVariable :: BindingVariableReference,
+    setLabelItemIsOrColon :: IsOrColon,
+    setLabelItemLabel :: LabelName}
+  deriving (Eq, Ord, Read, Show)
+_SetLabelItem = Core.Name "openGql.grammar.SetLabelItem"
+_SetLabelItem_variable = Core.Name "variable"
+_SetLabelItem_isOrColon = Core.Name "isOrColon"
+_SetLabelItem_label = Core.Name "label"
+type RemoveStatement = RemoveItemList
+_RemoveStatement = Core.Name "openGql.grammar.RemoveStatement"
+type RemoveItemList = [RemoveItem]
+_RemoveItemList = Core.Name "openGql.grammar.RemoveItemList"
+data RemoveItem =
+  RemoveItemProperty RemovePropertyItem |
+  RemoveItemLabel RemoveLabelItem
+  deriving (Eq, Ord, Read, Show)
+_RemoveItem = Core.Name "openGql.grammar.RemoveItem"
+_RemoveItem_property = Core.Name "property"
+_RemoveItem_label = Core.Name "label"
+data RemovePropertyItem =
+  RemovePropertyItem {
+    removePropertyItemVariable :: BindingVariableReference,
+    removePropertyItemPropertyName :: PropertyName}
+  deriving (Eq, Ord, Read, Show)
+_RemovePropertyItem = Core.Name "openGql.grammar.RemovePropertyItem"
+_RemovePropertyItem_variable = Core.Name "variable"
+_RemovePropertyItem_propertyName = Core.Name "propertyName"
+data RemoveLabelItem =
+  RemoveLabelItem {
+    removeLabelItemVariable :: BindingVariableReference,
+    removeLabelItemIsOrColon :: IsOrColon,
+    removeLabelItemLabel :: LabelName}
+  deriving (Eq, Ord, Read, Show)
+_RemoveLabelItem = Core.Name "openGql.grammar.RemoveLabelItem"
+_RemoveLabelItem_variable = Core.Name "variable"
+_RemoveLabelItem_isOrColon = Core.Name "isOrColon"
+_RemoveLabelItem_label = Core.Name "label"
+data DeleteStatement =
+  DeleteStatement {
+    deleteStatementDetach :: (Maybe DetachOption),
+    deleteStatementItems :: DeleteItemList}
+  deriving (Eq, Ord, Read, Show)
+_DeleteStatement = Core.Name "openGql.grammar.DeleteStatement"
+_DeleteStatement_detach = Core.Name "detach"
+_DeleteStatement_items = Core.Name "items"
+data DetachOption =
+  DetachOptionDetach |
+  DetachOptionNoDetach
+  deriving (Eq, Ord, Read, Show)
+_DetachOption = Core.Name "openGql.grammar.DetachOption"
+_DetachOption_detach = Core.Name "detach"
+_DetachOption_noDetach = Core.Name "noDetach"
+type DeleteItemList = [DeleteItem]
+_DeleteItemList = Core.Name "openGql.grammar.DeleteItemList"
+type DeleteItem = ValueExpression
+_DeleteItem = Core.Name "openGql.grammar.DeleteItem"
+type CallDataModifyingProcedureStatement = CallProcedureStatement
+_CallDataModifyingProcedureStatement = Core.Name "openGql.grammar.CallDataModifyingProcedureStatement"
+type CompositeQueryStatement = CompositeQueryExpression
+_CompositeQueryStatement = Core.Name "openGql.grammar.CompositeQueryStatement"
+data CompositeQueryExpression =
+  CompositeQueryExpressionSimple CompositeQueryExpressionConjunction |
+  CompositeQueryExpressionPrimary CompositeQueryPrimary
+  deriving (Eq, Ord, Read, Show)
+_CompositeQueryExpression = Core.Name "openGql.grammar.CompositeQueryExpression"
+_CompositeQueryExpression_simple = Core.Name "simple"
+_CompositeQueryExpression_primary = Core.Name "primary"
+data CompositeQueryExpressionConjunction =
+  CompositeQueryExpressionConjunction {
+    compositeQueryExpressionConjunctionLeft :: CompositeQueryExpression,
+    compositeQueryExpressionConjunctionConjunction :: QueryConjunction,
+    compositeQueryExpressionConjunctionRight :: CompositeQueryPrimary}
+  deriving (Eq, Ord, Read, Show)
+_CompositeQueryExpressionConjunction = Core.Name "openGql.grammar.CompositeQueryExpressionConjunction"
+_CompositeQueryExpressionConjunction_left = Core.Name "left"
+_CompositeQueryExpressionConjunction_conjunction = Core.Name "conjunction"
+_CompositeQueryExpressionConjunction_right = Core.Name "right"
+data QueryConjunction =
+  QueryConjunctionSetOperator SetOperator |
+  QueryConjunctionOtherwise
+  deriving (Eq, Ord, Read, Show)
+_QueryConjunction = Core.Name "openGql.grammar.QueryConjunction"
+_QueryConjunction_setOperator = Core.Name "setOperator"
+_QueryConjunction_otherwise = Core.Name "otherwise"
+data SetOperator =
+  SetOperator {
+    setOperatorOperatorType :: SetOperatorType,
+    setOperatorQuantifier :: (Maybe SetQuantifier)}
+  deriving (Eq, Ord, Read, Show)
+_SetOperator = Core.Name "openGql.grammar.SetOperator"
+_SetOperator_operatorType = Core.Name "operatorType"
+_SetOperator_quantifier = Core.Name "quantifier"
+data SetOperatorType =
+  SetOperatorTypeUnion |
+  SetOperatorTypeExcept |
+  SetOperatorTypeIntersect
+  deriving (Eq, Ord, Read, Show)
+_SetOperatorType = Core.Name "openGql.grammar.SetOperatorType"
+_SetOperatorType_union = Core.Name "union"
+_SetOperatorType_except = Core.Name "except"
+_SetOperatorType_intersect = Core.Name "intersect"
+type CompositeQueryPrimary = LinearQueryStatement
+_CompositeQueryPrimary = Core.Name "openGql.grammar.CompositeQueryPrimary"
+data LinearQueryStatement =
+  LinearQueryStatementFocused FocusedLinearQueryStatement |
+  LinearQueryStatementAmbient AmbientLinearQueryStatement
+  deriving (Eq, Ord, Read, Show)
+_LinearQueryStatement = Core.Name "openGql.grammar.LinearQueryStatement"
+_LinearQueryStatement_focused = Core.Name "focused"
+_LinearQueryStatement_ambient = Core.Name "ambient"
+data FocusedLinearQueryStatement =
+  FocusedLinearQueryStatementParts FocusedLinearQueryStatementPartsAndResult |
+  FocusedLinearQueryStatementPrimitive FocusedPrimitiveResultStatement |
+  FocusedLinearQueryStatementNested FocusedNestedQuerySpecification |
+  FocusedLinearQueryStatementSelect SelectStatement
+  deriving (Eq, Ord, Read, Show)
+_FocusedLinearQueryStatement = Core.Name "openGql.grammar.FocusedLinearQueryStatement"
+_FocusedLinearQueryStatement_parts = Core.Name "parts"
+_FocusedLinearQueryStatement_primitive = Core.Name "primitive"
+_FocusedLinearQueryStatement_nested = Core.Name "nested"
+_FocusedLinearQueryStatement_select = Core.Name "select"
+data FocusedLinearQueryStatementPartsAndResult =
+  FocusedLinearQueryStatementPartsAndResult {
+    focusedLinearQueryStatementPartsAndResultParts :: [FocusedLinearQueryStatementPart],
+    focusedLinearQueryStatementPartsAndResultResult :: FocusedLinearQueryAndPrimitiveResultStatementPart}
+  deriving (Eq, Ord, Read, Show)
+_FocusedLinearQueryStatementPartsAndResult = Core.Name "openGql.grammar.FocusedLinearQueryStatementPartsAndResult"
+_FocusedLinearQueryStatementPartsAndResult_parts = Core.Name "parts"
+_FocusedLinearQueryStatementPartsAndResult_result = Core.Name "result"
+data FocusedLinearQueryStatementPart =
+  FocusedLinearQueryStatementPart {
+    focusedLinearQueryStatementPartUseGraph :: UseGraphClause,
+    focusedLinearQueryStatementPartSimple :: SimpleLinearQueryStatement}
+  deriving (Eq, Ord, Read, Show)
+_FocusedLinearQueryStatementPart = Core.Name "openGql.grammar.FocusedLinearQueryStatementPart"
+_FocusedLinearQueryStatementPart_useGraph = Core.Name "useGraph"
+_FocusedLinearQueryStatementPart_simple = Core.Name "simple"
+data FocusedLinearQueryAndPrimitiveResultStatementPart =
+  FocusedLinearQueryAndPrimitiveResultStatementPart {
+    focusedLinearQueryAndPrimitiveResultStatementPartUseGraph :: UseGraphClause,
+    focusedLinearQueryAndPrimitiveResultStatementPartSimple :: SimpleLinearQueryStatement,
+    focusedLinearQueryAndPrimitiveResultStatementPartPrimitiveResult :: PrimitiveResultStatement}
+  deriving (Eq, Ord, Read, Show)
+_FocusedLinearQueryAndPrimitiveResultStatementPart =
+    Core.Name "openGql.grammar.FocusedLinearQueryAndPrimitiveResultStatementPart"
+_FocusedLinearQueryAndPrimitiveResultStatementPart_useGraph = Core.Name "useGraph"
+_FocusedLinearQueryAndPrimitiveResultStatementPart_simple = Core.Name "simple"
+_FocusedLinearQueryAndPrimitiveResultStatementPart_primitiveResult = Core.Name "primitiveResult"
+data FocusedPrimitiveResultStatement =
+  FocusedPrimitiveResultStatement {
+    focusedPrimitiveResultStatementUseGraph :: UseGraphClause,
+    focusedPrimitiveResultStatementPrimitiveResult :: PrimitiveResultStatement}
+  deriving (Eq, Ord, Read, Show)
+_FocusedPrimitiveResultStatement = Core.Name "openGql.grammar.FocusedPrimitiveResultStatement"
+_FocusedPrimitiveResultStatement_useGraph = Core.Name "useGraph"
+_FocusedPrimitiveResultStatement_primitiveResult = Core.Name "primitiveResult"
+data FocusedNestedQuerySpecification =
+  FocusedNestedQuerySpecification {
+    focusedNestedQuerySpecificationUseGraph :: UseGraphClause,
+    focusedNestedQuerySpecificationNested :: NestedQuerySpecification}
+  deriving (Eq, Ord, Read, Show)
+_FocusedNestedQuerySpecification = Core.Name "openGql.grammar.FocusedNestedQuerySpecification"
+_FocusedNestedQuerySpecification_useGraph = Core.Name "useGraph"
+_FocusedNestedQuerySpecification_nested = Core.Name "nested"
+data AmbientLinearQueryStatement =
+  AmbientLinearQueryStatementSimple AmbientLinearQueryStatementSimpleAndPrimitiveResult |
+  AmbientLinearQueryStatementNested NestedQuerySpecification
+  deriving (Eq, Ord, Read, Show)
+_AmbientLinearQueryStatement = Core.Name "openGql.grammar.AmbientLinearQueryStatement"
+_AmbientLinearQueryStatement_simple = Core.Name "simple"
+_AmbientLinearQueryStatement_nested = Core.Name "nested"
+data AmbientLinearQueryStatementSimpleAndPrimitiveResult =
+  AmbientLinearQueryStatementSimpleAndPrimitiveResult {
+    ambientLinearQueryStatementSimpleAndPrimitiveResultSimple :: (Maybe SimpleLinearQueryStatement),
+    ambientLinearQueryStatementSimpleAndPrimitiveResultPrimitiveResult :: PrimitiveResultStatement}
+  deriving (Eq, Ord, Read, Show)
+_AmbientLinearQueryStatementSimpleAndPrimitiveResult =
+    Core.Name "openGql.grammar.AmbientLinearQueryStatementSimpleAndPrimitiveResult"
+_AmbientLinearQueryStatementSimpleAndPrimitiveResult_simple = Core.Name "simple"
+_AmbientLinearQueryStatementSimpleAndPrimitiveResult_primitiveResult = Core.Name "primitiveResult"
+type SimpleLinearQueryStatement = [SimpleQueryStatement]
+_SimpleLinearQueryStatement = Core.Name "openGql.grammar.SimpleLinearQueryStatement"
+data SimpleQueryStatement =
+  SimpleQueryStatementPrimitive PrimitiveQueryStatement |
+  SimpleQueryStatementCall CallQueryStatement
+  deriving (Eq, Ord, Read, Show)
+_SimpleQueryStatement = Core.Name "openGql.grammar.SimpleQueryStatement"
+_SimpleQueryStatement_primitive = Core.Name "primitive"
+_SimpleQueryStatement_call = Core.Name "call"
+data PrimitiveQueryStatement =
+  PrimitiveQueryStatementMatch MatchStatement |
+  PrimitiveQueryStatementLet LetStatement |
+  PrimitiveQueryStatementFor ForStatement |
+  PrimitiveQueryStatementFilter FilterStatement |
+  PrimitiveQueryStatementOrderByAndPage OrderByAndPageStatement
+  deriving (Eq, Ord, Read, Show)
+_PrimitiveQueryStatement = Core.Name "openGql.grammar.PrimitiveQueryStatement"
+_PrimitiveQueryStatement_match = Core.Name "match"
+_PrimitiveQueryStatement_let = Core.Name "let"
+_PrimitiveQueryStatement_for = Core.Name "for"
+_PrimitiveQueryStatement_filter = Core.Name "filter"
+_PrimitiveQueryStatement_orderByAndPage = Core.Name "orderByAndPage"
+data MatchStatement =
+  MatchStatementSimple SimpleMatchStatement |
+  MatchStatementOptional OptionalMatchStatement
+  deriving (Eq, Ord, Read, Show)
+_MatchStatement = Core.Name "openGql.grammar.MatchStatement"
+_MatchStatement_simple = Core.Name "simple"
+_MatchStatement_optional = Core.Name "optional"
+type SimpleMatchStatement = GraphPatternBindingTable
+_SimpleMatchStatement = Core.Name "openGql.grammar.SimpleMatchStatement"
+type OptionalMatchStatement = OptionalOperand
+_OptionalMatchStatement = Core.Name "openGql.grammar.OptionalMatchStatement"
+data OptionalOperand =
+  OptionalOperandSimple SimpleMatchStatement |
+  OptionalOperandBraceBlock MatchStatementBlock |
+  OptionalOperandParenBlock MatchStatementBlock
+  deriving (Eq, Ord, Read, Show)
+_OptionalOperand = Core.Name "openGql.grammar.OptionalOperand"
+_OptionalOperand_simple = Core.Name "simple"
+_OptionalOperand_braceBlock = Core.Name "braceBlock"
+_OptionalOperand_parenBlock = Core.Name "parenBlock"
+type MatchStatementBlock = [MatchStatement]
+_MatchStatementBlock = Core.Name "openGql.grammar.MatchStatementBlock"
+type CallQueryStatement = CallProcedureStatement
+_CallQueryStatement = Core.Name "openGql.grammar.CallQueryStatement"
+data FilterStatement =
+  FilterStatementWhereClause WhereClause |
+  FilterStatementSearchCondition SearchCondition
+  deriving (Eq, Ord, Read, Show)
+_FilterStatement = Core.Name "openGql.grammar.FilterStatement"
+_FilterStatement_whereClause = Core.Name "whereClause"
+_FilterStatement_searchCondition = Core.Name "searchCondition"
+type LetStatement = LetVariableDefinitionList
+_LetStatement = Core.Name "openGql.grammar.LetStatement"
+type LetVariableDefinitionList = [LetVariableDefinition]
+_LetVariableDefinitionList = Core.Name "openGql.grammar.LetVariableDefinitionList"
+data LetVariableDefinition =
+  LetVariableDefinitionValueVariable ValueVariableDefinition |
+  LetVariableDefinitionBindingEqualsValue BindingEqualsValue
+  deriving (Eq, Ord, Read, Show)
+_LetVariableDefinition = Core.Name "openGql.grammar.LetVariableDefinition"
+_LetVariableDefinition_valueVariable = Core.Name "valueVariable"
+_LetVariableDefinition_bindingEqualsValue = Core.Name "bindingEqualsValue"
+data BindingEqualsValue =
+  BindingEqualsValue {
+    bindingEqualsValueBinding :: BindingVariable,
+    bindingEqualsValueValue :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_BindingEqualsValue = Core.Name "openGql.grammar.BindingEqualsValue"
+_BindingEqualsValue_binding = Core.Name "binding"
+_BindingEqualsValue_value = Core.Name "value"
+data ForStatement =
+  ForStatement {
+    forStatementItem :: ForItem,
+    forStatementOrdinalityOrOffset :: (Maybe ForOrdinalityOrOffset)}
+  deriving (Eq, Ord, Read, Show)
+_ForStatement = Core.Name "openGql.grammar.ForStatement"
+_ForStatement_item = Core.Name "item"
+_ForStatement_ordinalityOrOffset = Core.Name "ordinalityOrOffset"
+data ForItem =
+  ForItem {
+    forItemAlias :: ForItemAlias,
+    forItemSource :: ForItemSource}
+  deriving (Eq, Ord, Read, Show)
+_ForItem = Core.Name "openGql.grammar.ForItem"
+_ForItem_alias = Core.Name "alias"
+_ForItem_source = Core.Name "source"
+type ForItemAlias = BindingVariable
+_ForItemAlias = Core.Name "openGql.grammar.ForItemAlias"
+type ForItemSource = ValueExpression
+_ForItemSource = Core.Name "openGql.grammar.ForItemSource"
+data ForOrdinalityOrOffset =
+  ForOrdinalityOrOffset {
+    forOrdinalityOrOffsetType :: OrdinalityOrOffsetType,
+    forOrdinalityOrOffsetVariable :: BindingVariable}
+  deriving (Eq, Ord, Read, Show)
+_ForOrdinalityOrOffset = Core.Name "openGql.grammar.ForOrdinalityOrOffset"
+_ForOrdinalityOrOffset_type = Core.Name "type"
+_ForOrdinalityOrOffset_variable = Core.Name "variable"
+data OrdinalityOrOffsetType =
+  OrdinalityOrOffsetTypeOrdinality |
+  OrdinalityOrOffsetTypeOffset
+  deriving (Eq, Ord, Read, Show)
+_OrdinalityOrOffsetType = Core.Name "openGql.grammar.OrdinalityOrOffsetType"
+_OrdinalityOrOffsetType_ordinality = Core.Name "ordinality"
+_OrdinalityOrOffsetType_offset = Core.Name "offset"
+data OrderByAndPageStatement =
+  OrderByAndPageStatementOrderByAndOptionalOffsetAndLimit OrderByAndOptionalOffsetAndLimit |
+  OrderByAndPageStatementOffsetAndOptionalLimit OffsetAndOptionalLimit |
+  OrderByAndPageStatementLimitOnly LimitClause
+  deriving (Eq, Ord, Read, Show)
+_OrderByAndPageStatement = Core.Name "openGql.grammar.OrderByAndPageStatement"
+_OrderByAndPageStatement_orderByAndOptionalOffsetAndLimit = Core.Name "orderByAndOptionalOffsetAndLimit"
+_OrderByAndPageStatement_offsetAndOptionalLimit = Core.Name "offsetAndOptionalLimit"
+_OrderByAndPageStatement_limitOnly = Core.Name "limitOnly"
+data OrderByAndOptionalOffsetAndLimit =
+  OrderByAndOptionalOffsetAndLimit {
+    orderByAndOptionalOffsetAndLimitOrderBy :: OrderByClause,
+    orderByAndOptionalOffsetAndLimitOffset :: (Maybe OffsetClause),
+    orderByAndOptionalOffsetAndLimitLimit :: (Maybe LimitClause)}
+  deriving (Eq, Ord, Read, Show)
+_OrderByAndOptionalOffsetAndLimit = Core.Name "openGql.grammar.OrderByAndOptionalOffsetAndLimit"
+_OrderByAndOptionalOffsetAndLimit_orderBy = Core.Name "orderBy"
+_OrderByAndOptionalOffsetAndLimit_offset = Core.Name "offset"
+_OrderByAndOptionalOffsetAndLimit_limit = Core.Name "limit"
+data OffsetAndOptionalLimit =
+  OffsetAndOptionalLimit {
+    offsetAndOptionalLimitOffset :: OffsetClause,
+    offsetAndOptionalLimitLimit :: (Maybe LimitClause)}
+  deriving (Eq, Ord, Read, Show)
+_OffsetAndOptionalLimit = Core.Name "openGql.grammar.OffsetAndOptionalLimit"
+_OffsetAndOptionalLimit_offset = Core.Name "offset"
+_OffsetAndOptionalLimit_limit = Core.Name "limit"
+data PrimitiveResultStatement =
+  PrimitiveResultStatementReturnAndOptionalOrderBy ReturnAndOptionalOrderByAndPage |
+  PrimitiveResultStatementFinish
+  deriving (Eq, Ord, Read, Show)
+_PrimitiveResultStatement = Core.Name "openGql.grammar.PrimitiveResultStatement"
+_PrimitiveResultStatement_returnAndOptionalOrderBy = Core.Name "returnAndOptionalOrderBy"
+_PrimitiveResultStatement_finish = Core.Name "finish"
+data ReturnAndOptionalOrderByAndPage =
+  ReturnAndOptionalOrderByAndPage {
+    returnAndOptionalOrderByAndPageReturn :: ReturnStatement,
+    returnAndOptionalOrderByAndPageOrderByAndPage :: (Maybe OrderByAndPageStatement)}
+  deriving (Eq, Ord, Read, Show)
+_ReturnAndOptionalOrderByAndPage = Core.Name "openGql.grammar.ReturnAndOptionalOrderByAndPage"
+_ReturnAndOptionalOrderByAndPage_return = Core.Name "return"
+_ReturnAndOptionalOrderByAndPage_orderByAndPage = Core.Name "orderByAndPage"
+type ReturnStatement = ReturnStatementBody
+_ReturnStatement = Core.Name "openGql.grammar.ReturnStatement"
+data ReturnStatementBody =
+  ReturnStatementBodyItems ReturnItemsAndGroupBy |
+  ReturnStatementBodyNoBindings
+  deriving (Eq, Ord, Read, Show)
+_ReturnStatementBody = Core.Name "openGql.grammar.ReturnStatementBody"
+_ReturnStatementBody_items = Core.Name "items"
+_ReturnStatementBody_noBindings = Core.Name "noBindings"
+data ReturnItemsAndGroupBy =
+  ReturnItemsAndGroupBy {
+    returnItemsAndGroupByQuantifier :: (Maybe SetQuantifier),
+    returnItemsAndGroupByItems :: ReturnItems,
+    returnItemsAndGroupByGroupBy :: (Maybe GroupByClause)}
+  deriving (Eq, Ord, Read, Show)
+_ReturnItemsAndGroupBy = Core.Name "openGql.grammar.ReturnItemsAndGroupBy"
+_ReturnItemsAndGroupBy_quantifier = Core.Name "quantifier"
+_ReturnItemsAndGroupBy_items = Core.Name "items"
+_ReturnItemsAndGroupBy_groupBy = Core.Name "groupBy"
+data ReturnItems =
+  ReturnItemsAsterisk |
+  ReturnItemsItemList ReturnItemList
+  deriving (Eq, Ord, Read, Show)
+_ReturnItems = Core.Name "openGql.grammar.ReturnItems"
+_ReturnItems_asterisk = Core.Name "asterisk"
+_ReturnItems_itemList = Core.Name "itemList"
+type ReturnItemList = [ReturnItem]
+_ReturnItemList = Core.Name "openGql.grammar.ReturnItemList"
+data ReturnItem =
+  ReturnItem {
+    returnItemExpression :: AggregatingValueExpression,
+    returnItemAlias :: (Maybe ReturnItemAlias)}
+  deriving (Eq, Ord, Read, Show)
+_ReturnItem = Core.Name "openGql.grammar.ReturnItem"
+_ReturnItem_expression = Core.Name "expression"
+_ReturnItem_alias = Core.Name "alias"
+type ReturnItemAlias = String
+_ReturnItemAlias = Core.Name "openGql.grammar.ReturnItemAlias"
+data SelectStatement =
+  SelectStatement {
+    selectStatementQuantifier :: (Maybe SetQuantifier),
+    selectStatementItems :: SelectItems,
+    selectStatementBody :: (Maybe SelectStatementBodyAndClauses)}
+  deriving (Eq, Ord, Read, Show)
+_SelectStatement = Core.Name "openGql.grammar.SelectStatement"
+_SelectStatement_quantifier = Core.Name "quantifier"
+_SelectStatement_items = Core.Name "items"
+_SelectStatement_body = Core.Name "body"
+data SelectItems =
+  SelectItemsAsterisk |
+  SelectItemsItemList SelectItemList
+  deriving (Eq, Ord, Read, Show)
+_SelectItems = Core.Name "openGql.grammar.SelectItems"
+_SelectItems_asterisk = Core.Name "asterisk"
+_SelectItems_itemList = Core.Name "itemList"
+data SelectStatementBodyAndClauses =
+  SelectStatementBodyAndClauses {
+    selectStatementBodyAndClausesBody :: SelectStatementBody,
+    selectStatementBodyAndClausesWhere :: (Maybe WhereClause),
+    selectStatementBodyAndClausesGroupBy :: (Maybe GroupByClause),
+    selectStatementBodyAndClausesHaving :: (Maybe HavingClause),
+    selectStatementBodyAndClausesOrderBy :: (Maybe OrderByClause),
+    selectStatementBodyAndClausesOffset :: (Maybe OffsetClause),
+    selectStatementBodyAndClausesLimit :: (Maybe LimitClause)}
+  deriving (Eq, Ord, Read, Show)
+_SelectStatementBodyAndClauses = Core.Name "openGql.grammar.SelectStatementBodyAndClauses"
+_SelectStatementBodyAndClauses_body = Core.Name "body"
+_SelectStatementBodyAndClauses_where = Core.Name "where"
+_SelectStatementBodyAndClauses_groupBy = Core.Name "groupBy"
+_SelectStatementBodyAndClauses_having = Core.Name "having"
+_SelectStatementBodyAndClauses_orderBy = Core.Name "orderBy"
+_SelectStatementBodyAndClauses_offset = Core.Name "offset"
+_SelectStatementBodyAndClauses_limit = Core.Name "limit"
+type SelectItemList = [SelectItem]
+_SelectItemList = Core.Name "openGql.grammar.SelectItemList"
+data SelectItem =
+  SelectItem {
+    selectItemExpression :: AggregatingValueExpression,
+    selectItemAlias :: (Maybe SelectItemAlias)}
+  deriving (Eq, Ord, Read, Show)
+_SelectItem = Core.Name "openGql.grammar.SelectItem"
+_SelectItem_expression = Core.Name "expression"
+_SelectItem_alias = Core.Name "alias"
+type SelectItemAlias = String
+_SelectItemAlias = Core.Name "openGql.grammar.SelectItemAlias"
+type HavingClause = SearchCondition
+_HavingClause = Core.Name "openGql.grammar.HavingClause"
+data SelectStatementBody =
+  SelectStatementBodyGraphMatchList SelectGraphMatchList |
+  SelectStatementBodyQuerySpecification SelectQuerySpecification
+  deriving (Eq, Ord, Read, Show)
+_SelectStatementBody = Core.Name "openGql.grammar.SelectStatementBody"
+_SelectStatementBody_graphMatchList = Core.Name "graphMatchList"
+_SelectStatementBody_querySpecification = Core.Name "querySpecification"
+type SelectGraphMatchList = [SelectGraphMatch]
+_SelectGraphMatchList = Core.Name "openGql.grammar.SelectGraphMatchList"
+data SelectGraphMatch =
+  SelectGraphMatch {
+    selectGraphMatchGraphExpression :: GraphExpression,
+    selectGraphMatchMatchStatement :: MatchStatement}
+  deriving (Eq, Ord, Read, Show)
+_SelectGraphMatch = Core.Name "openGql.grammar.SelectGraphMatch"
+_SelectGraphMatch_graphExpression = Core.Name "graphExpression"
+_SelectGraphMatch_matchStatement = Core.Name "matchStatement"
+data SelectQuerySpecification =
+  SelectQuerySpecificationNested NestedQuerySpecification |
+  SelectQuerySpecificationGraphAndNested GraphAndNestedQuerySpecification
+  deriving (Eq, Ord, Read, Show)
+_SelectQuerySpecification = Core.Name "openGql.grammar.SelectQuerySpecification"
+_SelectQuerySpecification_nested = Core.Name "nested"
+_SelectQuerySpecification_graphAndNested = Core.Name "graphAndNested"
+data GraphAndNestedQuerySpecification =
+  GraphAndNestedQuerySpecification {
+    graphAndNestedQuerySpecificationGraphExpression :: GraphExpression,
+    graphAndNestedQuerySpecificationNested :: NestedQuerySpecification}
+  deriving (Eq, Ord, Read, Show)
+_GraphAndNestedQuerySpecification = Core.Name "openGql.grammar.GraphAndNestedQuerySpecification"
+_GraphAndNestedQuerySpecification_graphExpression = Core.Name "graphExpression"
+_GraphAndNestedQuerySpecification_nested = Core.Name "nested"
+data CallProcedureStatement =
+  CallProcedureStatement {
+    callProcedureStatementOptional :: Bool,
+    callProcedureStatementCall :: ProcedureCall}
+  deriving (Eq, Ord, Read, Show)
+_CallProcedureStatement = Core.Name "openGql.grammar.CallProcedureStatement"
+_CallProcedureStatement_optional = Core.Name "optional"
+_CallProcedureStatement_call = Core.Name "call"
+data ProcedureCall =
+  ProcedureCallInline InlineProcedureCall |
+  ProcedureCallNamed NamedProcedureCall
+  deriving (Eq, Ord, Read, Show)
+_ProcedureCall = Core.Name "openGql.grammar.ProcedureCall"
+_ProcedureCall_inline = Core.Name "inline"
+_ProcedureCall_named = Core.Name "named"
+data InlineProcedureCall =
+  InlineProcedureCall {
+    inlineProcedureCallScope :: (Maybe VariableScopeClause),
+    inlineProcedureCallNested :: NestedProcedureSpecification}
+  deriving (Eq, Ord, Read, Show)
+_InlineProcedureCall = Core.Name "openGql.grammar.InlineProcedureCall"
+_InlineProcedureCall_scope = Core.Name "scope"
+_InlineProcedureCall_nested = Core.Name "nested"
+type VariableScopeClause = (Maybe BindingVariableReferenceList)
+_VariableScopeClause = Core.Name "openGql.grammar.VariableScopeClause"
+type BindingVariableReferenceList = [BindingVariableReference]
+_BindingVariableReferenceList = Core.Name "openGql.grammar.BindingVariableReferenceList"
+data NamedProcedureCall =
+  NamedProcedureCall {
+    namedProcedureCallReference :: ProcedureReference,
+    namedProcedureCallArguments :: (Maybe ProcedureArgumentList),
+    namedProcedureCallYield :: (Maybe YieldClause)}
+  deriving (Eq, Ord, Read, Show)
+_NamedProcedureCall = Core.Name "openGql.grammar.NamedProcedureCall"
+_NamedProcedureCall_reference = Core.Name "reference"
+_NamedProcedureCall_arguments = Core.Name "arguments"
+_NamedProcedureCall_yield = Core.Name "yield"
+type ProcedureArgumentList = [ProcedureArgument]
+_ProcedureArgumentList = Core.Name "openGql.grammar.ProcedureArgumentList"
+type ProcedureArgument = ValueExpression
+_ProcedureArgument = Core.Name "openGql.grammar.ProcedureArgument"
+type AtSchemaClause = SchemaReference
+_AtSchemaClause = Core.Name "openGql.grammar.AtSchemaClause"
+type UseGraphClause = GraphExpression
+_UseGraphClause = Core.Name "openGql.grammar.UseGraphClause"
+data GraphPatternBindingTable =
+  GraphPatternBindingTable {
+    graphPatternBindingTablePattern :: GraphPattern,
+    graphPatternBindingTableYieldClause :: (Maybe GraphPatternYieldClause)}
+  deriving (Eq, Ord, Read, Show)
+_GraphPatternBindingTable = Core.Name "openGql.grammar.GraphPatternBindingTable"
+_GraphPatternBindingTable_pattern = Core.Name "pattern"
+_GraphPatternBindingTable_yieldClause = Core.Name "yieldClause"
+type GraphPatternYieldClause = GraphPatternYieldItemList
+_GraphPatternYieldClause = Core.Name "openGql.grammar.GraphPatternYieldClause"
+data GraphPatternYieldItemList =
+  GraphPatternYieldItemListItems [GraphPatternYieldItem] |
+  GraphPatternYieldItemListNoBindings
+  deriving (Eq, Ord, Read, Show)
+_GraphPatternYieldItemList = Core.Name "openGql.grammar.GraphPatternYieldItemList"
+_GraphPatternYieldItemList_items = Core.Name "items"
+_GraphPatternYieldItemList_noBindings = Core.Name "noBindings"
+type GraphPatternYieldItem = BindingVariableReference
+_GraphPatternYieldItem = Core.Name "openGql.grammar.GraphPatternYieldItem"
+data GraphPattern =
+  GraphPattern {
+    graphPatternMatchMode :: (Maybe MatchMode),
+    graphPatternPathPatterns :: PathPatternList,
+    graphPatternKeepClause :: (Maybe KeepClause),
+    graphPatternWhereClause :: (Maybe GraphPatternWhereClause)}
+  deriving (Eq, Ord, Read, Show)
+_GraphPattern = Core.Name "openGql.grammar.GraphPattern"
+_GraphPattern_matchMode = Core.Name "matchMode"
+_GraphPattern_pathPatterns = Core.Name "pathPatterns"
+_GraphPattern_keepClause = Core.Name "keepClause"
+_GraphPattern_whereClause = Core.Name "whereClause"
+data MatchMode =
+  MatchModeRepeatableElements RepeatableElementsMatchMode |
+  MatchModeDifferentEdges DifferentEdgesMatchMode
+  deriving (Eq, Ord, Read, Show)
+_MatchMode = Core.Name "openGql.grammar.MatchMode"
+_MatchMode_repeatableElements = Core.Name "repeatableElements"
+_MatchMode_differentEdges = Core.Name "differentEdges"
+type RepeatableElementsMatchMode = ElementBindingsOrElements
+_RepeatableElementsMatchMode = Core.Name "openGql.grammar.RepeatableElementsMatchMode"
+type DifferentEdgesMatchMode = EdgeBindingsOrEdges
+_DifferentEdgesMatchMode = Core.Name "openGql.grammar.DifferentEdgesMatchMode"
+data ElementBindingsOrElements =
+  ElementBindingsOrElementsElementBindings Bool |
+  ElementBindingsOrElementsElements
+  deriving (Eq, Ord, Read, Show)
+_ElementBindingsOrElements = Core.Name "openGql.grammar.ElementBindingsOrElements"
+_ElementBindingsOrElements_elementBindings = Core.Name "elementBindings"
+_ElementBindingsOrElements_elements = Core.Name "elements"
+data EdgeBindingsOrEdges =
+  EdgeBindingsOrEdgesEdgeBindings Bool |
+  EdgeBindingsOrEdgesEdges
+  deriving (Eq, Ord, Read, Show)
+_EdgeBindingsOrEdges = Core.Name "openGql.grammar.EdgeBindingsOrEdges"
+_EdgeBindingsOrEdges_edgeBindings = Core.Name "edgeBindings"
+_EdgeBindingsOrEdges_edges = Core.Name "edges"
+type PathPatternList = [PathPattern]
+_PathPatternList = Core.Name "openGql.grammar.PathPatternList"
+data PathPattern =
+  PathPattern {
+    pathPatternVariableDeclaration :: (Maybe PathVariableDeclaration),
+    pathPatternPrefix :: (Maybe PathPatternPrefix),
+    pathPatternExpression :: PathPatternExpression}
+  deriving (Eq, Ord, Read, Show)
+_PathPattern = Core.Name "openGql.grammar.PathPattern"
+_PathPattern_variableDeclaration = Core.Name "variableDeclaration"
+_PathPattern_prefix = Core.Name "prefix"
+_PathPattern_expression = Core.Name "expression"
+type PathVariableDeclaration = PathVariable
+_PathVariableDeclaration = Core.Name "openGql.grammar.PathVariableDeclaration"
+type KeepClause = PathPatternPrefix
+_KeepClause = Core.Name "openGql.grammar.KeepClause"
+type GraphPatternWhereClause = SearchCondition
+_GraphPatternWhereClause = Core.Name "openGql.grammar.GraphPatternWhereClause"
+type InsertGraphPattern = InsertPathPatternList
+_InsertGraphPattern = Core.Name "openGql.grammar.InsertGraphPattern"
+type InsertPathPatternList = [InsertPathPattern]
+_InsertPathPatternList = Core.Name "openGql.grammar.InsertPathPatternList"
+data InsertPathPattern =
+  InsertPathPattern {
+    insertPathPatternStartNode :: InsertNodePattern,
+    insertPathPatternEdgesAndNodes :: [InsertEdgeAndNode]}
+  deriving (Eq, Ord, Read, Show)
+_InsertPathPattern = Core.Name "openGql.grammar.InsertPathPattern"
+_InsertPathPattern_startNode = Core.Name "startNode"
+_InsertPathPattern_edgesAndNodes = Core.Name "edgesAndNodes"
+data InsertEdgeAndNode =
+  InsertEdgeAndNode {
+    insertEdgeAndNodeEdge :: InsertEdgePattern,
+    insertEdgeAndNodeNode :: InsertNodePattern}
+  deriving (Eq, Ord, Read, Show)
+_InsertEdgeAndNode = Core.Name "openGql.grammar.InsertEdgeAndNode"
+_InsertEdgeAndNode_edge = Core.Name "edge"
+_InsertEdgeAndNode_node = Core.Name "node"
+type InsertNodePattern = (Maybe InsertElementPatternFiller)
+_InsertNodePattern = Core.Name "openGql.grammar.InsertNodePattern"
+data InsertEdgePattern =
+  InsertEdgePatternPointingLeft InsertEdgePointingLeft |
+  InsertEdgePatternPointingRight InsertEdgePointingRight |
+  InsertEdgePatternUndirected InsertEdgeUndirected
+  deriving (Eq, Ord, Read, Show)
+_InsertEdgePattern = Core.Name "openGql.grammar.InsertEdgePattern"
+_InsertEdgePattern_pointingLeft = Core.Name "pointingLeft"
+_InsertEdgePattern_pointingRight = Core.Name "pointingRight"
+_InsertEdgePattern_undirected = Core.Name "undirected"
+type InsertEdgePointingLeft = (Maybe InsertElementPatternFiller)
+_InsertEdgePointingLeft = Core.Name "openGql.grammar.InsertEdgePointingLeft"
+type InsertEdgePointingRight = (Maybe InsertElementPatternFiller)
+_InsertEdgePointingRight = Core.Name "openGql.grammar.InsertEdgePointingRight"
+type InsertEdgeUndirected = (Maybe InsertElementPatternFiller)
+_InsertEdgeUndirected = Core.Name "openGql.grammar.InsertEdgeUndirected"
+data InsertElementPatternFiller =
+  InsertElementPatternFiller {
+    insertElementPatternFillerVariableDeclaration :: (Maybe ElementVariableDeclaration),
+    insertElementPatternFillerLabelAndProperties :: (Maybe LabelAndPropertySetSpecification)}
+  deriving (Eq, Ord, Read, Show)
+_InsertElementPatternFiller = Core.Name "openGql.grammar.InsertElementPatternFiller"
+_InsertElementPatternFiller_variableDeclaration = Core.Name "variableDeclaration"
+_InsertElementPatternFiller_labelAndProperties = Core.Name "labelAndProperties"
+data LabelAndPropertySetSpecification =
+  LabelAndPropertySetSpecification {
+    labelAndPropertySetSpecificationIsOrColon :: (Maybe IsOrColon),
+    labelAndPropertySetSpecificationLabelSet :: (Maybe LabelSetSpecification),
+    labelAndPropertySetSpecificationPropertySpecification :: (Maybe ElementPropertySpecification)}
+  deriving (Eq, Ord, Read, Show)
+_LabelAndPropertySetSpecification = Core.Name "openGql.grammar.LabelAndPropertySetSpecification"
+_LabelAndPropertySetSpecification_isOrColon = Core.Name "isOrColon"
+_LabelAndPropertySetSpecification_labelSet = Core.Name "labelSet"
+_LabelAndPropertySetSpecification_propertySpecification = Core.Name "propertySpecification"
+data PathPatternPrefix =
+  PathPatternPrefixModePrefix PathModePrefix |
+  PathPatternPrefixSearchPrefix PathSearchPrefix
+  deriving (Eq, Ord, Read, Show)
+_PathPatternPrefix = Core.Name "openGql.grammar.PathPatternPrefix"
+_PathPatternPrefix_modePrefix = Core.Name "modePrefix"
+_PathPatternPrefix_searchPrefix = Core.Name "searchPrefix"
+data PathModePrefix =
+  PathModePrefix {
+    pathModePrefixMode :: PathMode,
+    pathModePrefixOrPaths :: (Maybe PathOrPaths)}
+  deriving (Eq, Ord, Read, Show)
+_PathModePrefix = Core.Name "openGql.grammar.PathModePrefix"
+_PathModePrefix_mode = Core.Name "mode"
+_PathModePrefix_orPaths = Core.Name "orPaths"
+data PathMode =
+  PathModeWalk |
+  PathModeTrail |
+  PathModeSimple |
+  PathModeAcyclic
+  deriving (Eq, Ord, Read, Show)
+_PathMode = Core.Name "openGql.grammar.PathMode"
+_PathMode_walk = Core.Name "walk"
+_PathMode_trail = Core.Name "trail"
+_PathMode_simple = Core.Name "simple"
+_PathMode_acyclic = Core.Name "acyclic"
+data PathSearchPrefix =
+  PathSearchPrefixAll AllPathSearch |
+  PathSearchPrefixAny AnyPathSearch |
+  PathSearchPrefixShortest ShortestPathSearch
+  deriving (Eq, Ord, Read, Show)
+_PathSearchPrefix = Core.Name "openGql.grammar.PathSearchPrefix"
+_PathSearchPrefix_all = Core.Name "all"
+_PathSearchPrefix_any = Core.Name "any"
+_PathSearchPrefix_shortest = Core.Name "shortest"
+data AllPathSearch =
+  AllPathSearch {
+    allPathSearchMode :: (Maybe PathMode),
+    allPathSearchOrPaths :: (Maybe PathOrPaths)}
+  deriving (Eq, Ord, Read, Show)
+_AllPathSearch = Core.Name "openGql.grammar.AllPathSearch"
+_AllPathSearch_mode = Core.Name "mode"
+_AllPathSearch_orPaths = Core.Name "orPaths"
+data PathOrPaths =
+  PathOrPathsPath |
+  PathOrPathsPaths
+  deriving (Eq, Ord, Read, Show)
+_PathOrPaths = Core.Name "openGql.grammar.PathOrPaths"
+_PathOrPaths_path = Core.Name "path"
+_PathOrPaths_paths = Core.Name "paths"
+data AnyPathSearch =
+  AnyPathSearch {
+    anyPathSearchNumberOfPaths :: (Maybe NumberOfPaths),
+    anyPathSearchMode :: (Maybe PathMode),
+    anyPathSearchOrPaths :: (Maybe PathOrPaths)}
+  deriving (Eq, Ord, Read, Show)
+_AnyPathSearch = Core.Name "openGql.grammar.AnyPathSearch"
+_AnyPathSearch_numberOfPaths = Core.Name "numberOfPaths"
+_AnyPathSearch_mode = Core.Name "mode"
+_AnyPathSearch_orPaths = Core.Name "orPaths"
+type NumberOfPaths = NonNegativeIntegerSpecification
+_NumberOfPaths = Core.Name "openGql.grammar.NumberOfPaths"
+data ShortestPathSearch =
+  ShortestPathSearchAllShortest AllShortestPathSearch |
+  ShortestPathSearchAnyShortest AnyShortestPathSearch |
+  ShortestPathSearchCountedShortest CountedShortestPathSearch |
+  ShortestPathSearchCountedShortestGroup CountedShortestGroupSearch
+  deriving (Eq, Ord, Read, Show)
+_ShortestPathSearch = Core.Name "openGql.grammar.ShortestPathSearch"
+_ShortestPathSearch_allShortest = Core.Name "allShortest"
+_ShortestPathSearch_anyShortest = Core.Name "anyShortest"
+_ShortestPathSearch_countedShortest = Core.Name "countedShortest"
+_ShortestPathSearch_countedShortestGroup = Core.Name "countedShortestGroup"
+data AllShortestPathSearch =
+  AllShortestPathSearch {
+    allShortestPathSearchMode :: (Maybe PathMode),
+    allShortestPathSearchOrPaths :: (Maybe PathOrPaths)}
+  deriving (Eq, Ord, Read, Show)
+_AllShortestPathSearch = Core.Name "openGql.grammar.AllShortestPathSearch"
+_AllShortestPathSearch_mode = Core.Name "mode"
+_AllShortestPathSearch_orPaths = Core.Name "orPaths"
+data AnyShortestPathSearch =
+  AnyShortestPathSearch {
+    anyShortestPathSearchMode :: (Maybe PathMode),
+    anyShortestPathSearchOrPaths :: (Maybe PathOrPaths)}
+  deriving (Eq, Ord, Read, Show)
+_AnyShortestPathSearch = Core.Name "openGql.grammar.AnyShortestPathSearch"
+_AnyShortestPathSearch_mode = Core.Name "mode"
+_AnyShortestPathSearch_orPaths = Core.Name "orPaths"
+data CountedShortestPathSearch =
+  CountedShortestPathSearch {
+    countedShortestPathSearchNumberOfPaths :: NumberOfPaths,
+    countedShortestPathSearchMode :: (Maybe PathMode),
+    countedShortestPathSearchOrPaths :: (Maybe PathOrPaths)}
+  deriving (Eq, Ord, Read, Show)
+_CountedShortestPathSearch = Core.Name "openGql.grammar.CountedShortestPathSearch"
+_CountedShortestPathSearch_numberOfPaths = Core.Name "numberOfPaths"
+_CountedShortestPathSearch_mode = Core.Name "mode"
+_CountedShortestPathSearch_orPaths = Core.Name "orPaths"
+data CountedShortestGroupSearch =
+  CountedShortestGroupSearch {
+    countedShortestGroupSearchNumberOfGroups :: (Maybe NumberOfGroups),
+    countedShortestGroupSearchMode :: (Maybe PathMode),
+    countedShortestGroupSearchOrPaths :: (Maybe PathOrPaths),
+    countedShortestGroupSearchGroups :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_CountedShortestGroupSearch = Core.Name "openGql.grammar.CountedShortestGroupSearch"
+_CountedShortestGroupSearch_numberOfGroups = Core.Name "numberOfGroups"
+_CountedShortestGroupSearch_mode = Core.Name "mode"
+_CountedShortestGroupSearch_orPaths = Core.Name "orPaths"
+_CountedShortestGroupSearch_groups = Core.Name "groups"
+type NumberOfGroups = NonNegativeIntegerSpecification
+_NumberOfGroups = Core.Name "openGql.grammar.NumberOfGroups"
+data PathPatternExpression =
+  PathPatternExpressionTerm PathTerm |
+  PathPatternExpressionMultisetAlternation [PathTerm] |
+  PathPatternExpressionPatternUnion [PathTerm]
+  deriving (Eq, Ord, Read, Show)
+_PathPatternExpression = Core.Name "openGql.grammar.PathPatternExpression"
+_PathPatternExpression_term = Core.Name "term"
+_PathPatternExpression_multisetAlternation = Core.Name "multisetAlternation"
+_PathPatternExpression_patternUnion = Core.Name "patternUnion"
+type PathTerm = [PathFactor]
+_PathTerm = Core.Name "openGql.grammar.PathTerm"
+data PathFactor =
+  PathFactorPrimary PathPrimary |
+  PathFactorQuantifiedPrimary QuantifiedPathPrimary |
+  PathFactorQuestionedPrimary QuestionedPathPrimary
+  deriving (Eq, Ord, Read, Show)
+_PathFactor = Core.Name "openGql.grammar.PathFactor"
+_PathFactor_primary = Core.Name "primary"
+_PathFactor_quantifiedPrimary = Core.Name "quantifiedPrimary"
+_PathFactor_questionedPrimary = Core.Name "questionedPrimary"
+data QuantifiedPathPrimary =
+  QuantifiedPathPrimary {
+    quantifiedPathPrimaryPrimary :: PathPrimary,
+    quantifiedPathPrimaryQuantifier :: GraphPatternQuantifier}
+  deriving (Eq, Ord, Read, Show)
+_QuantifiedPathPrimary = Core.Name "openGql.grammar.QuantifiedPathPrimary"
+_QuantifiedPathPrimary_primary = Core.Name "primary"
+_QuantifiedPathPrimary_quantifier = Core.Name "quantifier"
+type QuestionedPathPrimary = PathPrimary
+_QuestionedPathPrimary = Core.Name "openGql.grammar.QuestionedPathPrimary"
+data PathPrimary =
+  PathPrimaryElementPattern ElementPattern |
+  PathPrimaryParenthesizedExpression ParenthesizedPathPatternExpression |
+  PathPrimarySimplifiedExpression SimplifiedPathPatternExpression
+  deriving (Eq, Ord, Read, Show)
+_PathPrimary = Core.Name "openGql.grammar.PathPrimary"
+_PathPrimary_elementPattern = Core.Name "elementPattern"
+_PathPrimary_parenthesizedExpression = Core.Name "parenthesizedExpression"
+_PathPrimary_simplifiedExpression = Core.Name "simplifiedExpression"
+data ElementPattern =
+  ElementPatternNode NodePattern |
+  ElementPatternEdge EdgePattern
+  deriving (Eq, Ord, Read, Show)
+_ElementPattern = Core.Name "openGql.grammar.ElementPattern"
+_ElementPattern_node = Core.Name "node"
+_ElementPattern_edge = Core.Name "edge"
+type NodePattern = ElementPatternFiller
+_NodePattern = Core.Name "openGql.grammar.NodePattern"
+data ElementPatternFiller =
+  ElementPatternFiller {
+    elementPatternFillerVariableDeclaration :: (Maybe ElementVariableDeclaration),
+    elementPatternFillerIsLabelExpression :: (Maybe IsLabelExpression),
+    elementPatternFillerPredicate :: (Maybe ElementPatternPredicate)}
+  deriving (Eq, Ord, Read, Show)
+_ElementPatternFiller = Core.Name "openGql.grammar.ElementPatternFiller"
+_ElementPatternFiller_variableDeclaration = Core.Name "variableDeclaration"
+_ElementPatternFiller_isLabelExpression = Core.Name "isLabelExpression"
+_ElementPatternFiller_predicate = Core.Name "predicate"
+data ElementVariableDeclaration =
+  ElementVariableDeclaration {
+    elementVariableDeclarationTemp :: (Maybe Bool),
+    elementVariableDeclarationVariable :: ElementVariable}
+  deriving (Eq, Ord, Read, Show)
+_ElementVariableDeclaration = Core.Name "openGql.grammar.ElementVariableDeclaration"
+_ElementVariableDeclaration_temp = Core.Name "temp"
+_ElementVariableDeclaration_variable = Core.Name "variable"
+data IsLabelExpression =
+  IsLabelExpression {
+    isLabelExpressionIsOrColon :: IsOrColon,
+    isLabelExpressionLabel :: LabelExpression}
+  deriving (Eq, Ord, Read, Show)
+_IsLabelExpression = Core.Name "openGql.grammar.IsLabelExpression"
+_IsLabelExpression_isOrColon = Core.Name "isOrColon"
+_IsLabelExpression_label = Core.Name "label"
+data IsOrColon =
+  IsOrColonIs |
+  IsOrColonColon
+  deriving (Eq, Ord, Read, Show)
+_IsOrColon = Core.Name "openGql.grammar.IsOrColon"
+_IsOrColon_is = Core.Name "is"
+_IsOrColon_colon = Core.Name "colon"
+data ElementPatternPredicate =
+  ElementPatternPredicateWhereClause ElementPatternWhereClause |
+  ElementPatternPredicatePropertySpecification ElementPropertySpecification
+  deriving (Eq, Ord, Read, Show)
+_ElementPatternPredicate = Core.Name "openGql.grammar.ElementPatternPredicate"
+_ElementPatternPredicate_whereClause = Core.Name "whereClause"
+_ElementPatternPredicate_propertySpecification = Core.Name "propertySpecification"
+type ElementPatternWhereClause = SearchCondition
+_ElementPatternWhereClause = Core.Name "openGql.grammar.ElementPatternWhereClause"
+type ElementPropertySpecification = PropertyKeyValuePairList
+_ElementPropertySpecification = Core.Name "openGql.grammar.ElementPropertySpecification"
+type PropertyKeyValuePairList = [PropertyKeyValuePair]
+_PropertyKeyValuePairList = Core.Name "openGql.grammar.PropertyKeyValuePairList"
+data PropertyKeyValuePair =
+  PropertyKeyValuePair {
+    propertyKeyValuePairName :: PropertyName,
+    propertyKeyValuePairValue :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_PropertyKeyValuePair = Core.Name "openGql.grammar.PropertyKeyValuePair"
+_PropertyKeyValuePair_name = Core.Name "name"
+_PropertyKeyValuePair_value = Core.Name "value"
+data EdgePattern =
+  EdgePatternFullEdge FullEdgePattern |
+  EdgePatternAbbreviatedEdge AbbreviatedEdgePattern
+  deriving (Eq, Ord, Read, Show)
+_EdgePattern = Core.Name "openGql.grammar.EdgePattern"
+_EdgePattern_fullEdge = Core.Name "fullEdge"
+_EdgePattern_abbreviatedEdge = Core.Name "abbreviatedEdge"
+data FullEdgePattern =
+  FullEdgePatternPointingLeft FullEdgePointingLeft |
+  FullEdgePatternUndirected FullEdgeUndirected |
+  FullEdgePatternPointingRight FullEdgePointingRight |
+  FullEdgePatternLeftOrUndirected FullEdgeLeftOrUndirected |
+  FullEdgePatternUndirectedOrRight FullEdgeUndirectedOrRight |
+  FullEdgePatternLeftOrRight FullEdgeLeftOrRight |
+  FullEdgePatternAnyDirection FullEdgeAnyDirection
+  deriving (Eq, Ord, Read, Show)
+_FullEdgePattern = Core.Name "openGql.grammar.FullEdgePattern"
+_FullEdgePattern_pointingLeft = Core.Name "pointingLeft"
+_FullEdgePattern_undirected = Core.Name "undirected"
+_FullEdgePattern_pointingRight = Core.Name "pointingRight"
+_FullEdgePattern_leftOrUndirected = Core.Name "leftOrUndirected"
+_FullEdgePattern_undirectedOrRight = Core.Name "undirectedOrRight"
+_FullEdgePattern_leftOrRight = Core.Name "leftOrRight"
+_FullEdgePattern_anyDirection = Core.Name "anyDirection"
+type FullEdgePointingLeft = ElementPatternFiller
+_FullEdgePointingLeft = Core.Name "openGql.grammar.FullEdgePointingLeft"
+type FullEdgeUndirected = ElementPatternFiller
+_FullEdgeUndirected = Core.Name "openGql.grammar.FullEdgeUndirected"
+type FullEdgePointingRight = ElementPatternFiller
+_FullEdgePointingRight = Core.Name "openGql.grammar.FullEdgePointingRight"
+type FullEdgeLeftOrUndirected = ElementPatternFiller
+_FullEdgeLeftOrUndirected = Core.Name "openGql.grammar.FullEdgeLeftOrUndirected"
+type FullEdgeUndirectedOrRight = ElementPatternFiller
+_FullEdgeUndirectedOrRight = Core.Name "openGql.grammar.FullEdgeUndirectedOrRight"
+type FullEdgeLeftOrRight = ElementPatternFiller
+_FullEdgeLeftOrRight = Core.Name "openGql.grammar.FullEdgeLeftOrRight"
+type FullEdgeAnyDirection = ElementPatternFiller
+_FullEdgeAnyDirection = Core.Name "openGql.grammar.FullEdgeAnyDirection"
+data AbbreviatedEdgePattern =
+  AbbreviatedEdgePatternLeftArrow |
+  AbbreviatedEdgePatternTilde |
+  AbbreviatedEdgePatternRightArrow |
+  AbbreviatedEdgePatternLeftArrowTilde |
+  AbbreviatedEdgePatternTildeRightArrow |
+  AbbreviatedEdgePatternLeftMinusRight |
+  AbbreviatedEdgePatternMinusSign
+  deriving (Eq, Ord, Read, Show)
+_AbbreviatedEdgePattern = Core.Name "openGql.grammar.AbbreviatedEdgePattern"
+_AbbreviatedEdgePattern_leftArrow = Core.Name "leftArrow"
+_AbbreviatedEdgePattern_tilde = Core.Name "tilde"
+_AbbreviatedEdgePattern_rightArrow = Core.Name "rightArrow"
+_AbbreviatedEdgePattern_leftArrowTilde = Core.Name "leftArrowTilde"
+_AbbreviatedEdgePattern_tildeRightArrow = Core.Name "tildeRightArrow"
+_AbbreviatedEdgePattern_leftMinusRight = Core.Name "leftMinusRight"
+_AbbreviatedEdgePattern_minusSign = Core.Name "minusSign"
+data ParenthesizedPathPatternExpression =
+  ParenthesizedPathPatternExpression {
+    parenthesizedPathPatternExpressionSubpathDeclaration :: (Maybe SubpathVariableDeclaration),
+    parenthesizedPathPatternExpressionPathMode :: (Maybe PathModePrefix),
+    parenthesizedPathPatternExpressionExpression :: PathPatternExpression,
+    parenthesizedPathPatternExpressionWhereClause :: (Maybe ParenthesizedPathPatternWhereClause)}
+  deriving (Eq, Ord, Read, Show)
+_ParenthesizedPathPatternExpression = Core.Name "openGql.grammar.ParenthesizedPathPatternExpression"
+_ParenthesizedPathPatternExpression_subpathDeclaration = Core.Name "subpathDeclaration"
+_ParenthesizedPathPatternExpression_pathMode = Core.Name "pathMode"
+_ParenthesizedPathPatternExpression_expression = Core.Name "expression"
+_ParenthesizedPathPatternExpression_whereClause = Core.Name "whereClause"
+type SubpathVariableDeclaration = SubpathVariable
+_SubpathVariableDeclaration = Core.Name "openGql.grammar.SubpathVariableDeclaration"
+type ParenthesizedPathPatternWhereClause = SearchCondition
+_ParenthesizedPathPatternWhereClause = Core.Name "openGql.grammar.ParenthesizedPathPatternWhereClause"
+data LabelExpression =
+  LabelExpressionNegation LabelExpression |
+  LabelExpressionConjunction ConjunctionLabelExpression |
+  LabelExpressionDisjunction DisjunctionLabelExpression |
+  LabelExpressionName LabelName |
+  LabelExpressionWildcard |
+  LabelExpressionParenthesized LabelExpression
+  deriving (Eq, Ord, Read, Show)
+_LabelExpression = Core.Name "openGql.grammar.LabelExpression"
+_LabelExpression_negation = Core.Name "negation"
+_LabelExpression_conjunction = Core.Name "conjunction"
+_LabelExpression_disjunction = Core.Name "disjunction"
+_LabelExpression_name = Core.Name "name"
+_LabelExpression_wildcard = Core.Name "wildcard"
+_LabelExpression_parenthesized = Core.Name "parenthesized"
+data ConjunctionLabelExpression =
+  ConjunctionLabelExpression {
+    conjunctionLabelExpressionLeft :: LabelExpression,
+    conjunctionLabelExpressionRight :: LabelExpression}
+  deriving (Eq, Ord, Read, Show)
+_ConjunctionLabelExpression = Core.Name "openGql.grammar.ConjunctionLabelExpression"
+_ConjunctionLabelExpression_left = Core.Name "left"
+_ConjunctionLabelExpression_right = Core.Name "right"
+data DisjunctionLabelExpression =
+  DisjunctionLabelExpression {
+    disjunctionLabelExpressionLeft :: LabelExpression,
+    disjunctionLabelExpressionRight :: LabelExpression}
+  deriving (Eq, Ord, Read, Show)
+_DisjunctionLabelExpression = Core.Name "openGql.grammar.DisjunctionLabelExpression"
+_DisjunctionLabelExpression_left = Core.Name "left"
+_DisjunctionLabelExpression_right = Core.Name "right"
+type PathVariableReference = BindingVariableReference
+_PathVariableReference = Core.Name "openGql.grammar.PathVariableReference"
+type ElementVariableReference = BindingVariableReference
+_ElementVariableReference = Core.Name "openGql.grammar.ElementVariableReference"
+data GraphPatternQuantifier =
+  GraphPatternQuantifierAsterisk |
+  GraphPatternQuantifierPlusSign |
+  GraphPatternQuantifierFixed FixedQuantifier |
+  GraphPatternQuantifierGeneral GeneralQuantifier
+  deriving (Eq, Ord, Read, Show)
+_GraphPatternQuantifier = Core.Name "openGql.grammar.GraphPatternQuantifier"
+_GraphPatternQuantifier_asterisk = Core.Name "asterisk"
+_GraphPatternQuantifier_plusSign = Core.Name "plusSign"
+_GraphPatternQuantifier_fixed = Core.Name "fixed"
+_GraphPatternQuantifier_general = Core.Name "general"
+type FixedQuantifier = UnsignedInteger
+_FixedQuantifier = Core.Name "openGql.grammar.FixedQuantifier"
+data GeneralQuantifier =
+  GeneralQuantifier {
+    generalQuantifierLowerBound :: (Maybe LowerBound),
+    generalQuantifierUpperBound :: (Maybe UpperBound)}
+  deriving (Eq, Ord, Read, Show)
+_GeneralQuantifier = Core.Name "openGql.grammar.GeneralQuantifier"
+_GeneralQuantifier_lowerBound = Core.Name "lowerBound"
+_GeneralQuantifier_upperBound = Core.Name "upperBound"
+type LowerBound = UnsignedInteger
+_LowerBound = Core.Name "openGql.grammar.LowerBound"
+type UpperBound = UnsignedInteger
+_UpperBound = Core.Name "openGql.grammar.UpperBound"
+data SimplifiedPathPatternExpression =
+  SimplifiedPathPatternExpressionLeft SimplifiedDefaultingLeft |
+  SimplifiedPathPatternExpressionUndirected SimplifiedDefaultingUndirected |
+  SimplifiedPathPatternExpressionRight SimplifiedDefaultingRight |
+  SimplifiedPathPatternExpressionLeftOrUndirected SimplifiedDefaultingLeftOrUndirected |
+  SimplifiedPathPatternExpressionUndirectedOrRight SimplifiedDefaultingUndirectedOrRight |
+  SimplifiedPathPatternExpressionLeftOrRight SimplifiedDefaultingLeftOrRight |
+  SimplifiedPathPatternExpressionAnyDirection SimplifiedDefaultingAnyDirection
+  deriving (Eq, Ord, Read, Show)
+_SimplifiedPathPatternExpression = Core.Name "openGql.grammar.SimplifiedPathPatternExpression"
+_SimplifiedPathPatternExpression_left = Core.Name "left"
+_SimplifiedPathPatternExpression_undirected = Core.Name "undirected"
+_SimplifiedPathPatternExpression_right = Core.Name "right"
+_SimplifiedPathPatternExpression_leftOrUndirected = Core.Name "leftOrUndirected"
+_SimplifiedPathPatternExpression_undirectedOrRight = Core.Name "undirectedOrRight"
+_SimplifiedPathPatternExpression_leftOrRight = Core.Name "leftOrRight"
+_SimplifiedPathPatternExpression_anyDirection = Core.Name "anyDirection"
+type SimplifiedDefaultingLeft = SimplifiedContents
+_SimplifiedDefaultingLeft = Core.Name "openGql.grammar.SimplifiedDefaultingLeft"
+type SimplifiedDefaultingUndirected = SimplifiedContents
+_SimplifiedDefaultingUndirected = Core.Name "openGql.grammar.SimplifiedDefaultingUndirected"
+type SimplifiedDefaultingRight = SimplifiedContents
+_SimplifiedDefaultingRight = Core.Name "openGql.grammar.SimplifiedDefaultingRight"
+type SimplifiedDefaultingLeftOrUndirected = SimplifiedContents
+_SimplifiedDefaultingLeftOrUndirected = Core.Name "openGql.grammar.SimplifiedDefaultingLeftOrUndirected"
+type SimplifiedDefaultingUndirectedOrRight = SimplifiedContents
+_SimplifiedDefaultingUndirectedOrRight = Core.Name "openGql.grammar.SimplifiedDefaultingUndirectedOrRight"
+type SimplifiedDefaultingLeftOrRight = SimplifiedContents
+_SimplifiedDefaultingLeftOrRight = Core.Name "openGql.grammar.SimplifiedDefaultingLeftOrRight"
+type SimplifiedDefaultingAnyDirection = SimplifiedContents
+_SimplifiedDefaultingAnyDirection = Core.Name "openGql.grammar.SimplifiedDefaultingAnyDirection"
+data SimplifiedContents =
+  SimplifiedContentsTerm SimplifiedTerm |
+  SimplifiedContentsPathUnion SimplifiedPathUnion |
+  SimplifiedContentsMultisetAlternation SimplifiedMultisetAlternation
+  deriving (Eq, Ord, Read, Show)
+_SimplifiedContents = Core.Name "openGql.grammar.SimplifiedContents"
+_SimplifiedContents_term = Core.Name "term"
+_SimplifiedContents_pathUnion = Core.Name "pathUnion"
+_SimplifiedContents_multisetAlternation = Core.Name "multisetAlternation"
+type SimplifiedPathUnion = [SimplifiedTerm]
+_SimplifiedPathUnion = Core.Name "openGql.grammar.SimplifiedPathUnion"
+type SimplifiedMultisetAlternation = [SimplifiedTerm]
+_SimplifiedMultisetAlternation = Core.Name "openGql.grammar.SimplifiedMultisetAlternation"
+data SimplifiedTerm =
+  SimplifiedTermFactorLow SimplifiedFactorLow |
+  SimplifiedTermConcatenation SimplifiedConcatenation
+  deriving (Eq, Ord, Read, Show)
+_SimplifiedTerm = Core.Name "openGql.grammar.SimplifiedTerm"
+_SimplifiedTerm_factorLow = Core.Name "factorLow"
+_SimplifiedTerm_concatenation = Core.Name "concatenation"
+data SimplifiedConcatenation =
+  SimplifiedConcatenation {
+    simplifiedConcatenationInitialTerm :: SimplifiedTerm,
+    simplifiedConcatenationNextFactor :: SimplifiedFactorLow}
+  deriving (Eq, Ord, Read, Show)
+_SimplifiedConcatenation = Core.Name "openGql.grammar.SimplifiedConcatenation"
+_SimplifiedConcatenation_initialTerm = Core.Name "initialTerm"
+_SimplifiedConcatenation_nextFactor = Core.Name "nextFactor"
+data SimplifiedFactorLow =
+  SimplifiedFactorLowFactorHigh SimplifiedFactorHigh |
+  SimplifiedFactorLowConjunction SimplifiedConjunction
+  deriving (Eq, Ord, Read, Show)
+_SimplifiedFactorLow = Core.Name "openGql.grammar.SimplifiedFactorLow"
+_SimplifiedFactorLow_factorHigh = Core.Name "factorHigh"
+_SimplifiedFactorLow_conjunction = Core.Name "conjunction"
+data SimplifiedConjunction =
+  SimplifiedConjunction {
+    simplifiedConjunctionLeft :: SimplifiedFactorLow,
+    simplifiedConjunctionRight :: SimplifiedFactorHigh}
+  deriving (Eq, Ord, Read, Show)
+_SimplifiedConjunction = Core.Name "openGql.grammar.SimplifiedConjunction"
+_SimplifiedConjunction_left = Core.Name "left"
+_SimplifiedConjunction_right = Core.Name "right"
+data SimplifiedFactorHigh =
+  SimplifiedFactorHighTertiary SimplifiedTertiary |
+  SimplifiedFactorHighQuantified SimplifiedQuantified |
+  SimplifiedFactorHighQuestioned SimplifiedQuestioned
+  deriving (Eq, Ord, Read, Show)
+_SimplifiedFactorHigh = Core.Name "openGql.grammar.SimplifiedFactorHigh"
+_SimplifiedFactorHigh_tertiary = Core.Name "tertiary"
+_SimplifiedFactorHigh_quantified = Core.Name "quantified"
+_SimplifiedFactorHigh_questioned = Core.Name "questioned"
+data SimplifiedQuantified =
+  SimplifiedQuantified {
+    simplifiedQuantifiedTertiary :: SimplifiedTertiary,
+    simplifiedQuantifiedQuantifier :: GraphPatternQuantifier}
+  deriving (Eq, Ord, Read, Show)
+_SimplifiedQuantified = Core.Name "openGql.grammar.SimplifiedQuantified"
+_SimplifiedQuantified_tertiary = Core.Name "tertiary"
+_SimplifiedQuantified_quantifier = Core.Name "quantifier"
+type SimplifiedQuestioned = SimplifiedTertiary
+_SimplifiedQuestioned = Core.Name "openGql.grammar.SimplifiedQuestioned"
+data SimplifiedTertiary =
+  SimplifiedTertiaryDirectionOverride SimplifiedDirectionOverride |
+  SimplifiedTertiarySecondary SimplifiedSecondary
+  deriving (Eq, Ord, Read, Show)
+_SimplifiedTertiary = Core.Name "openGql.grammar.SimplifiedTertiary"
+_SimplifiedTertiary_directionOverride = Core.Name "directionOverride"
+_SimplifiedTertiary_secondary = Core.Name "secondary"
+data SimplifiedDirectionOverride =
+  SimplifiedDirectionOverrideOverrideLeft SimplifiedOverrideLeft |
+  SimplifiedDirectionOverrideOverrideUndirected SimplifiedOverrideUndirected |
+  SimplifiedDirectionOverrideOverrideRight SimplifiedOverrideRight |
+  SimplifiedDirectionOverrideOverrideLeftOrUndirected SimplifiedOverrideLeftOrUndirected |
+  SimplifiedDirectionOverrideOverrideUndirectedOrRight SimplifiedOverrideUndirectedOrRight |
+  SimplifiedDirectionOverrideOverrideLeftOrRight SimplifiedOverrideLeftOrRight |
+  SimplifiedDirectionOverrideOverrideAnyDirection SimplifiedOverrideAnyDirection
+  deriving (Eq, Ord, Read, Show)
+_SimplifiedDirectionOverride = Core.Name "openGql.grammar.SimplifiedDirectionOverride"
+_SimplifiedDirectionOverride_overrideLeft = Core.Name "overrideLeft"
+_SimplifiedDirectionOverride_overrideUndirected = Core.Name "overrideUndirected"
+_SimplifiedDirectionOverride_overrideRight = Core.Name "overrideRight"
+_SimplifiedDirectionOverride_overrideLeftOrUndirected = Core.Name "overrideLeftOrUndirected"
+_SimplifiedDirectionOverride_overrideUndirectedOrRight = Core.Name "overrideUndirectedOrRight"
+_SimplifiedDirectionOverride_overrideLeftOrRight = Core.Name "overrideLeftOrRight"
+_SimplifiedDirectionOverride_overrideAnyDirection = Core.Name "overrideAnyDirection"
+type SimplifiedOverrideLeft = SimplifiedSecondary
+_SimplifiedOverrideLeft = Core.Name "openGql.grammar.SimplifiedOverrideLeft"
+type SimplifiedOverrideUndirected = SimplifiedSecondary
+_SimplifiedOverrideUndirected = Core.Name "openGql.grammar.SimplifiedOverrideUndirected"
+type SimplifiedOverrideRight = SimplifiedSecondary
+_SimplifiedOverrideRight = Core.Name "openGql.grammar.SimplifiedOverrideRight"
+type SimplifiedOverrideLeftOrUndirected = SimplifiedSecondary
+_SimplifiedOverrideLeftOrUndirected = Core.Name "openGql.grammar.SimplifiedOverrideLeftOrUndirected"
+type SimplifiedOverrideUndirectedOrRight = SimplifiedSecondary
+_SimplifiedOverrideUndirectedOrRight = Core.Name "openGql.grammar.SimplifiedOverrideUndirectedOrRight"
+type SimplifiedOverrideLeftOrRight = SimplifiedSecondary
+_SimplifiedOverrideLeftOrRight = Core.Name "openGql.grammar.SimplifiedOverrideLeftOrRight"
+type SimplifiedOverrideAnyDirection = SimplifiedSecondary
+_SimplifiedOverrideAnyDirection = Core.Name "openGql.grammar.SimplifiedOverrideAnyDirection"
+data SimplifiedSecondary =
+  SimplifiedSecondaryPrimary SimplifiedPrimary |
+  SimplifiedSecondaryNegation SimplifiedNegation
+  deriving (Eq, Ord, Read, Show)
+_SimplifiedSecondary = Core.Name "openGql.grammar.SimplifiedSecondary"
+_SimplifiedSecondary_primary = Core.Name "primary"
+_SimplifiedSecondary_negation = Core.Name "negation"
+type SimplifiedNegation = SimplifiedPrimary
+_SimplifiedNegation = Core.Name "openGql.grammar.SimplifiedNegation"
+data SimplifiedPrimary =
+  SimplifiedPrimaryLabelName LabelName |
+  SimplifiedPrimaryParenthesizedContents SimplifiedContents
+  deriving (Eq, Ord, Read, Show)
+_SimplifiedPrimary = Core.Name "openGql.grammar.SimplifiedPrimary"
+_SimplifiedPrimary_labelName = Core.Name "labelName"
+_SimplifiedPrimary_parenthesizedContents = Core.Name "parenthesizedContents"
+type WhereClause = SearchCondition
+_WhereClause = Core.Name "openGql.grammar.WhereClause"
+type YieldClause = YieldItemList
+_YieldClause = Core.Name "openGql.grammar.YieldClause"
+type YieldItemList = [YieldItem]
+_YieldItemList = Core.Name "openGql.grammar.YieldItemList"
+data YieldItem =
+  YieldItem {
+    yieldItemName :: YieldItemName,
+    yieldItemAlias :: (Maybe YieldItemAlias)}
+  deriving (Eq, Ord, Read, Show)
+_YieldItem = Core.Name "openGql.grammar.YieldItem"
+_YieldItem_name = Core.Name "name"
+_YieldItem_alias = Core.Name "alias"
+type YieldItemName = FieldName
+_YieldItemName = Core.Name "openGql.grammar.YieldItemName"
+type YieldItemAlias = BindingVariable
+_YieldItemAlias = Core.Name "openGql.grammar.YieldItemAlias"
+type GroupByClause = GroupingElementList
+_GroupByClause = Core.Name "openGql.grammar.GroupByClause"
+data GroupingElementList =
+  GroupingElementListElements [GroupingElement] |
+  GroupingElementListEmptySet
+  deriving (Eq, Ord, Read, Show)
+_GroupingElementList = Core.Name "openGql.grammar.GroupingElementList"
+_GroupingElementList_elements = Core.Name "elements"
+_GroupingElementList_emptySet = Core.Name "emptySet"
+type GroupingElement = BindingVariableReference
+_GroupingElement = Core.Name "openGql.grammar.GroupingElement"
+type OrderByClause = SortSpecificationList
+_OrderByClause = Core.Name "openGql.grammar.OrderByClause"
+type SortSpecificationList = [SortSpecification]
+_SortSpecificationList = Core.Name "openGql.grammar.SortSpecificationList"
+data SortSpecification =
+  SortSpecification {
+    sortSpecificationSortKey :: SortKey,
+    sortSpecificationOrdering :: (Maybe OrderingSpecification),
+    sortSpecificationNullOrdering :: (Maybe NullOrdering)}
+  deriving (Eq, Ord, Read, Show)
+_SortSpecification = Core.Name "openGql.grammar.SortSpecification"
+_SortSpecification_sortKey = Core.Name "sortKey"
+_SortSpecification_ordering = Core.Name "ordering"
+_SortSpecification_nullOrdering = Core.Name "nullOrdering"
+type SortKey = AggregatingValueExpression
+_SortKey = Core.Name "openGql.grammar.SortKey"
+data OrderingSpecification =
+  OrderingSpecificationAscending |
+  OrderingSpecificationDescending
+  deriving (Eq, Ord, Read, Show)
+_OrderingSpecification = Core.Name "openGql.grammar.OrderingSpecification"
+_OrderingSpecification_ascending = Core.Name "ascending"
+_OrderingSpecification_descending = Core.Name "descending"
+data NullOrdering =
+  NullOrderingNullsFirst |
+  NullOrderingNullsLast
+  deriving (Eq, Ord, Read, Show)
+_NullOrdering = Core.Name "openGql.grammar.NullOrdering"
+_NullOrdering_nullsFirst = Core.Name "nullsFirst"
+_NullOrdering_nullsLast = Core.Name "nullsLast"
+type LimitClause = NonNegativeIntegerSpecification
+_LimitClause = Core.Name "openGql.grammar.LimitClause"
+data OffsetClause =
+  OffsetClause {
+    offsetClauseSynonym :: OffsetSynonym,
+    offsetClauseValue :: NonNegativeIntegerSpecification}
+  deriving (Eq, Ord, Read, Show)
+_OffsetClause = Core.Name "openGql.grammar.OffsetClause"
+_OffsetClause_synonym = Core.Name "synonym"
+_OffsetClause_value = Core.Name "value"
+data OffsetSynonym =
+  OffsetSynonymOffset |
+  OffsetSynonymSkipReservedWord
+  deriving (Eq, Ord, Read, Show)
+_OffsetSynonym = Core.Name "openGql.grammar.OffsetSynonym"
+_OffsetSynonym_offset = Core.Name "offset"
+_OffsetSynonym_skipReservedWord = Core.Name "skipReservedWord"
+data SchemaReference =
+  SchemaReferenceAbsoluteReference AbsoluteCatalogSchemaReference |
+  SchemaReferenceRelativeReference RelativeCatalogSchemaReference |
+  SchemaReferenceParameterSpecification ReferenceParameterSpecification
+  deriving (Eq, Ord, Read, Show)
+_SchemaReference = Core.Name "openGql.grammar.SchemaReference"
+_SchemaReference_absoluteReference = Core.Name "absoluteReference"
+_SchemaReference_relativeReference = Core.Name "relativeReference"
+_SchemaReference_parameterSpecification = Core.Name "parameterSpecification"
+data AbsoluteCatalogSchemaReference =
+  AbsoluteCatalogSchemaReferenceRoot |
+  AbsoluteCatalogSchemaReferenceDirectoryAndSchema AbsoluteDirectoryAndSchema
+  deriving (Eq, Ord, Read, Show)
+_AbsoluteCatalogSchemaReference = Core.Name "openGql.grammar.AbsoluteCatalogSchemaReference"
+_AbsoluteCatalogSchemaReference_root = Core.Name "root"
+_AbsoluteCatalogSchemaReference_directoryAndSchema = Core.Name "directoryAndSchema"
+data AbsoluteDirectoryAndSchema =
+  AbsoluteDirectoryAndSchema {
+    absoluteDirectoryAndSchemaDirectoryPath :: AbsoluteDirectoryPath,
+    absoluteDirectoryAndSchemaSchemaName :: SchemaName}
+  deriving (Eq, Ord, Read, Show)
+_AbsoluteDirectoryAndSchema = Core.Name "openGql.grammar.AbsoluteDirectoryAndSchema"
+_AbsoluteDirectoryAndSchema_directoryPath = Core.Name "directoryPath"
+_AbsoluteDirectoryAndSchema_schemaName = Core.Name "schemaName"
+type CatalogSchemaParentAndName = AbsoluteDirectoryAndSchema
+_CatalogSchemaParentAndName = Core.Name "openGql.grammar.CatalogSchemaParentAndName"
+data RelativeCatalogSchemaReference =
+  RelativeCatalogSchemaReferencePredefinedReference PredefinedSchemaReference |
+  RelativeCatalogSchemaReferenceDirectoryAndSchema RelativeDirectoryAndSchema
+  deriving (Eq, Ord, Read, Show)
+_RelativeCatalogSchemaReference = Core.Name "openGql.grammar.RelativeCatalogSchemaReference"
+_RelativeCatalogSchemaReference_predefinedReference = Core.Name "predefinedReference"
+_RelativeCatalogSchemaReference_directoryAndSchema = Core.Name "directoryAndSchema"
+data RelativeDirectoryAndSchema =
+  RelativeDirectoryAndSchema {
+    relativeDirectoryAndSchemaDirectoryPath :: RelativeDirectoryPath,
+    relativeDirectoryAndSchemaSchemaName :: SchemaName}
+  deriving (Eq, Ord, Read, Show)
+_RelativeDirectoryAndSchema = Core.Name "openGql.grammar.RelativeDirectoryAndSchema"
+_RelativeDirectoryAndSchema_directoryPath = Core.Name "directoryPath"
+_RelativeDirectoryAndSchema_schemaName = Core.Name "schemaName"
+data PredefinedSchemaReference =
+  PredefinedSchemaReferenceHomeSchema |
+  PredefinedSchemaReferenceCurrentSchema |
+  PredefinedSchemaReferencePeriod
+  deriving (Eq, Ord, Read, Show)
+_PredefinedSchemaReference = Core.Name "openGql.grammar.PredefinedSchemaReference"
+_PredefinedSchemaReference_homeSchema = Core.Name "homeSchema"
+_PredefinedSchemaReference_currentSchema = Core.Name "currentSchema"
+_PredefinedSchemaReference_period = Core.Name "period"
+type AbsoluteDirectoryPath = (Maybe SimpleDirectoryPath)
+_AbsoluteDirectoryPath = Core.Name "openGql.grammar.AbsoluteDirectoryPath"
+data RelativeDirectoryPath =
+  RelativeDirectoryPath {
+    relativeDirectoryPathParentDirectories :: Int,
+    relativeDirectoryPathSimplePath :: (Maybe SimpleDirectoryPath)}
+  deriving (Eq, Ord, Read, Show)
+_RelativeDirectoryPath = Core.Name "openGql.grammar.RelativeDirectoryPath"
+_RelativeDirectoryPath_parentDirectories = Core.Name "parentDirectories"
+_RelativeDirectoryPath_simplePath = Core.Name "simplePath"
+type SimpleDirectoryPath = [DirectoryName]
+_SimpleDirectoryPath = Core.Name "openGql.grammar.SimpleDirectoryPath"
+data GraphReference =
+  GraphReferenceParentAndGraphName ParentAndGraphName |
+  GraphReferenceDelimitedGraphName DelimitedGraphName |
+  GraphReferenceHomeGraph HomeGraph |
+  GraphReferenceParameterSpecification ReferenceParameterSpecification
+  deriving (Eq, Ord, Read, Show)
+_GraphReference = Core.Name "openGql.grammar.GraphReference"
+_GraphReference_parentAndGraphName = Core.Name "parentAndGraphName"
+_GraphReference_delimitedGraphName = Core.Name "delimitedGraphName"
+_GraphReference_homeGraph = Core.Name "homeGraph"
+_GraphReference_parameterSpecification = Core.Name "parameterSpecification"
+data ParentAndGraphName =
+  ParentAndGraphName {
+    parentAndGraphNameParentReference :: CatalogObjectParentReference,
+    parentAndGraphNameGraphName :: GraphName}
+  deriving (Eq, Ord, Read, Show)
+_ParentAndGraphName = Core.Name "openGql.grammar.ParentAndGraphName"
+_ParentAndGraphName_parentReference = Core.Name "parentReference"
+_ParentAndGraphName_graphName = Core.Name "graphName"
+data CatalogGraphParentAndName =
+  CatalogGraphParentAndName {
+    catalogGraphParentAndNameParentReference :: (Maybe CatalogObjectParentReference),
+    catalogGraphParentAndNameGraphName :: GraphName}
+  deriving (Eq, Ord, Read, Show)
+_CatalogGraphParentAndName = Core.Name "openGql.grammar.CatalogGraphParentAndName"
+_CatalogGraphParentAndName_parentReference = Core.Name "parentReference"
+_CatalogGraphParentAndName_graphName = Core.Name "graphName"
+data HomeGraph =
+  HomeGraphHomePropertyGraph |
+  HomeGraphHomeGraph
+  deriving (Eq, Ord, Read, Show)
+_HomeGraph = Core.Name "openGql.grammar.HomeGraph"
+_HomeGraph_homePropertyGraph = Core.Name "homePropertyGraph"
+_HomeGraph_homeGraph = Core.Name "homeGraph"
+data GraphTypeReference =
+  GraphTypeReferenceParentAndTypeName CatalogGraphTypeParentAndName |
+  GraphTypeReferenceParameterSpecification ReferenceParameterSpecification
+  deriving (Eq, Ord, Read, Show)
+_GraphTypeReference = Core.Name "openGql.grammar.GraphTypeReference"
+_GraphTypeReference_parentAndTypeName = Core.Name "parentAndTypeName"
+_GraphTypeReference_parameterSpecification = Core.Name "parameterSpecification"
+data CatalogGraphTypeParentAndName =
+  CatalogGraphTypeParentAndName {
+    catalogGraphTypeParentAndNameParentReference :: (Maybe CatalogObjectParentReference),
+    catalogGraphTypeParentAndNameGraphTypeName :: GraphTypeName}
+  deriving (Eq, Ord, Read, Show)
+_CatalogGraphTypeParentAndName = Core.Name "openGql.grammar.CatalogGraphTypeParentAndName"
+_CatalogGraphTypeParentAndName_parentReference = Core.Name "parentReference"
+_CatalogGraphTypeParentAndName_graphTypeName = Core.Name "graphTypeName"
+data BindingTableReference =
+  BindingTableReferenceParentAndTableName ParentAndTableName |
+  BindingTableReferenceDelimitedBindingTableName DelimitedBindingTableName |
+  BindingTableReferenceParameterSpecification ReferenceParameterSpecification
+  deriving (Eq, Ord, Read, Show)
+_BindingTableReference = Core.Name "openGql.grammar.BindingTableReference"
+_BindingTableReference_parentAndTableName = Core.Name "parentAndTableName"
+_BindingTableReference_delimitedBindingTableName = Core.Name "delimitedBindingTableName"
+_BindingTableReference_parameterSpecification = Core.Name "parameterSpecification"
+data ParentAndTableName =
+  ParentAndTableName {
+    parentAndTableNameParentReference :: CatalogObjectParentReference,
+    parentAndTableNameTableName :: BindingTableName}
+  deriving (Eq, Ord, Read, Show)
+_ParentAndTableName = Core.Name "openGql.grammar.ParentAndTableName"
+_ParentAndTableName_parentReference = Core.Name "parentReference"
+_ParentAndTableName_tableName = Core.Name "tableName"
+data ProcedureReference =
+  ProcedureReferenceParentAndProcedureName CatalogProcedureParentAndName |
+  ProcedureReferenceParameterSpecification ReferenceParameterSpecification
+  deriving (Eq, Ord, Read, Show)
+_ProcedureReference = Core.Name "openGql.grammar.ProcedureReference"
+_ProcedureReference_parentAndProcedureName = Core.Name "parentAndProcedureName"
+_ProcedureReference_parameterSpecification = Core.Name "parameterSpecification"
+data CatalogProcedureParentAndName =
+  CatalogProcedureParentAndName {
+    catalogProcedureParentAndNameParentReference :: (Maybe CatalogObjectParentReference),
+    catalogProcedureParentAndNameProcedureName :: ProcedureName}
+  deriving (Eq, Ord, Read, Show)
+_CatalogProcedureParentAndName = Core.Name "openGql.grammar.CatalogProcedureParentAndName"
+_CatalogProcedureParentAndName_parentReference = Core.Name "parentReference"
+_CatalogProcedureParentAndName_procedureName = Core.Name "procedureName"
+data CatalogObjectParentReference =
+  CatalogObjectParentReferenceSchemaAndObjects SchemaAndObjects |
+  CatalogObjectParentReferenceObjectsOnly [ObjectName]
+  deriving (Eq, Ord, Read, Show)
+_CatalogObjectParentReference = Core.Name "openGql.grammar.CatalogObjectParentReference"
+_CatalogObjectParentReference_schemaAndObjects = Core.Name "schemaAndObjects"
+_CatalogObjectParentReference_objectsOnly = Core.Name "objectsOnly"
+data SchemaAndObjects =
+  SchemaAndObjects {
+    schemaAndObjectsSchemaReference :: SchemaReference,
+    schemaAndObjectsObjects :: [ObjectName]}
+  deriving (Eq, Ord, Read, Show)
+_SchemaAndObjects = Core.Name "openGql.grammar.SchemaAndObjects"
+_SchemaAndObjects_schemaReference = Core.Name "schemaReference"
+_SchemaAndObjects_objects = Core.Name "objects"
+type ReferenceParameterSpecification = ()
+_ReferenceParameterSpecification = Core.Name "openGql.grammar.ReferenceParameterSpecification"
+type NestedGraphTypeSpecification = GraphTypeSpecificationBody
+_NestedGraphTypeSpecification = Core.Name "openGql.grammar.NestedGraphTypeSpecification"
+type GraphTypeSpecificationBody = ElementTypeList
+_GraphTypeSpecificationBody = Core.Name "openGql.grammar.GraphTypeSpecificationBody"
+type ElementTypeList = [ElementTypeSpecification]
+_ElementTypeList = Core.Name "openGql.grammar.ElementTypeList"
+data ElementTypeSpecification =
+  ElementTypeSpecificationNodeType NodeTypeSpecification |
+  ElementTypeSpecificationEdgeType EdgeTypeSpecification
+  deriving (Eq, Ord, Read, Show)
+_ElementTypeSpecification = Core.Name "openGql.grammar.ElementTypeSpecification"
+_ElementTypeSpecification_nodeType = Core.Name "nodeType"
+_ElementTypeSpecification_edgeType = Core.Name "edgeType"
+data NodeTypeSpecification =
+  NodeTypeSpecificationPattern NodeTypePattern |
+  NodeTypeSpecificationPhrase NodeTypePhrase
+  deriving (Eq, Ord, Read, Show)
+_NodeTypeSpecification = Core.Name "openGql.grammar.NodeTypeSpecification"
+_NodeTypeSpecification_pattern = Core.Name "pattern"
+_NodeTypeSpecification_phrase = Core.Name "phrase"
+data NodeTypePattern =
+  NodeTypePattern {
+    nodeTypePatternSynonymAndTypeName :: (Maybe NodeSynonymAndTypeName),
+    nodeTypePatternAlias :: (Maybe LocalNodeTypeAlias),
+    nodeTypePatternFiller :: (Maybe NodeTypeFiller)}
+  deriving (Eq, Ord, Read, Show)
+_NodeTypePattern = Core.Name "openGql.grammar.NodeTypePattern"
+_NodeTypePattern_synonymAndTypeName = Core.Name "synonymAndTypeName"
+_NodeTypePattern_alias = Core.Name "alias"
+_NodeTypePattern_filler = Core.Name "filler"
+data NodeSynonymAndTypeName =
+  NodeSynonymAndTypeName {
+    nodeSynonymAndTypeNameNodeSynonym :: NodeSynonym,
+    nodeSynonymAndTypeNameTypeName :: (Maybe NodeTypeName)}
+  deriving (Eq, Ord, Read, Show)
+_NodeSynonymAndTypeName = Core.Name "openGql.grammar.NodeSynonymAndTypeName"
+_NodeSynonymAndTypeName_nodeSynonym = Core.Name "nodeSynonym"
+_NodeSynonymAndTypeName_typeName = Core.Name "typeName"
+data NodeTypePhrase =
+  NodeTypePhrase {
+    nodeTypePhraseSynonym :: NodeSynonym,
+    nodeTypePhraseTypePhraseFiller :: NodeTypePhraseFiller,
+    nodeTypePhraseAlias :: (Maybe LocalNodeTypeAlias)}
+  deriving (Eq, Ord, Read, Show)
+_NodeTypePhrase = Core.Name "openGql.grammar.NodeTypePhrase"
+_NodeTypePhrase_synonym = Core.Name "synonym"
+_NodeTypePhrase_typePhraseFiller = Core.Name "typePhraseFiller"
+_NodeTypePhrase_alias = Core.Name "alias"
+data NodeTypePhraseFiller =
+  NodeTypePhraseFillerTypeName NodeTypeNameWithFiller |
+  NodeTypePhraseFillerFillerOnly NodeTypeFiller
+  deriving (Eq, Ord, Read, Show)
+_NodeTypePhraseFiller = Core.Name "openGql.grammar.NodeTypePhraseFiller"
+_NodeTypePhraseFiller_typeName = Core.Name "typeName"
+_NodeTypePhraseFiller_fillerOnly = Core.Name "fillerOnly"
+data NodeTypeNameWithFiller =
+  NodeTypeNameWithFiller {
+    nodeTypeNameWithFillerTypeName :: NodeTypeName,
+    nodeTypeNameWithFillerFiller :: (Maybe NodeTypeFiller)}
+  deriving (Eq, Ord, Read, Show)
+_NodeTypeNameWithFiller = Core.Name "openGql.grammar.NodeTypeNameWithFiller"
+_NodeTypeNameWithFiller_typeName = Core.Name "typeName"
+_NodeTypeNameWithFiller_filler = Core.Name "filler"
+data NodeTypeFiller =
+  NodeTypeFillerKeyLabelSet NodeKeyLabelSetWithContent |
+  NodeTypeFillerImpliedContent NodeTypeImpliedContent
+  deriving (Eq, Ord, Read, Show)
+_NodeTypeFiller = Core.Name "openGql.grammar.NodeTypeFiller"
+_NodeTypeFiller_keyLabelSet = Core.Name "keyLabelSet"
+_NodeTypeFiller_impliedContent = Core.Name "impliedContent"
+data NodeKeyLabelSetWithContent =
+  NodeKeyLabelSetWithContent {
+    nodeKeyLabelSetWithContentKeyLabelSet :: NodeTypeKeyLabelSet,
+    nodeKeyLabelSetWithContentImpliedContent :: (Maybe NodeTypeImpliedContent)}
+  deriving (Eq, Ord, Read, Show)
+_NodeKeyLabelSetWithContent = Core.Name "openGql.grammar.NodeKeyLabelSetWithContent"
+_NodeKeyLabelSetWithContent_keyLabelSet = Core.Name "keyLabelSet"
+_NodeKeyLabelSetWithContent_impliedContent = Core.Name "impliedContent"
+type LocalNodeTypeAlias = String
+_LocalNodeTypeAlias = Core.Name "openGql.grammar.LocalNodeTypeAlias"
+data NodeTypeImpliedContent =
+  NodeTypeImpliedContentLabelSet NodeTypeLabelSet |
+  NodeTypeImpliedContentPropertyTypes NodeTypePropertyTypes |
+  NodeTypeImpliedContentLabelSetWithProperties NodeLabelSetWithProperties
+  deriving (Eq, Ord, Read, Show)
+_NodeTypeImpliedContent = Core.Name "openGql.grammar.NodeTypeImpliedContent"
+_NodeTypeImpliedContent_labelSet = Core.Name "labelSet"
+_NodeTypeImpliedContent_propertyTypes = Core.Name "propertyTypes"
+_NodeTypeImpliedContent_labelSetWithProperties = Core.Name "labelSetWithProperties"
+data NodeLabelSetWithProperties =
+  NodeLabelSetWithProperties {
+    nodeLabelSetWithPropertiesLabelSet :: NodeTypeLabelSet,
+    nodeLabelSetWithPropertiesPropertyTypes :: NodeTypePropertyTypes}
+  deriving (Eq, Ord, Read, Show)
+_NodeLabelSetWithProperties = Core.Name "openGql.grammar.NodeLabelSetWithProperties"
+_NodeLabelSetWithProperties_labelSet = Core.Name "labelSet"
+_NodeLabelSetWithProperties_propertyTypes = Core.Name "propertyTypes"
+type NodeTypeKeyLabelSet = (Maybe LabelSetPhrase)
+_NodeTypeKeyLabelSet = Core.Name "openGql.grammar.NodeTypeKeyLabelSet"
+type NodeTypeLabelSet = LabelSetPhrase
+_NodeTypeLabelSet = Core.Name "openGql.grammar.NodeTypeLabelSet"
+type NodeTypePropertyTypes = PropertyTypesSpecification
+_NodeTypePropertyTypes = Core.Name "openGql.grammar.NodeTypePropertyTypes"
+data EdgeTypeSpecification =
+  EdgeTypeSpecificationPattern EdgeTypePattern |
+  EdgeTypeSpecificationPhrase EdgeTypePhrase
+  deriving (Eq, Ord, Read, Show)
+_EdgeTypeSpecification = Core.Name "openGql.grammar.EdgeTypeSpecification"
+_EdgeTypeSpecification_pattern = Core.Name "pattern"
+_EdgeTypeSpecification_phrase = Core.Name "phrase"
+data EdgeTypePattern =
+  EdgeTypePattern {
+    edgeTypePatternKindAndSynonym :: (Maybe EdgeKindAndSynonym),
+    edgeTypePatternPatternType :: EdgeTypePatternType}
+  deriving (Eq, Ord, Read, Show)
+_EdgeTypePattern = Core.Name "openGql.grammar.EdgeTypePattern"
+_EdgeTypePattern_kindAndSynonym = Core.Name "kindAndSynonym"
+_EdgeTypePattern_patternType = Core.Name "patternType"
+data EdgeKindAndSynonym =
+  EdgeKindAndSynonym {
+    edgeKindAndSynonymKind :: (Maybe EdgeKind),
+    edgeKindAndSynonymSynonym :: EdgeSynonym,
+    edgeKindAndSynonymTypeName :: (Maybe EdgeTypeName)}
+  deriving (Eq, Ord, Read, Show)
+_EdgeKindAndSynonym = Core.Name "openGql.grammar.EdgeKindAndSynonym"
+_EdgeKindAndSynonym_kind = Core.Name "kind"
+_EdgeKindAndSynonym_synonym = Core.Name "synonym"
+_EdgeKindAndSynonym_typeName = Core.Name "typeName"
+data EdgeTypePatternType =
+  EdgeTypePatternTypeDirected EdgeTypePatternDirected |
+  EdgeTypePatternTypeUndirected EdgeTypePatternUndirected
+  deriving (Eq, Ord, Read, Show)
+_EdgeTypePatternType = Core.Name "openGql.grammar.EdgeTypePatternType"
+_EdgeTypePatternType_directed = Core.Name "directed"
+_EdgeTypePatternType_undirected = Core.Name "undirected"
+data EdgeTypePhrase =
+  EdgeTypePhrase {
+    edgeTypePhraseKind :: EdgeKind,
+    edgeTypePhraseSynonym :: EdgeSynonym,
+    edgeTypePhraseTypeNameAndFiller :: EdgeTypePhraseFiller,
+    edgeTypePhraseEndpointPair :: EndpointPairPhrase}
+  deriving (Eq, Ord, Read, Show)
+_EdgeTypePhrase = Core.Name "openGql.grammar.EdgeTypePhrase"
+_EdgeTypePhrase_kind = Core.Name "kind"
+_EdgeTypePhrase_synonym = Core.Name "synonym"
+_EdgeTypePhrase_typeNameAndFiller = Core.Name "typeNameAndFiller"
+_EdgeTypePhrase_endpointPair = Core.Name "endpointPair"
+data EdgeTypePhraseFiller =
+  EdgeTypePhraseFillerTypeNameWithFiller EdgeTypeNameWithFiller |
+  EdgeTypePhraseFillerFillerOnly EdgeTypeFiller
+  deriving (Eq, Ord, Read, Show)
+_EdgeTypePhraseFiller = Core.Name "openGql.grammar.EdgeTypePhraseFiller"
+_EdgeTypePhraseFiller_typeNameWithFiller = Core.Name "typeNameWithFiller"
+_EdgeTypePhraseFiller_fillerOnly = Core.Name "fillerOnly"
+data EdgeTypeNameWithFiller =
+  EdgeTypeNameWithFiller {
+    edgeTypeNameWithFillerTypeName :: EdgeTypeName,
+    edgeTypeNameWithFillerFiller :: (Maybe EdgeTypeFiller)}
+  deriving (Eq, Ord, Read, Show)
+_EdgeTypeNameWithFiller = Core.Name "openGql.grammar.EdgeTypeNameWithFiller"
+_EdgeTypeNameWithFiller_typeName = Core.Name "typeName"
+_EdgeTypeNameWithFiller_filler = Core.Name "filler"
+data EdgeTypeFiller =
+  EdgeTypeFillerKeyLabelSetWithContent EdgeKeyLabelSetWithContent |
+  EdgeTypeFillerImpliedContent EdgeTypeImpliedContent
+  deriving (Eq, Ord, Read, Show)
+_EdgeTypeFiller = Core.Name "openGql.grammar.EdgeTypeFiller"
+_EdgeTypeFiller_keyLabelSetWithContent = Core.Name "keyLabelSetWithContent"
+_EdgeTypeFiller_impliedContent = Core.Name "impliedContent"
+data EdgeKeyLabelSetWithContent =
+  EdgeKeyLabelSetWithContent {
+    edgeKeyLabelSetWithContentKeyLabelSet :: EdgeTypeKeyLabelSet,
+    edgeKeyLabelSetWithContentImpliedContent :: (Maybe EdgeTypeImpliedContent)}
+  deriving (Eq, Ord, Read, Show)
+_EdgeKeyLabelSetWithContent = Core.Name "openGql.grammar.EdgeKeyLabelSetWithContent"
+_EdgeKeyLabelSetWithContent_keyLabelSet = Core.Name "keyLabelSet"
+_EdgeKeyLabelSetWithContent_impliedContent = Core.Name "impliedContent"
+data EdgeTypeImpliedContent =
+  EdgeTypeImpliedContentLabelSet EdgeTypeLabelSet |
+  EdgeTypeImpliedContentPropertyTypes EdgeTypePropertyTypes |
+  EdgeTypeImpliedContentLabelSetWithProperties EdgeLabelSetWithProperties
+  deriving (Eq, Ord, Read, Show)
+_EdgeTypeImpliedContent = Core.Name "openGql.grammar.EdgeTypeImpliedContent"
+_EdgeTypeImpliedContent_labelSet = Core.Name "labelSet"
+_EdgeTypeImpliedContent_propertyTypes = Core.Name "propertyTypes"
+_EdgeTypeImpliedContent_labelSetWithProperties = Core.Name "labelSetWithProperties"
+data EdgeLabelSetWithProperties =
+  EdgeLabelSetWithProperties {
+    edgeLabelSetWithPropertiesLabelSet :: EdgeTypeLabelSet,
+    edgeLabelSetWithPropertiesPropertyTypes :: EdgeTypePropertyTypes}
+  deriving (Eq, Ord, Read, Show)
+_EdgeLabelSetWithProperties = Core.Name "openGql.grammar.EdgeLabelSetWithProperties"
+_EdgeLabelSetWithProperties_labelSet = Core.Name "labelSet"
+_EdgeLabelSetWithProperties_propertyTypes = Core.Name "propertyTypes"
+type EdgeTypeKeyLabelSet = (Maybe LabelSetPhrase)
+_EdgeTypeKeyLabelSet = Core.Name "openGql.grammar.EdgeTypeKeyLabelSet"
+type EdgeTypeLabelSet = LabelSetPhrase
+_EdgeTypeLabelSet = Core.Name "openGql.grammar.EdgeTypeLabelSet"
+type EdgeTypePropertyTypes = PropertyTypesSpecification
+_EdgeTypePropertyTypes = Core.Name "openGql.grammar.EdgeTypePropertyTypes"
+data EdgeTypePatternDirected =
+  EdgeTypePatternDirectedPointingRight EdgeTypePatternPointingRight |
+  EdgeTypePatternDirectedPointingLeft EdgeTypePatternPointingLeft
+  deriving (Eq, Ord, Read, Show)
+_EdgeTypePatternDirected = Core.Name "openGql.grammar.EdgeTypePatternDirected"
+_EdgeTypePatternDirected_pointingRight = Core.Name "pointingRight"
+_EdgeTypePatternDirected_pointingLeft = Core.Name "pointingLeft"
+data EdgeTypePatternPointingRight =
+  EdgeTypePatternPointingRight {
+    edgeTypePatternPointingRightSource :: SourceNodeTypeReference,
+    edgeTypePatternPointingRightArc :: ArcTypePointingRight,
+    edgeTypePatternPointingRightDestination :: DestinationNodeTypeReference}
+  deriving (Eq, Ord, Read, Show)
+_EdgeTypePatternPointingRight = Core.Name "openGql.grammar.EdgeTypePatternPointingRight"
+_EdgeTypePatternPointingRight_source = Core.Name "source"
+_EdgeTypePatternPointingRight_arc = Core.Name "arc"
+_EdgeTypePatternPointingRight_destination = Core.Name "destination"
+data EdgeTypePatternPointingLeft =
+  EdgeTypePatternPointingLeft {
+    edgeTypePatternPointingLeftDestination :: DestinationNodeTypeReference,
+    edgeTypePatternPointingLeftArc :: ArcTypePointingLeft,
+    edgeTypePatternPointingLeftSource :: SourceNodeTypeReference}
+  deriving (Eq, Ord, Read, Show)
+_EdgeTypePatternPointingLeft = Core.Name "openGql.grammar.EdgeTypePatternPointingLeft"
+_EdgeTypePatternPointingLeft_destination = Core.Name "destination"
+_EdgeTypePatternPointingLeft_arc = Core.Name "arc"
+_EdgeTypePatternPointingLeft_source = Core.Name "source"
+data EdgeTypePatternUndirected =
+  EdgeTypePatternUndirected {
+    edgeTypePatternUndirectedSource :: SourceNodeTypeReference,
+    edgeTypePatternUndirectedArc :: ArcTypeUndirected,
+    edgeTypePatternUndirectedDestination :: DestinationNodeTypeReference}
+  deriving (Eq, Ord, Read, Show)
+_EdgeTypePatternUndirected = Core.Name "openGql.grammar.EdgeTypePatternUndirected"
+_EdgeTypePatternUndirected_source = Core.Name "source"
+_EdgeTypePatternUndirected_arc = Core.Name "arc"
+_EdgeTypePatternUndirected_destination = Core.Name "destination"
+type ArcTypePointingRight = EdgeTypeFiller
+_ArcTypePointingRight = Core.Name "openGql.grammar.ArcTypePointingRight"
+type ArcTypePointingLeft = EdgeTypeFiller
+_ArcTypePointingLeft = Core.Name "openGql.grammar.ArcTypePointingLeft"
+type ArcTypeUndirected = EdgeTypeFiller
+_ArcTypeUndirected = Core.Name "openGql.grammar.ArcTypeUndirected"
+data SourceNodeTypeReference =
+  SourceNodeTypeReferenceAlias SourceNodeTypeAlias |
+  SourceNodeTypeReferenceFiller (Maybe NodeTypeFiller)
+  deriving (Eq, Ord, Read, Show)
+_SourceNodeTypeReference = Core.Name "openGql.grammar.SourceNodeTypeReference"
+_SourceNodeTypeReference_alias = Core.Name "alias"
+_SourceNodeTypeReference_filler = Core.Name "filler"
+data DestinationNodeTypeReference =
+  DestinationNodeTypeReferenceAlias DestinationNodeTypeAlias |
+  DestinationNodeTypeReferenceFiller (Maybe NodeTypeFiller)
+  deriving (Eq, Ord, Read, Show)
+_DestinationNodeTypeReference = Core.Name "openGql.grammar.DestinationNodeTypeReference"
+_DestinationNodeTypeReference_alias = Core.Name "alias"
+_DestinationNodeTypeReference_filler = Core.Name "filler"
+data EdgeKind =
+  EdgeKindDirected |
+  EdgeKindUndirected
+  deriving (Eq, Ord, Read, Show)
+_EdgeKind = Core.Name "openGql.grammar.EdgeKind"
+_EdgeKind_directed = Core.Name "directed"
+_EdgeKind_undirected = Core.Name "undirected"
+type EndpointPairPhrase = EndpointPair
+_EndpointPairPhrase = Core.Name "openGql.grammar.EndpointPairPhrase"
+data EndpointPair =
+  EndpointPairDirectedPair EndpointPairDirected |
+  EndpointPairUndirectedPair EndpointPairUndirected
+  deriving (Eq, Ord, Read, Show)
+_EndpointPair = Core.Name "openGql.grammar.EndpointPair"
+_EndpointPair_directedPair = Core.Name "directedPair"
+_EndpointPair_undirectedPair = Core.Name "undirectedPair"
+data EndpointPairDirected =
+  EndpointPairDirectedPointingRight EndpointPairPointingRight |
+  EndpointPairDirectedPointingLeft EndpointPairPointingLeft
+  deriving (Eq, Ord, Read, Show)
+_EndpointPairDirected = Core.Name "openGql.grammar.EndpointPairDirected"
+_EndpointPairDirected_pointingRight = Core.Name "pointingRight"
+_EndpointPairDirected_pointingLeft = Core.Name "pointingLeft"
+data EndpointPairPointingRight =
+  EndpointPairPointingRight {
+    endpointPairPointingRightSourceAlias :: SourceNodeTypeAlias,
+    endpointPairPointingRightConnector :: ConnectorPointingRight,
+    endpointPairPointingRightDestinationAlias :: DestinationNodeTypeAlias}
+  deriving (Eq, Ord, Read, Show)
+_EndpointPairPointingRight = Core.Name "openGql.grammar.EndpointPairPointingRight"
+_EndpointPairPointingRight_sourceAlias = Core.Name "sourceAlias"
+_EndpointPairPointingRight_connector = Core.Name "connector"
+_EndpointPairPointingRight_destinationAlias = Core.Name "destinationAlias"
+data EndpointPairPointingLeft =
+  EndpointPairPointingLeft {
+    endpointPairPointingLeftDestinationAlias :: DestinationNodeTypeAlias,
+    endpointPairPointingLeftSourceAlias :: SourceNodeTypeAlias}
+  deriving (Eq, Ord, Read, Show)
+_EndpointPairPointingLeft = Core.Name "openGql.grammar.EndpointPairPointingLeft"
+_EndpointPairPointingLeft_destinationAlias = Core.Name "destinationAlias"
+_EndpointPairPointingLeft_sourceAlias = Core.Name "sourceAlias"
+data EndpointPairUndirected =
+  EndpointPairUndirected {
+    endpointPairUndirectedSourceAlias :: SourceNodeTypeAlias,
+    endpointPairUndirectedConnector :: ConnectorUndirected,
+    endpointPairUndirectedDestinationAlias :: DestinationNodeTypeAlias}
+  deriving (Eq, Ord, Read, Show)
+_EndpointPairUndirected = Core.Name "openGql.grammar.EndpointPairUndirected"
+_EndpointPairUndirected_sourceAlias = Core.Name "sourceAlias"
+_EndpointPairUndirected_connector = Core.Name "connector"
+_EndpointPairUndirected_destinationAlias = Core.Name "destinationAlias"
+data ConnectorPointingRight =
+  ConnectorPointingRightTo |
+  ConnectorPointingRightRightArrow
+  deriving (Eq, Ord, Read, Show)
+_ConnectorPointingRight = Core.Name "openGql.grammar.ConnectorPointingRight"
+_ConnectorPointingRight_to = Core.Name "to"
+_ConnectorPointingRight_rightArrow = Core.Name "rightArrow"
+data ConnectorUndirected =
+  ConnectorUndirectedTo |
+  ConnectorUndirectedTilde
+  deriving (Eq, Ord, Read, Show)
+_ConnectorUndirected = Core.Name "openGql.grammar.ConnectorUndirected"
+_ConnectorUndirected_to = Core.Name "to"
+_ConnectorUndirected_tilde = Core.Name "tilde"
+type SourceNodeTypeAlias = String
+_SourceNodeTypeAlias = Core.Name "openGql.grammar.SourceNodeTypeAlias"
+type DestinationNodeTypeAlias = String
+_DestinationNodeTypeAlias = Core.Name "openGql.grammar.DestinationNodeTypeAlias"
+data LabelSetPhrase =
+  LabelSetPhraseSingleLabel LabelName |
+  LabelSetPhraseMultipleLabels LabelSetSpecification |
+  LabelSetPhraseIsOrColonWithLabels IsOrColonWithLabels
+  deriving (Eq, Ord, Read, Show)
+_LabelSetPhrase = Core.Name "openGql.grammar.LabelSetPhrase"
+_LabelSetPhrase_singleLabel = Core.Name "singleLabel"
+_LabelSetPhrase_multipleLabels = Core.Name "multipleLabels"
+_LabelSetPhrase_isOrColonWithLabels = Core.Name "isOrColonWithLabels"
+data IsOrColonWithLabels =
+  IsOrColonWithLabels {
+    isOrColonWithLabelsIsOrColon :: IsOrColon,
+    isOrColonWithLabelsLabels :: LabelSetSpecification}
+  deriving (Eq, Ord, Read, Show)
+_IsOrColonWithLabels = Core.Name "openGql.grammar.IsOrColonWithLabels"
+_IsOrColonWithLabels_isOrColon = Core.Name "isOrColon"
+_IsOrColonWithLabels_labels = Core.Name "labels"
+type LabelSetSpecification = [LabelName]
+_LabelSetSpecification = Core.Name "openGql.grammar.LabelSetSpecification"
+type PropertyTypesSpecification = (Maybe PropertyTypeList)
+_PropertyTypesSpecification = Core.Name "openGql.grammar.PropertyTypesSpecification"
+type PropertyTypeList = [PropertyType]
+_PropertyTypeList = Core.Name "openGql.grammar.PropertyTypeList"
+data PropertyType =
+  PropertyType {
+    propertyTypeName :: PropertyName,
+    propertyTypeTyped :: (Maybe Typed),
+    propertyTypeValueType :: PropertyValueType}
+  deriving (Eq, Ord, Read, Show)
+_PropertyType = Core.Name "openGql.grammar.PropertyType"
+_PropertyType_name = Core.Name "name"
+_PropertyType_typed = Core.Name "typed"
+_PropertyType_valueType = Core.Name "valueType"
+type PropertyValueType = ValueType
+_PropertyValueType = Core.Name "openGql.grammar.PropertyValueType"
+data BindingTableType =
+  BindingTableType {
+    bindingTableTypeBinding :: Bool,
+    bindingTableTypeFieldTypes :: FieldTypesSpecification}
+  deriving (Eq, Ord, Read, Show)
+_BindingTableType = Core.Name "openGql.grammar.BindingTableType"
+_BindingTableType_binding = Core.Name "binding"
+_BindingTableType_fieldTypes = Core.Name "fieldTypes"
+data ValueType =
+  ValueTypePredefinedType PredefinedType |
+  ValueTypePathValueType PathValueType |
+  ValueTypeListValueTypeAlt1 ListValueTypeAlt1 |
+  ValueTypeListValueTypeAlt2 ListValueTypeAlt2 |
+  ValueTypeListValueTypeAlt3 ListValueTypeAlt3 |
+  ValueTypeRecordType RecordType |
+  ValueTypeOpenDynamicUnionType OpenDynamicUnionType |
+  ValueTypeDynamicPropertyValueType DynamicPropertyValueType |
+  ValueTypeClosedDynamicUnionTypeAlt1 ClosedDynamicUnionTypeAlt1 |
+  ValueTypeClosedDynamicUnionTypeAlt2 ClosedDynamicUnionTypeAlt2
+  deriving (Eq, Ord, Read, Show)
+_ValueType = Core.Name "openGql.grammar.ValueType"
+_ValueType_predefinedType = Core.Name "predefinedType"
+_ValueType_pathValueType = Core.Name "pathValueType"
+_ValueType_listValueTypeAlt1 = Core.Name "listValueTypeAlt1"
+_ValueType_listValueTypeAlt2 = Core.Name "listValueTypeAlt2"
+_ValueType_listValueTypeAlt3 = Core.Name "listValueTypeAlt3"
+_ValueType_recordType = Core.Name "recordType"
+_ValueType_openDynamicUnionType = Core.Name "openDynamicUnionType"
+_ValueType_dynamicPropertyValueType = Core.Name "dynamicPropertyValueType"
+_ValueType_closedDynamicUnionTypeAlt1 = Core.Name "closedDynamicUnionTypeAlt1"
+_ValueType_closedDynamicUnionTypeAlt2 = Core.Name "closedDynamicUnionTypeAlt2"
+data ListValueTypeAlt1 =
+  ListValueTypeAlt1 {
+    listValueTypeAlt1TypeName :: ListValueTypeName,
+    listValueTypeAlt1ValueType :: ValueType,
+    listValueTypeAlt1MaxLength :: (Maybe MaxLength),
+    listValueTypeAlt1NotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ListValueTypeAlt1 = Core.Name "openGql.grammar.ListValueTypeAlt1"
+_ListValueTypeAlt1_typeName = Core.Name "typeName"
+_ListValueTypeAlt1_valueType = Core.Name "valueType"
+_ListValueTypeAlt1_maxLength = Core.Name "maxLength"
+_ListValueTypeAlt1_notNull = Core.Name "notNull"
+data ListValueTypeAlt2 =
+  ListValueTypeAlt2 {
+    listValueTypeAlt2ValueType :: ValueType,
+    listValueTypeAlt2TypeName :: ListValueTypeName,
+    listValueTypeAlt2MaxLength :: (Maybe MaxLength),
+    listValueTypeAlt2NotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ListValueTypeAlt2 = Core.Name "openGql.grammar.ListValueTypeAlt2"
+_ListValueTypeAlt2_valueType = Core.Name "valueType"
+_ListValueTypeAlt2_typeName = Core.Name "typeName"
+_ListValueTypeAlt2_maxLength = Core.Name "maxLength"
+_ListValueTypeAlt2_notNull = Core.Name "notNull"
+data ListValueTypeAlt3 =
+  ListValueTypeAlt3 {
+    listValueTypeAlt3TypeName :: ListValueTypeName,
+    listValueTypeAlt3MaxLength :: (Maybe MaxLength),
+    listValueTypeAlt3NotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ListValueTypeAlt3 = Core.Name "openGql.grammar.ListValueTypeAlt3"
+_ListValueTypeAlt3_typeName = Core.Name "typeName"
+_ListValueTypeAlt3_maxLength = Core.Name "maxLength"
+_ListValueTypeAlt3_notNull = Core.Name "notNull"
+data OpenDynamicUnionType =
+  OpenDynamicUnionType {
+    openDynamicUnionTypeValue :: Bool,
+    openDynamicUnionTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_OpenDynamicUnionType = Core.Name "openGql.grammar.OpenDynamicUnionType"
+_OpenDynamicUnionType_value = Core.Name "value"
+_OpenDynamicUnionType_notNull = Core.Name "notNull"
+data DynamicPropertyValueType =
+  DynamicPropertyValueType {
+    dynamicPropertyValueTypeAny :: (Maybe Bool),
+    dynamicPropertyValueTypeProperty :: (),
+    dynamicPropertyValueTypeValue :: (),
+    dynamicPropertyValueTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_DynamicPropertyValueType = Core.Name "openGql.grammar.DynamicPropertyValueType"
+_DynamicPropertyValueType_any = Core.Name "any"
+_DynamicPropertyValueType_property = Core.Name "property"
+_DynamicPropertyValueType_value = Core.Name "value"
+_DynamicPropertyValueType_notNull = Core.Name "notNull"
+data ClosedDynamicUnionTypeAlt1 =
+  ClosedDynamicUnionTypeAlt1 {
+    closedDynamicUnionTypeAlt1AnyValue :: (Maybe Bool),
+    closedDynamicUnionTypeAlt1ValueTypes :: [ValueType]}
+  deriving (Eq, Ord, Read, Show)
+_ClosedDynamicUnionTypeAlt1 = Core.Name "openGql.grammar.ClosedDynamicUnionTypeAlt1"
+_ClosedDynamicUnionTypeAlt1_anyValue = Core.Name "anyValue"
+_ClosedDynamicUnionTypeAlt1_valueTypes = Core.Name "valueTypes"
+data ClosedDynamicUnionTypeAlt2 =
+  ClosedDynamicUnionTypeAlt2 {
+    closedDynamicUnionTypeAlt2ValueTypes :: [ValueType]}
+  deriving (Eq, Ord, Read, Show)
+_ClosedDynamicUnionTypeAlt2 = Core.Name "openGql.grammar.ClosedDynamicUnionTypeAlt2"
+_ClosedDynamicUnionTypeAlt2_valueTypes = Core.Name "valueTypes"
+type Typed = ()
+_Typed = Core.Name "openGql.grammar.Typed"
+data PredefinedType =
+  PredefinedTypeBooleanType BooleanType |
+  PredefinedTypeCharacterStringType CharacterStringType |
+  PredefinedTypeByteStringType ByteStringType |
+  PredefinedTypeNumericType NumericType |
+  PredefinedTypeTemporalType TemporalType |
+  PredefinedTypeReferenceValueType ReferenceValueType |
+  PredefinedTypeImmaterialValueType ImmaterialValueType
+  deriving (Eq, Ord, Read, Show)
+_PredefinedType = Core.Name "openGql.grammar.PredefinedType"
+_PredefinedType_booleanType = Core.Name "booleanType"
+_PredefinedType_characterStringType = Core.Name "characterStringType"
+_PredefinedType_byteStringType = Core.Name "byteStringType"
+_PredefinedType_numericType = Core.Name "numericType"
+_PredefinedType_temporalType = Core.Name "temporalType"
+_PredefinedType_referenceValueType = Core.Name "referenceValueType"
+_PredefinedType_immaterialValueType = Core.Name "immaterialValueType"
+data BooleanType =
+  BooleanType {
+    booleanTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_BooleanType = Core.Name "openGql.grammar.BooleanType"
+_BooleanType_notNull = Core.Name "notNull"
+data CharacterStringType =
+  CharacterStringTypeStringType StringType |
+  CharacterStringTypeCharType CharType |
+  CharacterStringTypeVarcharType VarcharType
+  deriving (Eq, Ord, Read, Show)
+_CharacterStringType = Core.Name "openGql.grammar.CharacterStringType"
+_CharacterStringType_stringType = Core.Name "stringType"
+_CharacterStringType_charType = Core.Name "charType"
+_CharacterStringType_varcharType = Core.Name "varcharType"
+data StringType =
+  StringType {
+    stringTypeMinLength :: (Maybe MinLength),
+    stringTypeMaxLength :: (Maybe MaxLength),
+    stringTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_StringType = Core.Name "openGql.grammar.StringType"
+_StringType_minLength = Core.Name "minLength"
+_StringType_maxLength = Core.Name "maxLength"
+_StringType_notNull = Core.Name "notNull"
+data CharType =
+  CharType {
+    charTypeFixedLength :: (Maybe FixedLength),
+    charTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_CharType = Core.Name "openGql.grammar.CharType"
+_CharType_fixedLength = Core.Name "fixedLength"
+_CharType_notNull = Core.Name "notNull"
+data VarcharType =
+  VarcharType {
+    varcharTypeMaxLength :: (Maybe MaxLength),
+    varcharTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_VarcharType = Core.Name "openGql.grammar.VarcharType"
+_VarcharType_maxLength = Core.Name "maxLength"
+_VarcharType_notNull = Core.Name "notNull"
+data ByteStringType =
+  ByteStringTypeBytesType BytesType |
+  ByteStringTypeBinaryType BinaryType |
+  ByteStringTypeVarbinaryType VarbinaryType
+  deriving (Eq, Ord, Read, Show)
+_ByteStringType = Core.Name "openGql.grammar.ByteStringType"
+_ByteStringType_bytesType = Core.Name "bytesType"
+_ByteStringType_binaryType = Core.Name "binaryType"
+_ByteStringType_varbinaryType = Core.Name "varbinaryType"
+data BytesType =
+  BytesType {
+    bytesTypeMinLength :: (Maybe MinLength),
+    bytesTypeMaxLength :: (Maybe MaxLength),
+    bytesTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_BytesType = Core.Name "openGql.grammar.BytesType"
+_BytesType_minLength = Core.Name "minLength"
+_BytesType_maxLength = Core.Name "maxLength"
+_BytesType_notNull = Core.Name "notNull"
+data BinaryType =
+  BinaryType {
+    binaryTypeFixedLength :: (Maybe FixedLength),
+    binaryTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_BinaryType = Core.Name "openGql.grammar.BinaryType"
+_BinaryType_fixedLength = Core.Name "fixedLength"
+_BinaryType_notNull = Core.Name "notNull"
+data VarbinaryType =
+  VarbinaryType {
+    varbinaryTypeMaxLength :: (Maybe MaxLength),
+    varbinaryTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_VarbinaryType = Core.Name "openGql.grammar.VarbinaryType"
+_VarbinaryType_maxLength = Core.Name "maxLength"
+_VarbinaryType_notNull = Core.Name "notNull"
+type MinLength = UnsignedInteger
+_MinLength = Core.Name "openGql.grammar.MinLength"
+type FixedLength = UnsignedInteger
+_FixedLength = Core.Name "openGql.grammar.FixedLength"
+type MaxLength = UnsignedInteger
+_MaxLength = Core.Name "openGql.grammar.MaxLength"
+data NumericType =
+  NumericTypeExact ExactNumericType |
+  NumericTypeApproximate ApproximateNumericType
+  deriving (Eq, Ord, Read, Show)
+_NumericType = Core.Name "openGql.grammar.NumericType"
+_NumericType_exact = Core.Name "exact"
+_NumericType_approximate = Core.Name "approximate"
+data ExactNumericType =
+  ExactNumericTypeBinary BinaryExactNumericType |
+  ExactNumericTypeDecimal DecimalExactNumericType
+  deriving (Eq, Ord, Read, Show)
+_ExactNumericType = Core.Name "openGql.grammar.ExactNumericType"
+_ExactNumericType_binary = Core.Name "binary"
+_ExactNumericType_decimal = Core.Name "decimal"
+data BinaryExactNumericType =
+  BinaryExactNumericTypeSigned SignedBinaryExactNumericType |
+  BinaryExactNumericTypeUnsigned UnsignedBinaryExactNumericType
+  deriving (Eq, Ord, Read, Show)
+_BinaryExactNumericType = Core.Name "openGql.grammar.BinaryExactNumericType"
+_BinaryExactNumericType_signed = Core.Name "signed"
+_BinaryExactNumericType_unsigned = Core.Name "unsigned"
+data SignedBinaryExactNumericType =
+  SignedBinaryExactNumericTypeInt8 Int8Type |
+  SignedBinaryExactNumericTypeInt16 Int16Type |
+  SignedBinaryExactNumericTypeInt32 Int32Type |
+  SignedBinaryExactNumericTypeInt64 Int64Type |
+  SignedBinaryExactNumericTypeInt128 Int128Type |
+  SignedBinaryExactNumericTypeInt256 Int256Type |
+  SignedBinaryExactNumericTypeSmallInt SmallIntType |
+  SignedBinaryExactNumericTypeIntWithPrecision IntWithPrecision |
+  SignedBinaryExactNumericTypeBigInt BigIntType |
+  SignedBinaryExactNumericTypeSignedVerboseType SignedVerboseBinaryExactNumericType
+  deriving (Eq, Ord, Read, Show)
+_SignedBinaryExactNumericType = Core.Name "openGql.grammar.SignedBinaryExactNumericType"
+_SignedBinaryExactNumericType_int8 = Core.Name "int8"
+_SignedBinaryExactNumericType_int16 = Core.Name "int16"
+_SignedBinaryExactNumericType_int32 = Core.Name "int32"
+_SignedBinaryExactNumericType_int64 = Core.Name "int64"
+_SignedBinaryExactNumericType_int128 = Core.Name "int128"
+_SignedBinaryExactNumericType_int256 = Core.Name "int256"
+_SignedBinaryExactNumericType_smallInt = Core.Name "smallInt"
+_SignedBinaryExactNumericType_intWithPrecision = Core.Name "intWithPrecision"
+_SignedBinaryExactNumericType_bigInt = Core.Name "bigInt"
+_SignedBinaryExactNumericType_signedVerboseType = Core.Name "signedVerboseType"
+data Int8Type =
+  Int8Type {
+    int8TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Int8Type = Core.Name "openGql.grammar.Int8Type"
+_Int8Type_notNull = Core.Name "notNull"
+data Int16Type =
+  Int16Type {
+    int16TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Int16Type = Core.Name "openGql.grammar.Int16Type"
+_Int16Type_notNull = Core.Name "notNull"
+data Int32Type =
+  Int32Type {
+    int32TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Int32Type = Core.Name "openGql.grammar.Int32Type"
+_Int32Type_notNull = Core.Name "notNull"
+data Int64Type =
+  Int64Type {
+    int64TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Int64Type = Core.Name "openGql.grammar.Int64Type"
+_Int64Type_notNull = Core.Name "notNull"
+data Int128Type =
+  Int128Type {
+    int128TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Int128Type = Core.Name "openGql.grammar.Int128Type"
+_Int128Type_notNull = Core.Name "notNull"
+data Int256Type =
+  Int256Type {
+    int256TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Int256Type = Core.Name "openGql.grammar.Int256Type"
+_Int256Type_notNull = Core.Name "notNull"
+data SmallIntType =
+  SmallIntType {
+    smallIntTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_SmallIntType = Core.Name "openGql.grammar.SmallIntType"
+_SmallIntType_notNull = Core.Name "notNull"
+data BigIntType =
+  BigIntType {
+    bigIntTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_BigIntType = Core.Name "openGql.grammar.BigIntType"
+_BigIntType_notNull = Core.Name "notNull"
+data IntWithPrecision =
+  IntWithPrecision {
+    intWithPrecisionPrecision :: (Maybe Precision),
+    intWithPrecisionNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_IntWithPrecision = Core.Name "openGql.grammar.IntWithPrecision"
+_IntWithPrecision_precision = Core.Name "precision"
+_IntWithPrecision_notNull = Core.Name "notNull"
+data SignedVerboseBinaryExactNumericType =
+  SignedVerboseBinaryExactNumericType {
+    signedVerboseBinaryExactNumericTypeSigned :: Bool,
+    signedVerboseBinaryExactNumericTypeVerboseType :: VerboseBinaryExactNumericType}
+  deriving (Eq, Ord, Read, Show)
+_SignedVerboseBinaryExactNumericType = Core.Name "openGql.grammar.SignedVerboseBinaryExactNumericType"
+_SignedVerboseBinaryExactNumericType_signed = Core.Name "signed"
+_SignedVerboseBinaryExactNumericType_verboseType = Core.Name "verboseType"
+data UnsignedBinaryExactNumericType =
+  UnsignedBinaryExactNumericTypeUint8 Uint8Type |
+  UnsignedBinaryExactNumericTypeUint16 Uint16Type |
+  UnsignedBinaryExactNumericTypeUint32 Uint32Type |
+  UnsignedBinaryExactNumericTypeUint64 Uint64Type |
+  UnsignedBinaryExactNumericTypeUint128 Uint128Type |
+  UnsignedBinaryExactNumericTypeUint256 Uint256Type |
+  UnsignedBinaryExactNumericTypeUSmallInt USmallIntType |
+  UnsignedBinaryExactNumericTypeUintWithPrecision UintWithPrecision |
+  UnsignedBinaryExactNumericTypeUBigInt UBigIntType |
+  UnsignedBinaryExactNumericTypeUnsigned VerboseBinaryExactNumericType
+  deriving (Eq, Ord, Read, Show)
+_UnsignedBinaryExactNumericType = Core.Name "openGql.grammar.UnsignedBinaryExactNumericType"
+_UnsignedBinaryExactNumericType_uint8 = Core.Name "uint8"
+_UnsignedBinaryExactNumericType_uint16 = Core.Name "uint16"
+_UnsignedBinaryExactNumericType_uint32 = Core.Name "uint32"
+_UnsignedBinaryExactNumericType_uint64 = Core.Name "uint64"
+_UnsignedBinaryExactNumericType_uint128 = Core.Name "uint128"
+_UnsignedBinaryExactNumericType_uint256 = Core.Name "uint256"
+_UnsignedBinaryExactNumericType_uSmallInt = Core.Name "uSmallInt"
+_UnsignedBinaryExactNumericType_uintWithPrecision = Core.Name "uintWithPrecision"
+_UnsignedBinaryExactNumericType_uBigInt = Core.Name "uBigInt"
+_UnsignedBinaryExactNumericType_unsigned = Core.Name "unsigned"
+data Uint8Type =
+  Uint8Type {
+    uint8TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Uint8Type = Core.Name "openGql.grammar.Uint8Type"
+_Uint8Type_notNull = Core.Name "notNull"
+data Uint16Type =
+  Uint16Type {
+    uint16TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Uint16Type = Core.Name "openGql.grammar.Uint16Type"
+_Uint16Type_notNull = Core.Name "notNull"
+data Uint32Type =
+  Uint32Type {
+    uint32TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Uint32Type = Core.Name "openGql.grammar.Uint32Type"
+_Uint32Type_notNull = Core.Name "notNull"
+data Uint64Type =
+  Uint64Type {
+    uint64TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Uint64Type = Core.Name "openGql.grammar.Uint64Type"
+_Uint64Type_notNull = Core.Name "notNull"
+data Uint128Type =
+  Uint128Type {
+    uint128TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Uint128Type = Core.Name "openGql.grammar.Uint128Type"
+_Uint128Type_notNull = Core.Name "notNull"
+data Uint256Type =
+  Uint256Type {
+    uint256TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Uint256Type = Core.Name "openGql.grammar.Uint256Type"
+_Uint256Type_notNull = Core.Name "notNull"
+data USmallIntType =
+  USmallIntType {
+    uSmallIntTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_USmallIntType = Core.Name "openGql.grammar.USmallIntType"
+_USmallIntType_notNull = Core.Name "notNull"
+data UBigIntType =
+  UBigIntType {
+    uBigIntTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_UBigIntType = Core.Name "openGql.grammar.UBigIntType"
+_UBigIntType_notNull = Core.Name "notNull"
+data UintWithPrecision =
+  UintWithPrecision {
+    uintWithPrecisionPrecision :: (Maybe Precision),
+    uintWithPrecisionNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_UintWithPrecision = Core.Name "openGql.grammar.UintWithPrecision"
+_UintWithPrecision_precision = Core.Name "precision"
+_UintWithPrecision_notNull = Core.Name "notNull"
+data VerboseBinaryExactNumericType =
+  VerboseBinaryExactNumericTypeInteger8 Integer8Type |
+  VerboseBinaryExactNumericTypeInteger16 Integer16Type |
+  VerboseBinaryExactNumericTypeInteger32 Integer32Type |
+  VerboseBinaryExactNumericTypeInteger64 Integer64Type |
+  VerboseBinaryExactNumericTypeInteger128 Integer128Type |
+  VerboseBinaryExactNumericTypeInteger256 Integer256Type |
+  VerboseBinaryExactNumericTypeSmallInteger SmallIntegerType |
+  VerboseBinaryExactNumericTypeIntegerWithPrecision IntegerWithPrecision |
+  VerboseBinaryExactNumericTypeBigInteger BigIntegerType
+  deriving (Eq, Ord, Read, Show)
+_VerboseBinaryExactNumericType = Core.Name "openGql.grammar.VerboseBinaryExactNumericType"
+_VerboseBinaryExactNumericType_integer8 = Core.Name "integer8"
+_VerboseBinaryExactNumericType_integer16 = Core.Name "integer16"
+_VerboseBinaryExactNumericType_integer32 = Core.Name "integer32"
+_VerboseBinaryExactNumericType_integer64 = Core.Name "integer64"
+_VerboseBinaryExactNumericType_integer128 = Core.Name "integer128"
+_VerboseBinaryExactNumericType_integer256 = Core.Name "integer256"
+_VerboseBinaryExactNumericType_smallInteger = Core.Name "smallInteger"
+_VerboseBinaryExactNumericType_integerWithPrecision = Core.Name "integerWithPrecision"
+_VerboseBinaryExactNumericType_bigInteger = Core.Name "bigInteger"
+data Integer8Type =
+  Integer8Type {
+    integer8TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Integer8Type = Core.Name "openGql.grammar.Integer8Type"
+_Integer8Type_notNull = Core.Name "notNull"
+data Integer16Type =
+  Integer16Type {
+    integer16TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Integer16Type = Core.Name "openGql.grammar.Integer16Type"
+_Integer16Type_notNull = Core.Name "notNull"
+data Integer32Type =
+  Integer32Type {
+    integer32TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Integer32Type = Core.Name "openGql.grammar.Integer32Type"
+_Integer32Type_notNull = Core.Name "notNull"
+data Integer64Type =
+  Integer64Type {
+    integer64TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Integer64Type = Core.Name "openGql.grammar.Integer64Type"
+_Integer64Type_notNull = Core.Name "notNull"
+data Integer128Type =
+  Integer128Type {
+    integer128TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Integer128Type = Core.Name "openGql.grammar.Integer128Type"
+_Integer128Type_notNull = Core.Name "notNull"
+data Integer256Type =
+  Integer256Type {
+    integer256TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Integer256Type = Core.Name "openGql.grammar.Integer256Type"
+_Integer256Type_notNull = Core.Name "notNull"
+data SmallIntegerType =
+  SmallIntegerType {
+    smallIntegerTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_SmallIntegerType = Core.Name "openGql.grammar.SmallIntegerType"
+_SmallIntegerType_notNull = Core.Name "notNull"
+data BigIntegerType =
+  BigIntegerType {
+    bigIntegerTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_BigIntegerType = Core.Name "openGql.grammar.BigIntegerType"
+_BigIntegerType_notNull = Core.Name "notNull"
+data IntegerWithPrecision =
+  IntegerWithPrecision {
+    integerWithPrecisionPrecision :: (Maybe Precision),
+    integerWithPrecisionNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_IntegerWithPrecision = Core.Name "openGql.grammar.IntegerWithPrecision"
+_IntegerWithPrecision_precision = Core.Name "precision"
+_IntegerWithPrecision_notNull = Core.Name "notNull"
+type Precision = UnsignedDecimalInteger
+_Precision = Core.Name "openGql.grammar.Precision"
+type DecimalExactNumericType = (Maybe PrecisionAndScale)
+_DecimalExactNumericType = Core.Name "openGql.grammar.DecimalExactNumericType"
+data PrecisionAndScale =
+  PrecisionAndScale {
+    precisionAndScalePrecision :: Precision,
+    precisionAndScaleScale :: (Maybe Scale),
+    precisionAndScaleNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_PrecisionAndScale = Core.Name "openGql.grammar.PrecisionAndScale"
+_PrecisionAndScale_precision = Core.Name "precision"
+_PrecisionAndScale_scale = Core.Name "scale"
+_PrecisionAndScale_notNull = Core.Name "notNull"
+type Scale = UnsignedDecimalInteger
+_Scale = Core.Name "openGql.grammar.Scale"
+data ApproximateNumericType =
+  ApproximateNumericTypeFloat16 Float16Type |
+  ApproximateNumericTypeFloat32 Float32Type |
+  ApproximateNumericTypeFloat64 Float64Type |
+  ApproximateNumericTypeFloat128 Float128Type |
+  ApproximateNumericTypeFloat256 Float256Type |
+  ApproximateNumericTypeFloatWithPrecision FloatTypeWithPrecision |
+  ApproximateNumericTypeReal RealType |
+  ApproximateNumericTypeDoubleWithPrecision DoubleTypeWithPrecision
+  deriving (Eq, Ord, Read, Show)
+_ApproximateNumericType = Core.Name "openGql.grammar.ApproximateNumericType"
+_ApproximateNumericType_float16 = Core.Name "float16"
+_ApproximateNumericType_float32 = Core.Name "float32"
+_ApproximateNumericType_float64 = Core.Name "float64"
+_ApproximateNumericType_float128 = Core.Name "float128"
+_ApproximateNumericType_float256 = Core.Name "float256"
+_ApproximateNumericType_floatWithPrecision = Core.Name "floatWithPrecision"
+_ApproximateNumericType_real = Core.Name "real"
+_ApproximateNumericType_doubleWithPrecision = Core.Name "doubleWithPrecision"
+data Float16Type =
+  Float16Type {
+    float16TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Float16Type = Core.Name "openGql.grammar.Float16Type"
+_Float16Type_notNull = Core.Name "notNull"
+data Float32Type =
+  Float32Type {
+    float32TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Float32Type = Core.Name "openGql.grammar.Float32Type"
+_Float32Type_notNull = Core.Name "notNull"
+data Float64Type =
+  Float64Type {
+    float64TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Float64Type = Core.Name "openGql.grammar.Float64Type"
+_Float64Type_notNull = Core.Name "notNull"
+data Float128Type =
+  Float128Type {
+    float128TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Float128Type = Core.Name "openGql.grammar.Float128Type"
+_Float128Type_notNull = Core.Name "notNull"
+data Float256Type =
+  Float256Type {
+    float256TypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_Float256Type = Core.Name "openGql.grammar.Float256Type"
+_Float256Type_notNull = Core.Name "notNull"
+data FloatTypeWithPrecision =
+  FloatTypeWithPrecision {
+    floatTypeWithPrecisionPrecisionAndScale :: (Maybe PrecisionAndScale),
+    floatTypeWithPrecisionNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_FloatTypeWithPrecision = Core.Name "openGql.grammar.FloatTypeWithPrecision"
+_FloatTypeWithPrecision_precisionAndScale = Core.Name "precisionAndScale"
+_FloatTypeWithPrecision_notNull = Core.Name "notNull"
+data RealType =
+  RealType {
+    realTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_RealType = Core.Name "openGql.grammar.RealType"
+_RealType_notNull = Core.Name "notNull"
+data DoubleTypeWithPrecision =
+  DoubleTypeWithPrecision {
+    doubleTypeWithPrecisionPrecision :: Bool,
+    doubleTypeWithPrecisionNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_DoubleTypeWithPrecision = Core.Name "openGql.grammar.DoubleTypeWithPrecision"
+_DoubleTypeWithPrecision_precision = Core.Name "precision"
+_DoubleTypeWithPrecision_notNull = Core.Name "notNull"
+data TemporalType =
+  TemporalTypeInstantType TemporalInstantType |
+  TemporalTypeDurationType TemporalDurationType
+  deriving (Eq, Ord, Read, Show)
+_TemporalType = Core.Name "openGql.grammar.TemporalType"
+_TemporalType_instantType = Core.Name "instantType"
+_TemporalType_durationType = Core.Name "durationType"
+data TemporalInstantType =
+  TemporalInstantTypeDatetimeType DatetimeType |
+  TemporalInstantTypeLocalDatetimeTypeChoice LocalDatetimeTypeChoice |
+  TemporalInstantTypeDateType DateType |
+  TemporalInstantTypeTimeType TimeType |
+  TemporalInstantTypeLocalTimeTypeChoice LocalTimeTypeChoice
+  deriving (Eq, Ord, Read, Show)
+_TemporalInstantType = Core.Name "openGql.grammar.TemporalInstantType"
+_TemporalInstantType_datetimeType = Core.Name "datetimeType"
+_TemporalInstantType_localDatetimeTypeChoice = Core.Name "localDatetimeTypeChoice"
+_TemporalInstantType_dateType = Core.Name "dateType"
+_TemporalInstantType_timeType = Core.Name "timeType"
+_TemporalInstantType_localTimeTypeChoice = Core.Name "localTimeTypeChoice"
+data DatetimeType =
+  DatetimeTypeZonedDatetime ZonedDatetimeType |
+  DatetimeTypeTimestampWithTimeZone TimestampWithTimeZoneType
+  deriving (Eq, Ord, Read, Show)
+_DatetimeType = Core.Name "openGql.grammar.DatetimeType"
+_DatetimeType_zonedDatetime = Core.Name "zonedDatetime"
+_DatetimeType_timestampWithTimeZone = Core.Name "timestampWithTimeZone"
+data ZonedDatetimeType =
+  ZonedDatetimeType {
+    zonedDatetimeTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ZonedDatetimeType = Core.Name "openGql.grammar.ZonedDatetimeType"
+_ZonedDatetimeType_notNull = Core.Name "notNull"
+data TimestampWithTimeZoneType =
+  TimestampWithTimeZoneType {
+    timestampWithTimeZoneTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_TimestampWithTimeZoneType = Core.Name "openGql.grammar.TimestampWithTimeZoneType"
+_TimestampWithTimeZoneType_notNull = Core.Name "notNull"
+data LocalDatetimeTypeChoice =
+  LocalDatetimeTypeChoiceLocalDatetime LocalDatetimeType |
+  LocalDatetimeTypeChoiceTimestampWithoutTimeZone TimestampWithoutTimeZoneType
+  deriving (Eq, Ord, Read, Show)
+_LocalDatetimeTypeChoice = Core.Name "openGql.grammar.LocalDatetimeTypeChoice"
+_LocalDatetimeTypeChoice_localDatetime = Core.Name "localDatetime"
+_LocalDatetimeTypeChoice_timestampWithoutTimeZone = Core.Name "timestampWithoutTimeZone"
+data LocalDatetimeType =
+  LocalDatetimeType {
+    localDatetimeTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_LocalDatetimeType = Core.Name "openGql.grammar.LocalDatetimeType"
+_LocalDatetimeType_notNull = Core.Name "notNull"
+data TimestampWithoutTimeZoneType =
+  TimestampWithoutTimeZoneType {
+    timestampWithoutTimeZoneTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_TimestampWithoutTimeZoneType = Core.Name "openGql.grammar.TimestampWithoutTimeZoneType"
+_TimestampWithoutTimeZoneType_notNull = Core.Name "notNull"
+data DateType =
+  DateType {
+    dateTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_DateType = Core.Name "openGql.grammar.DateType"
+_DateType_notNull = Core.Name "notNull"
+data TimeType =
+  TimeTypeZonedTime ZonedTimeType |
+  TimeTypeTimeWithTimeZone TimeWithTimeZoneType
+  deriving (Eq, Ord, Read, Show)
+_TimeType = Core.Name "openGql.grammar.TimeType"
+_TimeType_zonedTime = Core.Name "zonedTime"
+_TimeType_timeWithTimeZone = Core.Name "timeWithTimeZone"
+data ZonedTimeType =
+  ZonedTimeType {
+    zonedTimeTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ZonedTimeType = Core.Name "openGql.grammar.ZonedTimeType"
+_ZonedTimeType_notNull = Core.Name "notNull"
+data TimeWithTimeZoneType =
+  TimeWithTimeZoneType {
+    timeWithTimeZoneTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_TimeWithTimeZoneType = Core.Name "openGql.grammar.TimeWithTimeZoneType"
+_TimeWithTimeZoneType_notNull = Core.Name "notNull"
+data LocalTimeTypeChoice =
+  LocalTimeTypeChoiceLocalTime LocalTimeType |
+  LocalTimeTypeChoiceTimeWithoutTimeZone TimeWithoutTimeZoneType
+  deriving (Eq, Ord, Read, Show)
+_LocalTimeTypeChoice = Core.Name "openGql.grammar.LocalTimeTypeChoice"
+_LocalTimeTypeChoice_localTime = Core.Name "localTime"
+_LocalTimeTypeChoice_timeWithoutTimeZone = Core.Name "timeWithoutTimeZone"
+data LocalTimeType =
+  LocalTimeType {
+    localTimeTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_LocalTimeType = Core.Name "openGql.grammar.LocalTimeType"
+_LocalTimeType_notNull = Core.Name "notNull"
+data TimeWithoutTimeZoneType =
+  TimeWithoutTimeZoneType {
+    timeWithoutTimeZoneTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_TimeWithoutTimeZoneType = Core.Name "openGql.grammar.TimeWithoutTimeZoneType"
+_TimeWithoutTimeZoneType_notNull = Core.Name "notNull"
+data TemporalDurationType =
+  TemporalDurationType {
+    temporalDurationTypeQualifier :: TemporalDurationQualifier,
+    temporalDurationTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_TemporalDurationType = Core.Name "openGql.grammar.TemporalDurationType"
+_TemporalDurationType_qualifier = Core.Name "qualifier"
+_TemporalDurationType_notNull = Core.Name "notNull"
+data TemporalDurationQualifier =
+  TemporalDurationQualifierYearToMonth |
+  TemporalDurationQualifierDayToSecond
+  deriving (Eq, Ord, Read, Show)
+_TemporalDurationQualifier = Core.Name "openGql.grammar.TemporalDurationQualifier"
+_TemporalDurationQualifier_yearToMonth = Core.Name "yearToMonth"
+_TemporalDurationQualifier_dayToSecond = Core.Name "dayToSecond"
+data ReferenceValueType =
+  ReferenceValueTypeGraph GraphReferenceValueType |
+  ReferenceValueTypeBindingTable BindingTableReferenceValueType |
+  ReferenceValueTypeNode NodeReferenceValueType |
+  ReferenceValueTypeEdge EdgeReferenceValueType
+  deriving (Eq, Ord, Read, Show)
+_ReferenceValueType = Core.Name "openGql.grammar.ReferenceValueType"
+_ReferenceValueType_graph = Core.Name "graph"
+_ReferenceValueType_bindingTable = Core.Name "bindingTable"
+_ReferenceValueType_node = Core.Name "node"
+_ReferenceValueType_edge = Core.Name "edge"
+data ImmaterialValueType =
+  ImmaterialValueTypeNullType NullType |
+  ImmaterialValueTypeEmptyType EmptyType
+  deriving (Eq, Ord, Read, Show)
+_ImmaterialValueType = Core.Name "openGql.grammar.ImmaterialValueType"
+_ImmaterialValueType_nullType = Core.Name "nullType"
+_ImmaterialValueType_emptyType = Core.Name "emptyType"
+type NullType = ()
+_NullType = Core.Name "openGql.grammar.NullType"
+type EmptyType = ()
+_EmptyType = Core.Name "openGql.grammar.EmptyType"
+data GraphReferenceValueType =
+  GraphReferenceValueTypeOpen OpenGraphReferenceValueType |
+  GraphReferenceValueTypeClosed ClosedGraphReferenceValueType
+  deriving (Eq, Ord, Read, Show)
+_GraphReferenceValueType = Core.Name "openGql.grammar.GraphReferenceValueType"
+_GraphReferenceValueType_open = Core.Name "open"
+_GraphReferenceValueType_closed = Core.Name "closed"
+data ClosedGraphReferenceValueType =
+  ClosedGraphReferenceValueType {
+    closedGraphReferenceValueTypeProperty :: Bool,
+    closedGraphReferenceValueTypeNestedSpec :: NestedGraphTypeSpecification,
+    closedGraphReferenceValueTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ClosedGraphReferenceValueType = Core.Name "openGql.grammar.ClosedGraphReferenceValueType"
+_ClosedGraphReferenceValueType_property = Core.Name "property"
+_ClosedGraphReferenceValueType_nestedSpec = Core.Name "nestedSpec"
+_ClosedGraphReferenceValueType_notNull = Core.Name "notNull"
+data OpenGraphReferenceValueType =
+  OpenGraphReferenceValueType {
+    openGraphReferenceValueTypeAny :: (Maybe Bool),
+    openGraphReferenceValueTypeProperty :: Bool,
+    openGraphReferenceValueTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_OpenGraphReferenceValueType = Core.Name "openGql.grammar.OpenGraphReferenceValueType"
+_OpenGraphReferenceValueType_any = Core.Name "any"
+_OpenGraphReferenceValueType_property = Core.Name "property"
+_OpenGraphReferenceValueType_notNull = Core.Name "notNull"
+data BindingTableReferenceValueType =
+  BindingTableReferenceValueType {
+    bindingTableReferenceValueTypeBindingTableType :: BindingTableType,
+    bindingTableReferenceValueTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_BindingTableReferenceValueType = Core.Name "openGql.grammar.BindingTableReferenceValueType"
+_BindingTableReferenceValueType_bindingTableType = Core.Name "bindingTableType"
+_BindingTableReferenceValueType_notNull = Core.Name "notNull"
+data NodeReferenceValueType =
+  NodeReferenceValueTypeOpen OpenNodeReferenceValueType |
+  NodeReferenceValueTypeClosed ClosedNodeReferenceValueType
+  deriving (Eq, Ord, Read, Show)
+_NodeReferenceValueType = Core.Name "openGql.grammar.NodeReferenceValueType"
+_NodeReferenceValueType_open = Core.Name "open"
+_NodeReferenceValueType_closed = Core.Name "closed"
+data ClosedNodeReferenceValueType =
+  ClosedNodeReferenceValueType {
+    closedNodeReferenceValueTypeNodeTypeSpec :: NodeTypeSpecification,
+    closedNodeReferenceValueTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ClosedNodeReferenceValueType = Core.Name "openGql.grammar.ClosedNodeReferenceValueType"
+_ClosedNodeReferenceValueType_nodeTypeSpec = Core.Name "nodeTypeSpec"
+_ClosedNodeReferenceValueType_notNull = Core.Name "notNull"
+data OpenNodeReferenceValueType =
+  OpenNodeReferenceValueType {
+    openNodeReferenceValueTypeAny :: Bool,
+    openNodeReferenceValueTypeNodeSynonym :: NodeSynonym,
+    openNodeReferenceValueTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_OpenNodeReferenceValueType = Core.Name "openGql.grammar.OpenNodeReferenceValueType"
+_OpenNodeReferenceValueType_any = Core.Name "any"
+_OpenNodeReferenceValueType_nodeSynonym = Core.Name "nodeSynonym"
+_OpenNodeReferenceValueType_notNull = Core.Name "notNull"
+data EdgeReferenceValueType =
+  EdgeReferenceValueTypeOpen OpenEdgeReferenceValueType |
+  EdgeReferenceValueTypeClosed ClosedEdgeReferenceValueType
+  deriving (Eq, Ord, Read, Show)
+_EdgeReferenceValueType = Core.Name "openGql.grammar.EdgeReferenceValueType"
+_EdgeReferenceValueType_open = Core.Name "open"
+_EdgeReferenceValueType_closed = Core.Name "closed"
+data ClosedEdgeReferenceValueType =
+  ClosedEdgeReferenceValueType {
+    closedEdgeReferenceValueTypeEdgeTypeSpec :: EdgeTypeSpecification,
+    closedEdgeReferenceValueTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_ClosedEdgeReferenceValueType = Core.Name "openGql.grammar.ClosedEdgeReferenceValueType"
+_ClosedEdgeReferenceValueType_edgeTypeSpec = Core.Name "edgeTypeSpec"
+_ClosedEdgeReferenceValueType_notNull = Core.Name "notNull"
+data OpenEdgeReferenceValueType =
+  OpenEdgeReferenceValueType {
+    openEdgeReferenceValueTypeAny :: Bool,
+    openEdgeReferenceValueTypeEdgeSynonym :: EdgeSynonym,
+    openEdgeReferenceValueTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_OpenEdgeReferenceValueType = Core.Name "openGql.grammar.OpenEdgeReferenceValueType"
+_OpenEdgeReferenceValueType_any = Core.Name "any"
+_OpenEdgeReferenceValueType_edgeSynonym = Core.Name "edgeSynonym"
+_OpenEdgeReferenceValueType_notNull = Core.Name "notNull"
+data PathValueType =
+  PathValueType {
+    pathValueTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_PathValueType = Core.Name "openGql.grammar.PathValueType"
+_PathValueType_notNull = Core.Name "notNull"
+data ListValueTypeName =
+  ListValueTypeName {
+    listValueTypeNameGroup :: Bool,
+    listValueTypeNameSynonym :: ListValueTypeNameSynonym}
+  deriving (Eq, Ord, Read, Show)
+_ListValueTypeName = Core.Name "openGql.grammar.ListValueTypeName"
+_ListValueTypeName_group = Core.Name "group"
+_ListValueTypeName_synonym = Core.Name "synonym"
+data ListValueTypeNameSynonym =
+  ListValueTypeNameSynonymList |
+  ListValueTypeNameSynonymArray
+  deriving (Eq, Ord, Read, Show)
+_ListValueTypeNameSynonym = Core.Name "openGql.grammar.ListValueTypeNameSynonym"
+_ListValueTypeNameSynonym_list = Core.Name "list"
+_ListValueTypeNameSynonym_array = Core.Name "array"
+data RecordType =
+  RecordTypeAnyRecord AnyRecordType |
+  RecordTypeSpecifiedRecord SpecifiedRecordType
+  deriving (Eq, Ord, Read, Show)
+_RecordType = Core.Name "openGql.grammar.RecordType"
+_RecordType_anyRecord = Core.Name "anyRecord"
+_RecordType_specifiedRecord = Core.Name "specifiedRecord"
+data AnyRecordType =
+  AnyRecordType {
+    anyRecordTypeAny :: Bool,
+    anyRecordTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_AnyRecordType = Core.Name "openGql.grammar.AnyRecordType"
+_AnyRecordType_any = Core.Name "any"
+_AnyRecordType_notNull = Core.Name "notNull"
+data SpecifiedRecordType =
+  SpecifiedRecordType {
+    specifiedRecordTypeRecord :: Bool,
+    specifiedRecordTypeFieldTypes :: FieldTypesSpecification,
+    specifiedRecordTypeNotNull :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_SpecifiedRecordType = Core.Name "openGql.grammar.SpecifiedRecordType"
+_SpecifiedRecordType_record = Core.Name "record"
+_SpecifiedRecordType_fieldTypes = Core.Name "fieldTypes"
+_SpecifiedRecordType_notNull = Core.Name "notNull"
+type FieldTypesSpecification = (Maybe FieldTypeList)
+_FieldTypesSpecification = Core.Name "openGql.grammar.FieldTypesSpecification"
+type FieldTypeList = [FieldType]
+_FieldTypeList = Core.Name "openGql.grammar.FieldTypeList"
+type NotNull = ()
+_NotNull = Core.Name "openGql.grammar.NotNull"
+data FieldType =
+  FieldType {
+    fieldTypeFieldName :: FieldName,
+    fieldTypeTyped :: (Maybe Typed),
+    fieldTypeValueType :: ValueType}
+  deriving (Eq, Ord, Read, Show)
+_FieldType = Core.Name "openGql.grammar.FieldType"
+_FieldType_fieldName = Core.Name "fieldName"
+_FieldType_typed = Core.Name "typed"
+_FieldType_valueType = Core.Name "valueType"
+type SearchCondition = BooleanValueExpression
+_SearchCondition = Core.Name "openGql.grammar.SearchCondition"
+data Predicate =
+  PredicateExistsPredicate ExistsPredicate |
+  PredicateNullPredicate NullPredicate |
+  PredicateValueTypePredicate ValueTypePredicate |
+  PredicateDirectedPredicate DirectedPredicate |
+  PredicateLabeledPredicate LabeledPredicate |
+  PredicateSourceDestinationPredicate SourceDestinationPredicate |
+  PredicateAllDifferentPredicate AllDifferentPredicate |
+  PredicateSamePredicate SamePredicate |
+  PredicatePropertyExistsPredicate PropertyExistsPredicate
+  deriving (Eq, Ord, Read, Show)
+_Predicate = Core.Name "openGql.grammar.Predicate"
+_Predicate_existsPredicate = Core.Name "existsPredicate"
+_Predicate_nullPredicate = Core.Name "nullPredicate"
+_Predicate_valueTypePredicate = Core.Name "valueTypePredicate"
+_Predicate_directedPredicate = Core.Name "directedPredicate"
+_Predicate_labeledPredicate = Core.Name "labeledPredicate"
+_Predicate_sourceDestinationPredicate = Core.Name "sourceDestinationPredicate"
+_Predicate_allDifferentPredicate = Core.Name "allDifferentPredicate"
+_Predicate_samePredicate = Core.Name "samePredicate"
+_Predicate_propertyExistsPredicate = Core.Name "propertyExistsPredicate"
+data ComparisonPredicatePart2 =
+  ComparisonPredicatePart2 {
+    comparisonPredicatePart2CompOp :: CompOp,
+    comparisonPredicatePart2ValueExpression :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_ComparisonPredicatePart2 = Core.Name "openGql.grammar.ComparisonPredicatePart2"
+_ComparisonPredicatePart2_compOp = Core.Name "compOp"
+_ComparisonPredicatePart2_valueExpression = Core.Name "valueExpression"
+data CompOp =
+  CompOpEquals |
+  CompOpNotEquals |
+  CompOpLessThan |
+  CompOpGreaterThan |
+  CompOpLessThanOrEquals |
+  CompOpGreaterThanOrEquals
+  deriving (Eq, Ord, Read, Show)
+_CompOp = Core.Name "openGql.grammar.CompOp"
+_CompOp_equals = Core.Name "equals"
+_CompOp_notEquals = Core.Name "notEquals"
+_CompOp_lessThan = Core.Name "lessThan"
+_CompOp_greaterThan = Core.Name "greaterThan"
+_CompOp_lessThanOrEquals = Core.Name "lessThanOrEquals"
+_CompOp_greaterThanOrEquals = Core.Name "greaterThanOrEquals"
+data ExistsPredicate =
+  ExistsPredicateGraphPatternBrace GraphPattern |
+  ExistsPredicateGraphPatternParen GraphPattern |
+  ExistsPredicateMatchBlockBrace MatchStatementBlock |
+  ExistsPredicateMatchBlockParen MatchStatementBlock |
+  ExistsPredicateNestedQuery NestedQuerySpecification
+  deriving (Eq, Ord, Read, Show)
+_ExistsPredicate = Core.Name "openGql.grammar.ExistsPredicate"
+_ExistsPredicate_graphPatternBrace = Core.Name "graphPatternBrace"
+_ExistsPredicate_graphPatternParen = Core.Name "graphPatternParen"
+_ExistsPredicate_matchBlockBrace = Core.Name "matchBlockBrace"
+_ExistsPredicate_matchBlockParen = Core.Name "matchBlockParen"
+_ExistsPredicate_nestedQuery = Core.Name "nestedQuery"
+data NullPredicate =
+  NullPredicate {
+    nullPredicateValueExpression :: PrimaryValueExpression,
+    nullPredicateNullPart :: NullPredicatePart2}
+  deriving (Eq, Ord, Read, Show)
+_NullPredicate = Core.Name "openGql.grammar.NullPredicate"
+_NullPredicate_valueExpression = Core.Name "valueExpression"
+_NullPredicate_nullPart = Core.Name "nullPart"
+data NullPredicatePart2 =
+  NullPredicatePart2 {
+    nullPredicatePart2Not :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_NullPredicatePart2 = Core.Name "openGql.grammar.NullPredicatePart2"
+_NullPredicatePart2_not = Core.Name "not"
+data ValueTypePredicate =
+  ValueTypePredicate {
+    valueTypePredicateValueExpression :: PrimaryValueExpression,
+    valueTypePredicateValueTypePart :: ValueTypePredicatePart2}
+  deriving (Eq, Ord, Read, Show)
+_ValueTypePredicate = Core.Name "openGql.grammar.ValueTypePredicate"
+_ValueTypePredicate_valueExpression = Core.Name "valueExpression"
+_ValueTypePredicate_valueTypePart = Core.Name "valueTypePart"
+data ValueTypePredicatePart2 =
+  ValueTypePredicatePart2 {
+    valueTypePredicatePart2Not :: Bool,
+    valueTypePredicatePart2Typed :: Typed,
+    valueTypePredicatePart2ValueType :: ValueType}
+  deriving (Eq, Ord, Read, Show)
+_ValueTypePredicatePart2 = Core.Name "openGql.grammar.ValueTypePredicatePart2"
+_ValueTypePredicatePart2_not = Core.Name "not"
+_ValueTypePredicatePart2_typed = Core.Name "typed"
+_ValueTypePredicatePart2_valueType = Core.Name "valueType"
+data NormalizedPredicatePart2 =
+  NormalizedPredicatePart2 {
+    normalizedPredicatePart2Not :: Bool,
+    normalizedPredicatePart2NormalForm :: (Maybe NormalForm)}
+  deriving (Eq, Ord, Read, Show)
+_NormalizedPredicatePart2 = Core.Name "openGql.grammar.NormalizedPredicatePart2"
+_NormalizedPredicatePart2_not = Core.Name "not"
+_NormalizedPredicatePart2_normalForm = Core.Name "normalForm"
+data DirectedPredicate =
+  DirectedPredicate {
+    directedPredicateElementVariableReference :: ElementVariableReference,
+    directedPredicateDirectedPart :: DirectedPredicatePart2}
+  deriving (Eq, Ord, Read, Show)
+_DirectedPredicate = Core.Name "openGql.grammar.DirectedPredicate"
+_DirectedPredicate_elementVariableReference = Core.Name "elementVariableReference"
+_DirectedPredicate_directedPart = Core.Name "directedPart"
+data DirectedPredicatePart2 =
+  DirectedPredicatePart2 {
+    directedPredicatePart2Not :: Bool}
+  deriving (Eq, Ord, Read, Show)
+_DirectedPredicatePart2 = Core.Name "openGql.grammar.DirectedPredicatePart2"
+_DirectedPredicatePart2_not = Core.Name "not"
+data LabeledPredicate =
+  LabeledPredicate {
+    labeledPredicateElementVariableReference :: ElementVariableReference,
+    labeledPredicateLabeledPart :: LabeledPredicatePart2}
+  deriving (Eq, Ord, Read, Show)
+_LabeledPredicate = Core.Name "openGql.grammar.LabeledPredicate"
+_LabeledPredicate_elementVariableReference = Core.Name "elementVariableReference"
+_LabeledPredicate_labeledPart = Core.Name "labeledPart"
+data LabeledPredicatePart2 =
+  LabeledPredicatePart2 {
+    labeledPredicatePart2IsLabeledOrColon :: IsLabeledOrColon,
+    labeledPredicatePart2LabelExpression :: LabelExpression}
+  deriving (Eq, Ord, Read, Show)
+_LabeledPredicatePart2 = Core.Name "openGql.grammar.LabeledPredicatePart2"
+_LabeledPredicatePart2_isLabeledOrColon = Core.Name "isLabeledOrColon"
+_LabeledPredicatePart2_labelExpression = Core.Name "labelExpression"
+data IsLabeledOrColon =
+  IsLabeledOrColonNot Bool |
+  IsLabeledOrColonColon
+  deriving (Eq, Ord, Read, Show)
+_IsLabeledOrColon = Core.Name "openGql.grammar.IsLabeledOrColon"
+_IsLabeledOrColon_not = Core.Name "not"
+_IsLabeledOrColon_colon = Core.Name "colon"
+data SourceDestinationPredicate =
+  SourceDestinationPredicateSourcePredicate SourcePredicate |
+  SourceDestinationPredicateDestinationPredicate DestinationPredicate
+  deriving (Eq, Ord, Read, Show)
+_SourceDestinationPredicate = Core.Name "openGql.grammar.SourceDestinationPredicate"
+_SourceDestinationPredicate_sourcePredicate = Core.Name "sourcePredicate"
+_SourceDestinationPredicate_destinationPredicate = Core.Name "destinationPredicate"
+type NodeReference = ElementVariableReference
+_NodeReference = Core.Name "openGql.grammar.NodeReference"
+data SourcePredicate =
+  SourcePredicate {
+    sourcePredicateNot :: Bool,
+    sourcePredicateSourceOf :: EdgeReference}
+  deriving (Eq, Ord, Read, Show)
+_SourcePredicate = Core.Name "openGql.grammar.SourcePredicate"
+_SourcePredicate_not = Core.Name "not"
+_SourcePredicate_sourceOf = Core.Name "sourceOf"
+data DestinationPredicate =
+  DestinationPredicate {
+    destinationPredicateNodeReference :: NodeReference,
+    destinationPredicateNot :: Bool,
+    destinationPredicateDestinationOf :: EdgeReference}
+  deriving (Eq, Ord, Read, Show)
+_DestinationPredicate = Core.Name "openGql.grammar.DestinationPredicate"
+_DestinationPredicate_nodeReference = Core.Name "nodeReference"
+_DestinationPredicate_not = Core.Name "not"
+_DestinationPredicate_destinationOf = Core.Name "destinationOf"
+type EdgeReference = ElementVariableReference
+_EdgeReference = Core.Name "openGql.grammar.EdgeReference"
+data AllDifferentPredicate =
+  AllDifferentPredicate {
+    allDifferentPredicateReferences :: [ElementVariableReference]}
+  deriving (Eq, Ord, Read, Show)
+_AllDifferentPredicate = Core.Name "openGql.grammar.AllDifferentPredicate"
+_AllDifferentPredicate_references = Core.Name "references"
+data SamePredicate =
+  SamePredicate {
+    samePredicateReferences :: [ElementVariableReference]}
+  deriving (Eq, Ord, Read, Show)
+_SamePredicate = Core.Name "openGql.grammar.SamePredicate"
+_SamePredicate_references = Core.Name "references"
+data PropertyExistsPredicate =
+  PropertyExistsPredicate {
+    propertyExistsPredicateElementVariableReference :: ElementVariableReference,
+    propertyExistsPredicatePropertyName :: PropertyName}
+  deriving (Eq, Ord, Read, Show)
+_PropertyExistsPredicate = Core.Name "openGql.grammar.PropertyExistsPredicate"
+_PropertyExistsPredicate_elementVariableReference = Core.Name "elementVariableReference"
+_PropertyExistsPredicate_propertyName = Core.Name "propertyName"
+data ValueExpression =
+  ValueExpressionSigned SignedExpr |
+  ValueExpressionMultDiv MultDivExpr |
+  ValueExpressionAddSubtract AddSubtractExpr |
+  ValueExpressionConcatenation ConcatenationExpr |
+  ValueExpressionNot NotExpr |
+  ValueExpressionIsNot IsNotExpr |
+  ValueExpressionConjunctive ConjunctiveExpr |
+  ValueExpressionDisjunctive DisjunctiveExpr |
+  ValueExpressionComparison ComparisonExpr |
+  ValueExpressionPredicate Predicate |
+  ValueExpressionNormalizedPredicate NormalizedPredicateExpr |
+  ValueExpressionPropertyGraph GraphExpression |
+  ValueExpressionBindingTable BindingTableExpression |
+  ValueExpressionValueFunction ValueFunction |
+  ValueExpressionPrimary PrimaryValueExpression
+  deriving (Eq, Ord, Read, Show)
+_ValueExpression = Core.Name "openGql.grammar.ValueExpression"
+_ValueExpression_signed = Core.Name "signed"
+_ValueExpression_multDiv = Core.Name "multDiv"
+_ValueExpression_addSubtract = Core.Name "addSubtract"
+_ValueExpression_concatenation = Core.Name "concatenation"
+_ValueExpression_not = Core.Name "not"
+_ValueExpression_isNot = Core.Name "isNot"
+_ValueExpression_conjunctive = Core.Name "conjunctive"
+_ValueExpression_disjunctive = Core.Name "disjunctive"
+_ValueExpression_comparison = Core.Name "comparison"
+_ValueExpression_predicate = Core.Name "predicate"
+_ValueExpression_normalizedPredicate = Core.Name "normalizedPredicate"
+_ValueExpression_propertyGraph = Core.Name "propertyGraph"
+_ValueExpression_bindingTable = Core.Name "bindingTable"
+_ValueExpression_valueFunction = Core.Name "valueFunction"
+_ValueExpression_primary = Core.Name "primary"
+data SignedExpr =
+  SignedExpr {
+    signedExprSign :: Sign,
+    signedExprValueExpression :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_SignedExpr = Core.Name "openGql.grammar.SignedExpr"
+_SignedExpr_sign = Core.Name "sign"
+_SignedExpr_valueExpression = Core.Name "valueExpression"
+data MultDivExpr =
+  MultDivExpr {
+    multDivExprLeft :: ValueExpression,
+    multDivExprOperator :: MultDivOperator,
+    multDivExprRight :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_MultDivExpr = Core.Name "openGql.grammar.MultDivExpr"
+_MultDivExpr_left = Core.Name "left"
+_MultDivExpr_operator = Core.Name "operator"
+_MultDivExpr_right = Core.Name "right"
+data AddSubtractExpr =
+  AddSubtractExpr {
+    addSubtractExprLeft :: ValueExpression,
+    addSubtractExprOperator :: AddSubtractOperator,
+    addSubtractExprRight :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_AddSubtractExpr = Core.Name "openGql.grammar.AddSubtractExpr"
+_AddSubtractExpr_left = Core.Name "left"
+_AddSubtractExpr_operator = Core.Name "operator"
+_AddSubtractExpr_right = Core.Name "right"
+data ConcatenationExpr =
+  ConcatenationExpr {
+    concatenationExprLeft :: ValueExpression,
+    concatenationExprRight :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_ConcatenationExpr = Core.Name "openGql.grammar.ConcatenationExpr"
+_ConcatenationExpr_left = Core.Name "left"
+_ConcatenationExpr_right = Core.Name "right"
+type NotExpr = ValueExpression
+_NotExpr = Core.Name "openGql.grammar.NotExpr"
+data IsNotExpr =
+  IsNotExpr {
+    isNotExprValueExpression :: ValueExpression,
+    isNotExprNot :: Bool,
+    isNotExprTruthValue :: TruthValue}
+  deriving (Eq, Ord, Read, Show)
+_IsNotExpr = Core.Name "openGql.grammar.IsNotExpr"
+_IsNotExpr_valueExpression = Core.Name "valueExpression"
+_IsNotExpr_not = Core.Name "not"
+_IsNotExpr_truthValue = Core.Name "truthValue"
+data ConjunctiveExpr =
+  ConjunctiveExpr {
+    conjunctiveExprLeft :: ValueExpression,
+    conjunctiveExprRight :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_ConjunctiveExpr = Core.Name "openGql.grammar.ConjunctiveExpr"
+_ConjunctiveExpr_left = Core.Name "left"
+_ConjunctiveExpr_right = Core.Name "right"
+data DisjunctiveExpr =
+  DisjunctiveExpr {
+    disjunctiveExprLeft :: ValueExpression,
+    disjunctiveExprOperator :: DisjunctiveOperator,
+    disjunctiveExprRight :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_DisjunctiveExpr = Core.Name "openGql.grammar.DisjunctiveExpr"
+_DisjunctiveExpr_left = Core.Name "left"
+_DisjunctiveExpr_operator = Core.Name "operator"
+_DisjunctiveExpr_right = Core.Name "right"
+data ComparisonExpr =
+  ComparisonExpr {
+    comparisonExprValueExpression :: ValueExpression,
+    comparisonExprComparison :: ComparisonPredicatePart2}
+  deriving (Eq, Ord, Read, Show)
+_ComparisonExpr = Core.Name "openGql.grammar.ComparisonExpr"
+_ComparisonExpr_valueExpression = Core.Name "valueExpression"
+_ComparisonExpr_comparison = Core.Name "comparison"
+data NormalizedPredicateExpr =
+  NormalizedPredicateExpr {
+    normalizedPredicateExprValueExpression :: ValueExpression,
+    normalizedPredicateExprNormalizedPredicate :: NormalizedPredicatePart2}
+  deriving (Eq, Ord, Read, Show)
+_NormalizedPredicateExpr = Core.Name "openGql.grammar.NormalizedPredicateExpr"
+_NormalizedPredicateExpr_valueExpression = Core.Name "valueExpression"
+_NormalizedPredicateExpr_normalizedPredicate = Core.Name "normalizedPredicate"
+data Sign =
+  SignPlus |
+  SignMinus
+  deriving (Eq, Ord, Read, Show)
+_Sign = Core.Name "openGql.grammar.Sign"
+_Sign_plus = Core.Name "plus"
+_Sign_minus = Core.Name "minus"
+data MultDivOperator =
+  MultDivOperatorMultiply |
+  MultDivOperatorDivide
+  deriving (Eq, Ord, Read, Show)
+_MultDivOperator = Core.Name "openGql.grammar.MultDivOperator"
+_MultDivOperator_multiply = Core.Name "multiply"
+_MultDivOperator_divide = Core.Name "divide"
+data AddSubtractOperator =
+  AddSubtractOperatorAdd |
+  AddSubtractOperatorSubtract
+  deriving (Eq, Ord, Read, Show)
+_AddSubtractOperator = Core.Name "openGql.grammar.AddSubtractOperator"
+_AddSubtractOperator_add = Core.Name "add"
+_AddSubtractOperator_subtract = Core.Name "subtract"
+data DisjunctiveOperator =
+  DisjunctiveOperatorOr |
+  DisjunctiveOperatorXor
+  deriving (Eq, Ord, Read, Show)
+_DisjunctiveOperator = Core.Name "openGql.grammar.DisjunctiveOperator"
+_DisjunctiveOperator_or = Core.Name "or"
+_DisjunctiveOperator_xor = Core.Name "xor"
+data ValueFunction =
+  ValueFunctionNumeric NumericValueFunction |
+  ValueFunctionDatetimeSubtraction DatetimeSubtraction |
+  ValueFunctionDatetime DatetimeValueFunction |
+  ValueFunctionDuration DurationValueFunction |
+  ValueFunctionCharacterOrByteString CharacterOrByteStringFunction |
+  ValueFunctionList ListValueFunction
+  deriving (Eq, Ord, Read, Show)
+_ValueFunction = Core.Name "openGql.grammar.ValueFunction"
+_ValueFunction_numeric = Core.Name "numeric"
+_ValueFunction_datetimeSubtraction = Core.Name "datetimeSubtraction"
+_ValueFunction_datetime = Core.Name "datetime"
+_ValueFunction_duration = Core.Name "duration"
+_ValueFunction_characterOrByteString = Core.Name "characterOrByteString"
+_ValueFunction_list = Core.Name "list"
+type BooleanValueExpression = ValueExpression
+_BooleanValueExpression = Core.Name "openGql.grammar.BooleanValueExpression"
+data CharacterOrByteStringFunction =
+  CharacterOrByteStringFunctionSub SubCharacterOrByteString |
+  CharacterOrByteStringFunctionTrimSingle TrimSingleCharacterOrByteString |
+  CharacterOrByteStringFunctionFold FoldCharacterString |
+  CharacterOrByteStringFunctionTrimMultiCharacter TrimMultiCharacterCharacterString |
+  CharacterOrByteStringFunctionNormalize NormalizeCharacterString
+  deriving (Eq, Ord, Read, Show)
+_CharacterOrByteStringFunction = Core.Name "openGql.grammar.CharacterOrByteStringFunction"
+_CharacterOrByteStringFunction_sub = Core.Name "sub"
+_CharacterOrByteStringFunction_trimSingle = Core.Name "trimSingle"
+_CharacterOrByteStringFunction_fold = Core.Name "fold"
+_CharacterOrByteStringFunction_trimMultiCharacter = Core.Name "trimMultiCharacter"
+_CharacterOrByteStringFunction_normalize = Core.Name "normalize"
+data SubCharacterOrByteString =
+  SubCharacterOrByteString {
+    subCharacterOrByteStringSide :: Side,
+    subCharacterOrByteStringValueExpression :: ValueExpression,
+    subCharacterOrByteStringStringLength :: StringLength}
+  deriving (Eq, Ord, Read, Show)
+_SubCharacterOrByteString = Core.Name "openGql.grammar.SubCharacterOrByteString"
+_SubCharacterOrByteString_side = Core.Name "side"
+_SubCharacterOrByteString_valueExpression = Core.Name "valueExpression"
+_SubCharacterOrByteString_stringLength = Core.Name "stringLength"
+data Side =
+  SideLeft |
+  SideRight
+  deriving (Eq, Ord, Read, Show)
+_Side = Core.Name "openGql.grammar.Side"
+_Side_left = Core.Name "left"
+_Side_right = Core.Name "right"
+type TrimSingleCharacterOrByteString = TrimOperands
+_TrimSingleCharacterOrByteString = Core.Name "openGql.grammar.TrimSingleCharacterOrByteString"
+data FoldCharacterString =
+  FoldCharacterString {
+    foldCharacterStringCase :: Case,
+    foldCharacterStringValueExpression :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_FoldCharacterString = Core.Name "openGql.grammar.FoldCharacterString"
+_FoldCharacterString_case = Core.Name "case"
+_FoldCharacterString_valueExpression = Core.Name "valueExpression"
+data Case =
+  CaseUpper |
+  CaseLower
+  deriving (Eq, Ord, Read, Show)
+_Case = Core.Name "openGql.grammar.Case"
+_Case_upper = Core.Name "upper"
+_Case_lower = Core.Name "lower"
+data TrimMultiCharacterCharacterString =
+  TrimMultiCharacterCharacterString {
+    trimMultiCharacterCharacterStringTrimType :: TrimType,
+    trimMultiCharacterCharacterStringValueExpression :: ValueExpression,
+    trimMultiCharacterCharacterStringOptionalValueExpression :: (Maybe ValueExpression)}
+  deriving (Eq, Ord, Read, Show)
+_TrimMultiCharacterCharacterString = Core.Name "openGql.grammar.TrimMultiCharacterCharacterString"
+_TrimMultiCharacterCharacterString_trimType = Core.Name "trimType"
+_TrimMultiCharacterCharacterString_valueExpression = Core.Name "valueExpression"
+_TrimMultiCharacterCharacterString_optionalValueExpression = Core.Name "optionalValueExpression"
+data TrimType =
+  TrimTypeBtrim |
+  TrimTypeLtrim |
+  TrimTypeRtrim
+  deriving (Eq, Ord, Read, Show)
+_TrimType = Core.Name "openGql.grammar.TrimType"
+_TrimType_btrim = Core.Name "btrim"
+_TrimType_ltrim = Core.Name "ltrim"
+_TrimType_rtrim = Core.Name "rtrim"
+data NormalizeCharacterString =
+  NormalizeCharacterString {
+    normalizeCharacterStringValueExpression :: ValueExpression,
+    normalizeCharacterStringNormalForm :: (Maybe NormalForm)}
+  deriving (Eq, Ord, Read, Show)
+_NormalizeCharacterString = Core.Name "openGql.grammar.NormalizeCharacterString"
+_NormalizeCharacterString_valueExpression = Core.Name "valueExpression"
+_NormalizeCharacterString_normalForm = Core.Name "normalForm"
+type NodeReferenceValueExpression = PrimaryValueExpression
+_NodeReferenceValueExpression = Core.Name "openGql.grammar.NodeReferenceValueExpression"
+type EdgeReferenceValueExpression = PrimaryValueExpression
+_EdgeReferenceValueExpression = Core.Name "openGql.grammar.EdgeReferenceValueExpression"
+type AggregatingValueExpression = ValueExpression
+_AggregatingValueExpression = Core.Name "openGql.grammar.AggregatingValueExpression"
+data PrimaryValueExpression =
+  PrimaryValueExpressionParenthesized ParenthesizedValueExpression |
+  PrimaryValueExpressionAggregateFunction AggregateFunction |
+  PrimaryValueExpressionUnsignedValueSpecification UnsignedValueSpecification |
+  PrimaryValueExpressionPathValueConstructor PathValueConstructor |
+  PrimaryValueExpressionPropertyReference PropertyReference |
+  PrimaryValueExpressionValueQueryExpression ValueQueryExpression |
+  PrimaryValueExpressionCaseExpression CaseExpression |
+  PrimaryValueExpressionCastSpecification CastSpecification |
+  PrimaryValueExpressionElementIdFunction ElementIdFunction |
+  PrimaryValueExpressionLetValueExpression LetValueExpression |
+  PrimaryValueExpressionBindingVariableReference BindingVariableReference
+  deriving (Eq, Ord, Read, Show)
+_PrimaryValueExpression = Core.Name "openGql.grammar.PrimaryValueExpression"
+_PrimaryValueExpression_parenthesized = Core.Name "parenthesized"
+_PrimaryValueExpression_aggregateFunction = Core.Name "aggregateFunction"
+_PrimaryValueExpression_unsignedValueSpecification = Core.Name "unsignedValueSpecification"
+_PrimaryValueExpression_pathValueConstructor = Core.Name "pathValueConstructor"
+_PrimaryValueExpression_propertyReference = Core.Name "propertyReference"
+_PrimaryValueExpression_valueQueryExpression = Core.Name "valueQueryExpression"
+_PrimaryValueExpression_caseExpression = Core.Name "caseExpression"
+_PrimaryValueExpression_castSpecification = Core.Name "castSpecification"
+_PrimaryValueExpression_elementIdFunction = Core.Name "elementIdFunction"
+_PrimaryValueExpression_letValueExpression = Core.Name "letValueExpression"
+_PrimaryValueExpression_bindingVariableReference = Core.Name "bindingVariableReference"
+type ParenthesizedValueExpression = ValueExpression
+_ParenthesizedValueExpression = Core.Name "openGql.grammar.ParenthesizedValueExpression"
+data NonParenthesizedPrimaryValueExpression =
+  NonParenthesizedPrimaryValueExpressionSpecial NonParenthesizedPrimaryValueExpressionSpecialCase |
+  NonParenthesizedPrimaryValueExpressionBindingVariable BindingVariableReference
+  deriving (Eq, Ord, Read, Show)
+_NonParenthesizedPrimaryValueExpression = Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpression"
+_NonParenthesizedPrimaryValueExpression_special = Core.Name "special"
+_NonParenthesizedPrimaryValueExpression_bindingVariable = Core.Name "bindingVariable"
+data NonParenthesizedPrimaryValueExpressionSpecialCase =
+  NonParenthesizedPrimaryValueExpressionSpecialCaseAggregateFunction AggregateFunction |
+  NonParenthesizedPrimaryValueExpressionSpecialCaseUnsignedValueSpecification UnsignedValueSpecification |
+  NonParenthesizedPrimaryValueExpressionSpecialCasePathValueConstructor PathValueConstructor |
+  NonParenthesizedPrimaryValueExpressionSpecialCasePropertyReference PropertyReference |
+  NonParenthesizedPrimaryValueExpressionSpecialCaseValueQueryExpression ValueQueryExpression |
+  NonParenthesizedPrimaryValueExpressionSpecialCaseCaseExpression CaseExpression |
+  NonParenthesizedPrimaryValueExpressionSpecialCaseCastSpecification CastSpecification |
+  NonParenthesizedPrimaryValueExpressionSpecialCaseElementIdFunction ElementIdFunction |
+  NonParenthesizedPrimaryValueExpressionSpecialCaseLetValueExpression LetValueExpression
+  deriving (Eq, Ord, Read, Show)
+_NonParenthesizedPrimaryValueExpressionSpecialCase =
+    Core.Name "openGql.grammar.NonParenthesizedPrimaryValueExpressionSpecialCase"
+_NonParenthesizedPrimaryValueExpressionSpecialCase_aggregateFunction = Core.Name "aggregateFunction"
+_NonParenthesizedPrimaryValueExpressionSpecialCase_unsignedValueSpecification = Core.Name "unsignedValueSpecification"
+_NonParenthesizedPrimaryValueExpressionSpecialCase_pathValueConstructor = Core.Name "pathValueConstructor"
+_NonParenthesizedPrimaryValueExpressionSpecialCase_propertyReference = Core.Name "propertyReference"
+_NonParenthesizedPrimaryValueExpressionSpecialCase_valueQueryExpression = Core.Name "valueQueryExpression"
+_NonParenthesizedPrimaryValueExpressionSpecialCase_caseExpression = Core.Name "caseExpression"
+_NonParenthesizedPrimaryValueExpressionSpecialCase_castSpecification = Core.Name "castSpecification"
+_NonParenthesizedPrimaryValueExpressionSpecialCase_elementIdFunction = Core.Name "elementIdFunction"
+_NonParenthesizedPrimaryValueExpressionSpecialCase_letValueExpression = Core.Name "letValueExpression"
+data UnsignedValueSpecification =
+  UnsignedValueSpecificationUnsignedLiteral UnsignedLiteral |
+  UnsignedValueSpecificationGeneralValueSpecification GeneralValueSpecification
+  deriving (Eq, Ord, Read, Show)
+_UnsignedValueSpecification = Core.Name "openGql.grammar.UnsignedValueSpecification"
+_UnsignedValueSpecification_unsignedLiteral = Core.Name "unsignedLiteral"
+_UnsignedValueSpecification_generalValueSpecification = Core.Name "generalValueSpecification"
+data NonNegativeIntegerSpecification =
+  NonNegativeIntegerSpecificationUnsignedInteger UnsignedInteger |
+  NonNegativeIntegerSpecificationDynamicParameterSpecification DynamicParameterSpecification
+  deriving (Eq, Ord, Read, Show)
+_NonNegativeIntegerSpecification = Core.Name "openGql.grammar.NonNegativeIntegerSpecification"
+_NonNegativeIntegerSpecification_unsignedInteger = Core.Name "unsignedInteger"
+_NonNegativeIntegerSpecification_dynamicParameterSpecification = Core.Name "dynamicParameterSpecification"
+data GeneralValueSpecification =
+  GeneralValueSpecificationDynamicParameterSpecification DynamicParameterSpecification |
+  GeneralValueSpecificationSessionUser
+  deriving (Eq, Ord, Read, Show)
+_GeneralValueSpecification = Core.Name "openGql.grammar.GeneralValueSpecification"
+_GeneralValueSpecification_dynamicParameterSpecification = Core.Name "dynamicParameterSpecification"
+_GeneralValueSpecification_sessionUser = Core.Name "sessionUser"
+type DynamicParameterSpecification = ParameterName
+_DynamicParameterSpecification = Core.Name "openGql.grammar.DynamicParameterSpecification"
+data LetValueExpression =
+  LetValueExpression {
+    letValueExpressionLetVariables :: LetVariableDefinitionList,
+    letValueExpressionValueExpression :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_LetValueExpression = Core.Name "openGql.grammar.LetValueExpression"
+_LetValueExpression_letVariables = Core.Name "letVariables"
+_LetValueExpression_valueExpression = Core.Name "valueExpression"
+type ValueQueryExpression = NestedQuerySpecification
+_ValueQueryExpression = Core.Name "openGql.grammar.ValueQueryExpression"
+data CaseExpression =
+  CaseExpressionAbbreviation CaseAbbreviation |
+  CaseExpressionSpecification CaseSpecification
+  deriving (Eq, Ord, Read, Show)
+_CaseExpression = Core.Name "openGql.grammar.CaseExpression"
+_CaseExpression_abbreviation = Core.Name "abbreviation"
+_CaseExpression_specification = Core.Name "specification"
+data CaseAbbreviation =
+  CaseAbbreviationNullIf NullIfAbbreviation |
+  CaseAbbreviationCoalesce [ValueExpression]
+  deriving (Eq, Ord, Read, Show)
+_CaseAbbreviation = Core.Name "openGql.grammar.CaseAbbreviation"
+_CaseAbbreviation_nullIf = Core.Name "nullIf"
+_CaseAbbreviation_coalesce = Core.Name "coalesce"
+data NullIfAbbreviation =
+  NullIfAbbreviation {
+    nullIfAbbreviationFirst :: ValueExpression,
+    nullIfAbbreviationSecond :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_NullIfAbbreviation = Core.Name "openGql.grammar.NullIfAbbreviation"
+_NullIfAbbreviation_first = Core.Name "first"
+_NullIfAbbreviation_second = Core.Name "second"
+data CaseSpecification =
+  CaseSpecificationSimple SimpleCase |
+  CaseSpecificationSearched SearchedCase
+  deriving (Eq, Ord, Read, Show)
+_CaseSpecification = Core.Name "openGql.grammar.CaseSpecification"
+_CaseSpecification_simple = Core.Name "simple"
+_CaseSpecification_searched = Core.Name "searched"
+data SimpleCase =
+  SimpleCase {
+    simpleCaseCaseOperand :: CaseOperand,
+    simpleCaseWhenClauses :: [SimpleWhenClause],
+    simpleCaseElseClause :: (Maybe ElseClause)}
+  deriving (Eq, Ord, Read, Show)
+_SimpleCase = Core.Name "openGql.grammar.SimpleCase"
+_SimpleCase_caseOperand = Core.Name "caseOperand"
+_SimpleCase_whenClauses = Core.Name "whenClauses"
+_SimpleCase_elseClause = Core.Name "elseClause"
+data SearchedCase =
+  SearchedCase {
+    searchedCaseWhenClauses :: [SearchedWhenClause],
+    searchedCaseElseClause :: (Maybe ElseClause)}
+  deriving (Eq, Ord, Read, Show)
+_SearchedCase = Core.Name "openGql.grammar.SearchedCase"
+_SearchedCase_whenClauses = Core.Name "whenClauses"
+_SearchedCase_elseClause = Core.Name "elseClause"
+data SimpleWhenClause =
+  SimpleWhenClause {
+    simpleWhenClauseWhenOperands :: WhenOperandList,
+    simpleWhenClauseResult :: Result}
+  deriving (Eq, Ord, Read, Show)
+_SimpleWhenClause = Core.Name "openGql.grammar.SimpleWhenClause"
+_SimpleWhenClause_whenOperands = Core.Name "whenOperands"
+_SimpleWhenClause_result = Core.Name "result"
+data SearchedWhenClause =
+  SearchedWhenClause {
+    searchedWhenClauseSearchCondition :: SearchCondition,
+    searchedWhenClauseResult :: Result}
+  deriving (Eq, Ord, Read, Show)
+_SearchedWhenClause = Core.Name "openGql.grammar.SearchedWhenClause"
+_SearchedWhenClause_searchCondition = Core.Name "searchCondition"
+_SearchedWhenClause_result = Core.Name "result"
+type ElseClause = Result
+_ElseClause = Core.Name "openGql.grammar.ElseClause"
+data CaseOperand =
+  CaseOperandValueExpression NonParenthesizedPrimaryValueExpression |
+  CaseOperandElementReference ElementVariableReference
+  deriving (Eq, Ord, Read, Show)
+_CaseOperand = Core.Name "openGql.grammar.CaseOperand"
+_CaseOperand_valueExpression = Core.Name "valueExpression"
+_CaseOperand_elementReference = Core.Name "elementReference"
+type WhenOperandList = [WhenOperand]
+_WhenOperandList = Core.Name "openGql.grammar.WhenOperandList"
+data WhenOperand =
+  WhenOperandValueExpression NonParenthesizedPrimaryValueExpression |
+  WhenOperandComparison ComparisonPredicatePart2 |
+  WhenOperandNullPredicate NullPredicatePart2 |
+  WhenOperandValueTypePredicate ValueTypePredicatePart2 |
+  WhenOperandNormalizedPredicate NormalizedPredicatePart2 |
+  WhenOperandDirectedPredicate DirectedPredicatePart2 |
+  WhenOperandLabeledPredicate LabeledPredicatePart2 |
+  WhenOperandSourcePredicate SourcePredicate |
+  WhenOperandDestinationPredicate DestinationPredicate
+  deriving (Eq, Ord, Read, Show)
+_WhenOperand = Core.Name "openGql.grammar.WhenOperand"
+_WhenOperand_valueExpression = Core.Name "valueExpression"
+_WhenOperand_comparison = Core.Name "comparison"
+_WhenOperand_nullPredicate = Core.Name "nullPredicate"
+_WhenOperand_valueTypePredicate = Core.Name "valueTypePredicate"
+_WhenOperand_normalizedPredicate = Core.Name "normalizedPredicate"
+_WhenOperand_directedPredicate = Core.Name "directedPredicate"
+_WhenOperand_labeledPredicate = Core.Name "labeledPredicate"
+_WhenOperand_sourcePredicate = Core.Name "sourcePredicate"
+_WhenOperand_destinationPredicate = Core.Name "destinationPredicate"
+data Result =
+  ResultSimple ResultExpression |
+  ResultNullLiteral
+  deriving (Eq, Ord, Read, Show)
+_Result = Core.Name "openGql.grammar.Result"
+_Result_simple = Core.Name "simple"
+_Result_nullLiteral = Core.Name "nullLiteral"
+type ResultExpression = ValueExpression
+_ResultExpression = Core.Name "openGql.grammar.ResultExpression"
+data CastSpecification =
+  CastSpecification {
+    castSpecificationOperand :: CastOperand,
+    castSpecificationTarget :: CastTarget}
+  deriving (Eq, Ord, Read, Show)
+_CastSpecification = Core.Name "openGql.grammar.CastSpecification"
+_CastSpecification_operand = Core.Name "operand"
+_CastSpecification_target = Core.Name "target"
+data CastOperand =
+  CastOperandValueExpression ValueExpression |
+  CastOperandNullLiteral
+  deriving (Eq, Ord, Read, Show)
+_CastOperand = Core.Name "openGql.grammar.CastOperand"
+_CastOperand_valueExpression = Core.Name "valueExpression"
+_CastOperand_nullLiteral = Core.Name "nullLiteral"
+type CastTarget = ValueType
+_CastTarget = Core.Name "openGql.grammar.CastTarget"
+data AggregateFunction =
+  AggregateFunctionCountAll |
+  AggregateFunctionGeneralSetFunction GeneralSetFunction |
+  AggregateFunctionBinarySetFunction BinarySetFunction
+  deriving (Eq, Ord, Read, Show)
+_AggregateFunction = Core.Name "openGql.grammar.AggregateFunction"
+_AggregateFunction_countAll = Core.Name "countAll"
+_AggregateFunction_generalSetFunction = Core.Name "generalSetFunction"
+_AggregateFunction_binarySetFunction = Core.Name "binarySetFunction"
+data GeneralSetFunction =
+  GeneralSetFunction {
+    generalSetFunctionFunctionType :: GeneralSetFunctionType,
+    generalSetFunctionSetQuantifier :: (Maybe SetQuantifier),
+    generalSetFunctionValueExpression :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_GeneralSetFunction = Core.Name "openGql.grammar.GeneralSetFunction"
+_GeneralSetFunction_functionType = Core.Name "functionType"
+_GeneralSetFunction_setQuantifier = Core.Name "setQuantifier"
+_GeneralSetFunction_valueExpression = Core.Name "valueExpression"
+data BinarySetFunction =
+  BinarySetFunction {
+    binarySetFunctionFunctionType :: BinarySetFunctionType,
+    binarySetFunctionDependentValue :: DependentValueExpression,
+    binarySetFunctionIndependentValue :: IndependentValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_BinarySetFunction = Core.Name "openGql.grammar.BinarySetFunction"
+_BinarySetFunction_functionType = Core.Name "functionType"
+_BinarySetFunction_dependentValue = Core.Name "dependentValue"
+_BinarySetFunction_independentValue = Core.Name "independentValue"
+data GeneralSetFunctionType =
+  GeneralSetFunctionTypeAvg |
+  GeneralSetFunctionTypeCount |
+  GeneralSetFunctionTypeMax |
+  GeneralSetFunctionTypeMin |
+  GeneralSetFunctionTypeSum |
+  GeneralSetFunctionTypeCollectList |
+  GeneralSetFunctionTypeStddevSamp |
+  GeneralSetFunctionTypeStddevPop
+  deriving (Eq, Ord, Read, Show)
+_GeneralSetFunctionType = Core.Name "openGql.grammar.GeneralSetFunctionType"
+_GeneralSetFunctionType_avg = Core.Name "avg"
+_GeneralSetFunctionType_count = Core.Name "count"
+_GeneralSetFunctionType_max = Core.Name "max"
+_GeneralSetFunctionType_min = Core.Name "min"
+_GeneralSetFunctionType_sum = Core.Name "sum"
+_GeneralSetFunctionType_collectList = Core.Name "collectList"
+_GeneralSetFunctionType_stddevSamp = Core.Name "stddevSamp"
+_GeneralSetFunctionType_stddevPop = Core.Name "stddevPop"
+data SetQuantifier =
+  SetQuantifierDistinct |
+  SetQuantifierAll
+  deriving (Eq, Ord, Read, Show)
+_SetQuantifier = Core.Name "openGql.grammar.SetQuantifier"
+_SetQuantifier_distinct = Core.Name "distinct"
+_SetQuantifier_all = Core.Name "all"
+data BinarySetFunctionType =
+  BinarySetFunctionTypePercentileCont |
+  BinarySetFunctionTypePercentileDisc
+  deriving (Eq, Ord, Read, Show)
+_BinarySetFunctionType = Core.Name "openGql.grammar.BinarySetFunctionType"
+_BinarySetFunctionType_percentileCont = Core.Name "percentileCont"
+_BinarySetFunctionType_percentileDisc = Core.Name "percentileDisc"
+data DependentValueExpression =
+  DependentValueExpression {
+    dependentValueExpressionSetQuantifier :: (Maybe SetQuantifier),
+    dependentValueExpressionNumericValue :: NumericValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_DependentValueExpression = Core.Name "openGql.grammar.DependentValueExpression"
+_DependentValueExpression_setQuantifier = Core.Name "setQuantifier"
+_DependentValueExpression_numericValue = Core.Name "numericValue"
+type IndependentValueExpression = NumericValueExpression
+_IndependentValueExpression = Core.Name "openGql.grammar.IndependentValueExpression"
+type ElementIdFunction = ElementVariableReference
+_ElementIdFunction = Core.Name "openGql.grammar.ElementIdFunction"
+data PropertyReference =
+  PropertyReference {
+    propertyReferenceValueExpression :: PrimaryValueExpression,
+    propertyReferencePropertyName :: PropertyName}
+  deriving (Eq, Ord, Read, Show)
+_PropertyReference = Core.Name "openGql.grammar.PropertyReference"
+_PropertyReference_valueExpression = Core.Name "valueExpression"
+_PropertyReference_propertyName = Core.Name "propertyName"
+type BindingVariableReference = BindingVariable
+_BindingVariableReference = Core.Name "openGql.grammar.BindingVariableReference"
+type PathValueExpression = ValueExpression
+_PathValueExpression = Core.Name "openGql.grammar.PathValueExpression"
+type PathValueConstructor = PathValueConstructorByEnumeration
+_PathValueConstructor = Core.Name "openGql.grammar.PathValueConstructor"
+type PathValueConstructorByEnumeration = PathElementList
+_PathValueConstructorByEnumeration = Core.Name "openGql.grammar.PathValueConstructorByEnumeration"
+data PathElementList =
+  PathElementList {
+    pathElementListStart :: PathElementListStart,
+    pathElementListSteps :: [PathElementListStep]}
+  deriving (Eq, Ord, Read, Show)
+_PathElementList = Core.Name "openGql.grammar.PathElementList"
+_PathElementList_start = Core.Name "start"
+_PathElementList_steps = Core.Name "steps"
+type PathElementListStart = NodeReferenceValueExpression
+_PathElementListStart = Core.Name "openGql.grammar.PathElementListStart"
+data PathElementListStep =
+  PathElementListStep {
+    pathElementListStepEdgeReference :: EdgeReferenceValueExpression,
+    pathElementListStepNodeReference :: NodeReferenceValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_PathElementListStep = Core.Name "openGql.grammar.PathElementListStep"
+_PathElementListStep_edgeReference = Core.Name "edgeReference"
+_PathElementListStep_nodeReference = Core.Name "nodeReference"
+type ListValueExpression = ValueExpression
+_ListValueExpression = Core.Name "openGql.grammar.ListValueExpression"
+data ListValueFunction =
+  ListValueFunctionTrim TrimListFunction |
+  ListValueFunctionElements ElementsFunction
+  deriving (Eq, Ord, Read, Show)
+_ListValueFunction = Core.Name "openGql.grammar.ListValueFunction"
+_ListValueFunction_trim = Core.Name "trim"
+_ListValueFunction_elements = Core.Name "elements"
+data TrimListFunction =
+  TrimListFunction {
+    trimListFunctionListValue :: ListValueExpression,
+    trimListFunctionNumericValue :: NumericValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_TrimListFunction = Core.Name "openGql.grammar.TrimListFunction"
+_TrimListFunction_listValue = Core.Name "listValue"
+_TrimListFunction_numericValue = Core.Name "numericValue"
+type ElementsFunction = PathValueExpression
+_ElementsFunction = Core.Name "openGql.grammar.ElementsFunction"
+type ListValueConstructor = ListValueConstructorByEnumeration
+_ListValueConstructor = Core.Name "openGql.grammar.ListValueConstructor"
+data ListValueConstructorByEnumeration =
+  ListValueConstructorByEnumeration {
+    listValueConstructorByEnumerationListValueTypeName :: (Maybe ListValueTypeName),
+    listValueConstructorByEnumerationElements :: (Maybe ListElementList)}
+  deriving (Eq, Ord, Read, Show)
+_ListValueConstructorByEnumeration = Core.Name "openGql.grammar.ListValueConstructorByEnumeration"
+_ListValueConstructorByEnumeration_listValueTypeName = Core.Name "listValueTypeName"
+_ListValueConstructorByEnumeration_elements = Core.Name "elements"
+type ListElementList = [ListElement]
+_ListElementList = Core.Name "openGql.grammar.ListElementList"
+type ListElement = ValueExpression
+_ListElement = Core.Name "openGql.grammar.ListElement"
+type RecordConstructor = FieldsSpecification
+_RecordConstructor = Core.Name "openGql.grammar.RecordConstructor"
+type FieldsSpecification = (Maybe FieldList)
+_FieldsSpecification = Core.Name "openGql.grammar.FieldsSpecification"
+type FieldList = [Field]
+_FieldList = Core.Name "openGql.grammar.FieldList"
+data Field =
+  Field {
+    fieldName :: FieldName,
+    fieldValue :: ValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_Field = Core.Name "openGql.grammar.Field"
+_Field_name = Core.Name "name"
+_Field_value = Core.Name "value"
+type TruthValue = BooleanLiteral
+_TruthValue = Core.Name "openGql.grammar.TruthValue"
+data NumericValueExpression =
+  NumericValueExpressionSigned SignedNumericValueExpression |
+  NumericValueExpressionMultiplicationOrDivision MulDivNumericValueExpression |
+  NumericValueExpressionAdditionOrSubtraction AddSubNumericValueExpression |
+  NumericValueExpressionPrimary PrimaryValueExpression |
+  NumericValueExpressionFunction NumericValueFunction
+  deriving (Eq, Ord, Read, Show)
+_NumericValueExpression = Core.Name "openGql.grammar.NumericValueExpression"
+_NumericValueExpression_signed = Core.Name "signed"
+_NumericValueExpression_multiplicationOrDivision = Core.Name "multiplicationOrDivision"
+_NumericValueExpression_additionOrSubtraction = Core.Name "additionOrSubtraction"
+_NumericValueExpression_primary = Core.Name "primary"
+_NumericValueExpression_function = Core.Name "function"
+data SignedNumericValueExpression =
+  SignedNumericValueExpression {
+    signedNumericValueExpressionSign :: Sign,
+    signedNumericValueExpressionExpression :: NumericValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_SignedNumericValueExpression = Core.Name "openGql.grammar.SignedNumericValueExpression"
+_SignedNumericValueExpression_sign = Core.Name "sign"
+_SignedNumericValueExpression_expression = Core.Name "expression"
+data MulDivNumericValueExpression =
+  MulDivNumericValueExpression {
+    mulDivNumericValueExpressionLeft :: NumericValueExpression,
+    mulDivNumericValueExpressionOperator :: MultDivOperator,
+    mulDivNumericValueExpressionRight :: NumericValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_MulDivNumericValueExpression = Core.Name "openGql.grammar.MulDivNumericValueExpression"
+_MulDivNumericValueExpression_left = Core.Name "left"
+_MulDivNumericValueExpression_operator = Core.Name "operator"
+_MulDivNumericValueExpression_right = Core.Name "right"
+data AddSubNumericValueExpression =
+  AddSubNumericValueExpression {
+    addSubNumericValueExpressionLeft :: NumericValueExpression,
+    addSubNumericValueExpressionOperator :: AddSubtractOperator,
+    addSubNumericValueExpressionRight :: NumericValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_AddSubNumericValueExpression = Core.Name "openGql.grammar.AddSubNumericValueExpression"
+_AddSubNumericValueExpression_left = Core.Name "left"
+_AddSubNumericValueExpression_operator = Core.Name "operator"
+_AddSubNumericValueExpression_right = Core.Name "right"
+data NumericValueFunction =
+  NumericValueFunctionLength LengthExpression |
+  NumericValueFunctionCardinality CardinalityExpression |
+  NumericValueFunctionAbsoluteValue AbsoluteValueExpression |
+  NumericValueFunctionModulus ModulusExpression |
+  NumericValueFunctionTrigonometric TrigonometricFunction |
+  NumericValueFunctionLogarithm GeneralLogarithmFunction |
+  NumericValueFunctionCommonLogarithm CommonLogarithm |
+  NumericValueFunctionNaturalLogarithm NaturalLogarithm |
+  NumericValueFunctionExponential ExponentialFunction |
+  NumericValueFunctionPower PowerFunction |
+  NumericValueFunctionSquareRoot SquareRoot |
+  NumericValueFunctionFloor FloorFunction |
+  NumericValueFunctionCeiling CeilingFunction
+  deriving (Eq, Ord, Read, Show)
+_NumericValueFunction = Core.Name "openGql.grammar.NumericValueFunction"
+_NumericValueFunction_length = Core.Name "length"
+_NumericValueFunction_cardinality = Core.Name "cardinality"
+_NumericValueFunction_absoluteValue = Core.Name "absoluteValue"
+_NumericValueFunction_modulus = Core.Name "modulus"
+_NumericValueFunction_trigonometric = Core.Name "trigonometric"
+_NumericValueFunction_logarithm = Core.Name "logarithm"
+_NumericValueFunction_commonLogarithm = Core.Name "commonLogarithm"
+_NumericValueFunction_naturalLogarithm = Core.Name "naturalLogarithm"
+_NumericValueFunction_exponential = Core.Name "exponential"
+_NumericValueFunction_power = Core.Name "power"
+_NumericValueFunction_squareRoot = Core.Name "squareRoot"
+_NumericValueFunction_floor = Core.Name "floor"
+_NumericValueFunction_ceiling = Core.Name "ceiling"
+data LengthExpression =
+  LengthExpressionChar CharLengthExpression |
+  LengthExpressionByte ByteLengthExpression |
+  LengthExpressionPath PathLengthExpression
+  deriving (Eq, Ord, Read, Show)
+_LengthExpression = Core.Name "openGql.grammar.LengthExpression"
+_LengthExpression_char = Core.Name "char"
+_LengthExpression_byte = Core.Name "byte"
+_LengthExpression_path = Core.Name "path"
+data CardinalityExpression =
+  CardinalityExpressionCardinality CardinalityArgumentExpression |
+  CardinalityExpressionSize ListValueExpression
+  deriving (Eq, Ord, Read, Show)
+_CardinalityExpression = Core.Name "openGql.grammar.CardinalityExpression"
+_CardinalityExpression_cardinality = Core.Name "cardinality"
+_CardinalityExpression_size = Core.Name "size"
+type CardinalityArgumentExpression = ValueExpression
+_CardinalityArgumentExpression = Core.Name "openGql.grammar.CardinalityArgumentExpression"
+type CharLengthExpression = CharacterStringValueExpression
+_CharLengthExpression = Core.Name "openGql.grammar.CharLengthExpression"
+type ByteLengthExpression = ByteStringValueExpression
+_ByteLengthExpression = Core.Name "openGql.grammar.ByteLengthExpression"
+type PathLengthExpression = PathValueExpression
+_PathLengthExpression = Core.Name "openGql.grammar.PathLengthExpression"
+type AbsoluteValueExpression = ValueExpression
+_AbsoluteValueExpression = Core.Name "openGql.grammar.AbsoluteValueExpression"
+data ModulusExpression =
+  ModulusExpression {
+    modulusExpressionDividend :: NumericValueExpressionDividend,
+    modulusExpressionDivisor :: NumericValueExpressionDivisor}
+  deriving (Eq, Ord, Read, Show)
+_ModulusExpression = Core.Name "openGql.grammar.ModulusExpression"
+_ModulusExpression_dividend = Core.Name "dividend"
+_ModulusExpression_divisor = Core.Name "divisor"
+type NumericValueExpressionDividend = NumericValueExpression
+_NumericValueExpressionDividend = Core.Name "openGql.grammar.NumericValueExpressionDividend"
+type NumericValueExpressionDivisor = NumericValueExpression
+_NumericValueExpressionDivisor = Core.Name "openGql.grammar.NumericValueExpressionDivisor"
+data TrigonometricFunction =
+  TrigonometricFunction {
+    trigonometricFunctionName :: TrigonometricFunctionName,
+    trigonometricFunctionValue :: NumericValueExpression}
+  deriving (Eq, Ord, Read, Show)
+_TrigonometricFunction = Core.Name "openGql.grammar.TrigonometricFunction"
+_TrigonometricFunction_name = Core.Name "name"
+_TrigonometricFunction_value = Core.Name "value"
+data TrigonometricFunctionName =
+  TrigonometricFunctionNameSin |
+  TrigonometricFunctionNameCos |
+  TrigonometricFunctionNameTan |
+  TrigonometricFunctionNameCot |
+  TrigonometricFunctionNameSinh |
+  TrigonometricFunctionNameCosh |
+  TrigonometricFunctionNameTanh |
+  TrigonometricFunctionNameAsin |
+  TrigonometricFunctionNameAcos |
+  TrigonometricFunctionNameAtan |
+  TrigonometricFunctionNameDegrees |
+  TrigonometricFunctionNameRadians
+  deriving (Eq, Ord, Read, Show)
+_TrigonometricFunctionName = Core.Name "openGql.grammar.TrigonometricFunctionName"
+_TrigonometricFunctionName_sin = Core.Name "sin"
+_TrigonometricFunctionName_cos = Core.Name "cos"
+_TrigonometricFunctionName_tan = Core.Name "tan"
+_TrigonometricFunctionName_cot = Core.Name "cot"
+_TrigonometricFunctionName_sinh = Core.Name "sinh"
+_TrigonometricFunctionName_cosh = Core.Name "cosh"
+_TrigonometricFunctionName_tanh = Core.Name "tanh"
+_TrigonometricFunctionName_asin = Core.Name "asin"
+_TrigonometricFunctionName_acos = Core.Name "acos"
+_TrigonometricFunctionName_atan = Core.Name "atan"
+_TrigonometricFunctionName_degrees = Core.Name "degrees"
+_TrigonometricFunctionName_radians = Core.Name "radians"
+data GeneralLogarithmFunction =
+  GeneralLogarithmFunction {
+    generalLogarithmFunctionBase :: GeneralLogarithmBase,
+    generalLogarithmFunctionArgument :: GeneralLogarithmArgument}
+  deriving (Eq, Ord, Read, Show)
+_GeneralLogarithmFunction = Core.Name "openGql.grammar.GeneralLogarithmFunction"
+_GeneralLogarithmFunction_base = Core.Name "base"
+_GeneralLogarithmFunction_argument = Core.Name "argument"
+type GeneralLogarithmBase = NumericValueExpression
+_GeneralLogarithmBase = Core.Name "openGql.grammar.GeneralLogarithmBase"
+type GeneralLogarithmArgument = NumericValueExpression
+_GeneralLogarithmArgument = Core.Name "openGql.grammar.GeneralLogarithmArgument"
+type CommonLogarithm = NumericValueExpression
+_CommonLogarithm = Core.Name "openGql.grammar.CommonLogarithm"
+type NaturalLogarithm = NumericValueExpression
+_NaturalLogarithm = Core.Name "openGql.grammar.NaturalLogarithm"
+type ExponentialFunction = NumericValueExpression
+_ExponentialFunction = Core.Name "openGql.grammar.ExponentialFunction"
+data PowerFunction =
+  PowerFunction {
+    powerFunctionBase :: NumericValueExpressionBase,
+    powerFunctionExponent :: NumericValueExpressionExponent}
+  deriving (Eq, Ord, Read, Show)
+_PowerFunction = Core.Name "openGql.grammar.PowerFunction"
+_PowerFunction_base = Core.Name "base"
+_PowerFunction_exponent = Core.Name "exponent"
+type NumericValueExpressionBase = NumericValueExpression
+_NumericValueExpressionBase = Core.Name "openGql.grammar.NumericValueExpressionBase"
+type NumericValueExpressionExponent = NumericValueExpression
+_NumericValueExpressionExponent = Core.Name "openGql.grammar.NumericValueExpressionExponent"
+type SquareRoot = NumericValueExpression
+_SquareRoot = Core.Name "openGql.grammar.SquareRoot"
+type FloorFunction = NumericValueExpression
+_FloorFunction = Core.Name "openGql.grammar.FloorFunction"
+type CeilingFunction = NumericValueExpression
+_CeilingFunction = Core.Name "openGql.grammar.CeilingFunction"
+type CharacterStringValueExpression = ValueExpression
+_CharacterStringValueExpression = Core.Name "openGql.grammar.CharacterStringValueExpression"
+type ByteStringValueExpression = ValueExpression
+_ByteStringValueExpression = Core.Name "openGql.grammar.ByteStringValueExpression"
+data TrimOperands =
+  TrimOperands {
+    trimOperandsSpecification :: (Maybe TrimSpecification),
+    trimOperandsCharacterOrByteString :: (Maybe TrimCharacterOrByteString),
+    trimOperandsSource :: TrimCharacterOrByteStringSource}
+  deriving (Eq, Ord, Read, Show)
+_TrimOperands = Core.Name "openGql.grammar.TrimOperands"
+_TrimOperands_specification = Core.Name "specification"
+_TrimOperands_characterOrByteString = Core.Name "characterOrByteString"
+_TrimOperands_source = Core.Name "source"
+type TrimCharacterOrByteStringSource = ValueExpression
+_TrimCharacterOrByteStringSource = Core.Name "openGql.grammar.TrimCharacterOrByteStringSource"
+data TrimSpecification =
+  TrimSpecificationLeading |
+  TrimSpecificationTrailing |
+  TrimSpecificationBoth
+  deriving (Eq, Ord, Read, Show)
+_TrimSpecification = Core.Name "openGql.grammar.TrimSpecification"
+_TrimSpecification_leading = Core.Name "leading"
+_TrimSpecification_trailing = Core.Name "trailing"
+_TrimSpecification_both = Core.Name "both"
+type TrimCharacterOrByteString = ValueExpression
+_TrimCharacterOrByteString = Core.Name "openGql.grammar.TrimCharacterOrByteString"
+data NormalForm =
+  NormalFormNfc |
+  NormalFormNfd |
+  NormalFormNfkc |
+  NormalFormNfkd
+  deriving (Eq, Ord, Read, Show)
+_NormalForm = Core.Name "openGql.grammar.NormalForm"
+_NormalForm_nfc = Core.Name "nfc"
+_NormalForm_nfd = Core.Name "nfd"
+_NormalForm_nfkc = Core.Name "nfkc"
+_NormalForm_nfkd = Core.Name "nfkd"
+type StringLength = NumericValueExpression
+_StringLength = Core.Name "openGql.grammar.StringLength"
+type DatetimeValueExpression = ValueExpression
+_DatetimeValueExpression = Core.Name "openGql.grammar.DatetimeValueExpression"
+data DatetimeValueFunction =
+  DatetimeValueFunctionDateFunction DateFunction |
+  DatetimeValueFunctionTimeFunction TimeFunction |
+  DatetimeValueFunctionDatetimeFunction DatetimeFunction |
+  DatetimeValueFunctionLocaltimeFunction LocaltimeFunction |
+  DatetimeValueFunctionLocaldatetimeFunction LocaldatetimeFunction
+  deriving (Eq, Ord, Read, Show)
+_DatetimeValueFunction = Core.Name "openGql.grammar.DatetimeValueFunction"
+_DatetimeValueFunction_dateFunction = Core.Name "dateFunction"
+_DatetimeValueFunction_timeFunction = Core.Name "timeFunction"
+_DatetimeValueFunction_datetimeFunction = Core.Name "datetimeFunction"
+_DatetimeValueFunction_localtimeFunction = Core.Name "localtimeFunction"
+_DatetimeValueFunction_localdatetimeFunction = Core.Name "localdatetimeFunction"
+data DateFunction =
+  DateFunctionCurrentDate |
+  DateFunctionDateWithParams (Maybe DateFunctionParameters)
+  deriving (Eq, Ord, Read, Show)
+_DateFunction = Core.Name "openGql.grammar.DateFunction"
+_DateFunction_currentDate = Core.Name "currentDate"
+_DateFunction_dateWithParams = Core.Name "dateWithParams"
+data TimeFunction =
+  TimeFunctionCurrentTime |
+  TimeFunctionZonedTimeWithParams (Maybe TimeFunctionParameters)
+  deriving (Eq, Ord, Read, Show)
+_TimeFunction = Core.Name "openGql.grammar.TimeFunction"
+_TimeFunction_currentTime = Core.Name "currentTime"
+_TimeFunction_zonedTimeWithParams = Core.Name "zonedTimeWithParams"
+type LocaltimeFunction = (Maybe TimeFunctionParameters)
+_LocaltimeFunction = Core.Name "openGql.grammar.LocaltimeFunction"
+data DatetimeFunction =
+  DatetimeFunctionCurrentTimestamp |
+  DatetimeFunctionZonedDatetimeWithParams (Maybe DatetimeFunctionParameters)
+  deriving (Eq, Ord, Read, Show)
+_DatetimeFunction = Core.Name "openGql.grammar.DatetimeFunction"
+_DatetimeFunction_currentTimestamp = Core.Name "currentTimestamp"
+_DatetimeFunction_zonedDatetimeWithParams = Core.Name "zonedDatetimeWithParams"
+data LocaldatetimeFunction =
+  LocaldatetimeFunctionLocalTimestamp |
+  LocaldatetimeFunctionLocalDatetimeWithParams (Maybe DatetimeFunctionParameters)
+  deriving (Eq, Ord, Read, Show)
+_LocaldatetimeFunction = Core.Name "openGql.grammar.LocaldatetimeFunction"
+_LocaldatetimeFunction_localTimestamp = Core.Name "localTimestamp"
+_LocaldatetimeFunction_localDatetimeWithParams = Core.Name "localDatetimeWithParams"
+data DateFunctionParameters =
+  DateFunctionParametersDateString DateString |
+  DateFunctionParametersRecordConstructor RecordConstructor
+  deriving (Eq, Ord, Read, Show)
+_DateFunctionParameters = Core.Name "openGql.grammar.DateFunctionParameters"
+_DateFunctionParameters_dateString = Core.Name "dateString"
+_DateFunctionParameters_recordConstructor = Core.Name "recordConstructor"
+data TimeFunctionParameters =
+  TimeFunctionParametersTimeString TimeString |
+  TimeFunctionParametersRecordConstructor RecordConstructor
+  deriving (Eq, Ord, Read, Show)
+_TimeFunctionParameters = Core.Name "openGql.grammar.TimeFunctionParameters"
+_TimeFunctionParameters_timeString = Core.Name "timeString"
+_TimeFunctionParameters_recordConstructor = Core.Name "recordConstructor"
+data DatetimeFunctionParameters =
+  DatetimeFunctionParametersDatetimeString DatetimeString |
+  DatetimeFunctionParametersRecordConstructor RecordConstructor
+  deriving (Eq, Ord, Read, Show)
+_DatetimeFunctionParameters = Core.Name "openGql.grammar.DatetimeFunctionParameters"
+_DatetimeFunctionParameters_datetimeString = Core.Name "datetimeString"
+_DatetimeFunctionParameters_recordConstructor = Core.Name "recordConstructor"
+type DurationValueExpression = ValueExpression
+_DurationValueExpression = Core.Name "openGql.grammar.DurationValueExpression"
+data DatetimeSubtraction =
+  DatetimeSubtraction {
+    datetimeSubtractionParameters :: DatetimeSubtractionParameters,
+    datetimeSubtractionTemporalDurationQualifier :: (Maybe TemporalDurationQualifier)}
+  deriving (Eq, Ord, Read, Show)
+_DatetimeSubtraction = Core.Name "openGql.grammar.DatetimeSubtraction"
+_DatetimeSubtraction_parameters = Core.Name "parameters"
+_DatetimeSubtraction_temporalDurationQualifier = Core.Name "temporalDurationQualifier"
+data DatetimeSubtractionParameters =
+  DatetimeSubtractionParameters {
+    datetimeSubtractionParametersExpression1 :: DatetimeValueExpression1,
+    datetimeSubtractionParametersExpression2 :: DatetimeValueExpression2}
+  deriving (Eq, Ord, Read, Show)
+_DatetimeSubtractionParameters = Core.Name "openGql.grammar.DatetimeSubtractionParameters"
+_DatetimeSubtractionParameters_expression1 = Core.Name "expression1"
+_DatetimeSubtractionParameters_expression2 = Core.Name "expression2"
+type DatetimeValueExpression1 = DatetimeValueExpression
+_DatetimeValueExpression1 = Core.Name "openGql.grammar.DatetimeValueExpression1"
+type DatetimeValueExpression2 = DatetimeValueExpression
+_DatetimeValueExpression2 = Core.Name "openGql.grammar.DatetimeValueExpression2"
+data DurationValueFunction =
+  DurationValueFunctionDurationFunction DurationFunction |
+  DurationValueFunctionAbsoluteValue AbsoluteValueExpression
+  deriving (Eq, Ord, Read, Show)
+_DurationValueFunction = Core.Name "openGql.grammar.DurationValueFunction"
+_DurationValueFunction_durationFunction = Core.Name "durationFunction"
+_DurationValueFunction_absoluteValue = Core.Name "absoluteValue"
+type DurationFunction = DurationFunctionParameters
+_DurationFunction = Core.Name "openGql.grammar.DurationFunction"
+data DurationFunctionParameters =
+  DurationFunctionParametersDurationString DurationString |
+  DurationFunctionParametersRecordConstructor RecordConstructor
+  deriving (Eq, Ord, Read, Show)
+_DurationFunctionParameters = Core.Name "openGql.grammar.DurationFunctionParameters"
+_DurationFunctionParameters_durationString = Core.Name "durationString"
+_DurationFunctionParameters_recordConstructor = Core.Name "recordConstructor"
+type ObjectName = String
+_ObjectName = Core.Name "openGql.grammar.ObjectName"
+type ObjectNameOrBindingVariable = String
+_ObjectNameOrBindingVariable = Core.Name "openGql.grammar.ObjectNameOrBindingVariable"
+type DirectoryName = String
+_DirectoryName = Core.Name "openGql.grammar.DirectoryName"
+type SchemaName = String
+_SchemaName = Core.Name "openGql.grammar.SchemaName"
+type GraphName = String
+_GraphName = Core.Name "openGql.grammar.GraphName"
+type DelimitedGraphName = String
+_DelimitedGraphName = Core.Name "openGql.grammar.DelimitedGraphName"
+type GraphTypeName = String
+_GraphTypeName = Core.Name "openGql.grammar.GraphTypeName"
+type NodeTypeName = String
+_NodeTypeName = Core.Name "openGql.grammar.NodeTypeName"
+type EdgeTypeName = String
+_EdgeTypeName = Core.Name "openGql.grammar.EdgeTypeName"
+data BindingTableName =
+  BindingTableNameRegularIdentifier String |
+  BindingTableNameDelimitedBindingTableName DelimitedBindingTableName
+  deriving (Eq, Ord, Read, Show)
+_BindingTableName = Core.Name "openGql.grammar.BindingTableName"
+_BindingTableName_regularIdentifier = Core.Name "regularIdentifier"
+_BindingTableName_delimitedBindingTableName = Core.Name "delimitedBindingTableName"
+type DelimitedBindingTableName = String
+_DelimitedBindingTableName = Core.Name "openGql.grammar.DelimitedBindingTableName"
+type ProcedureName = String
+_ProcedureName = Core.Name "openGql.grammar.ProcedureName"
+type LabelName = String
+_LabelName = Core.Name "openGql.grammar.LabelName"
+type PropertyName = String
+_PropertyName = Core.Name "openGql.grammar.PropertyName"
+type FieldName = String
+_FieldName = Core.Name "openGql.grammar.FieldName"
+type ElementVariable = BindingVariable
+_ElementVariable = Core.Name "openGql.grammar.ElementVariable"
+type PathVariable = BindingVariable
+_PathVariable = Core.Name "openGql.grammar.PathVariable"
+type SubpathVariable = String
+_SubpathVariable = Core.Name "openGql.grammar.SubpathVariable"
+type BindingVariable = String
+_BindingVariable = Core.Name "openGql.grammar.BindingVariable"
+data UnsignedLiteral =
+  UnsignedLiteralNumeric UnsignedNumericLiteral |
+  UnsignedLiteralGeneral GeneralLiteral
+  deriving (Eq, Ord, Read, Show)
+_UnsignedLiteral = Core.Name "openGql.grammar.UnsignedLiteral"
+_UnsignedLiteral_numeric = Core.Name "numeric"
+_UnsignedLiteral_general = Core.Name "general"
+data GeneralLiteral =
+  GeneralLiteralBoolean BooleanLiteral |
+  GeneralLiteralCharacterString CharacterStringLiteral |
+  GeneralLiteralByteString ByteStringLiteral |
+  GeneralLiteralTemporal TemporalLiteral |
+  GeneralLiteralDuration DurationLiteral |
+  GeneralLiteralNullLiteral NullLiteral |
+  GeneralLiteralList ListLiteral |
+  GeneralLiteralRecord RecordLiteral
+  deriving (Eq, Ord, Read, Show)
+_GeneralLiteral = Core.Name "openGql.grammar.GeneralLiteral"
+_GeneralLiteral_boolean = Core.Name "boolean"
+_GeneralLiteral_characterString = Core.Name "characterString"
+_GeneralLiteral_byteString = Core.Name "byteString"
+_GeneralLiteral_temporal = Core.Name "temporal"
+_GeneralLiteral_duration = Core.Name "duration"
+_GeneralLiteral_nullLiteral = Core.Name "nullLiteral"
+_GeneralLiteral_list = Core.Name "list"
+_GeneralLiteral_record = Core.Name "record"
+data TemporalLiteral =
+  TemporalLiteralDate DateLiteral |
+  TemporalLiteralTime TimeLiteral |
+  TemporalLiteralDatetime DatetimeLiteral
+  deriving (Eq, Ord, Read, Show)
+_TemporalLiteral = Core.Name "openGql.grammar.TemporalLiteral"
+_TemporalLiteral_date = Core.Name "date"
+_TemporalLiteral_time = Core.Name "time"
+_TemporalLiteral_datetime = Core.Name "datetime"
+type DateLiteral = DateString
+_DateLiteral = Core.Name "openGql.grammar.DateLiteral"
+type TimeLiteral = TimeString
+_TimeLiteral = Core.Name "openGql.grammar.TimeLiteral"
+type DatetimeLiteral = DatetimeString
+_DatetimeLiteral = Core.Name "openGql.grammar.DatetimeLiteral"
+type ListLiteral = ListValueConstructorByEnumeration
+_ListLiteral = Core.Name "openGql.grammar.ListLiteral"
+type RecordLiteral = RecordConstructor
+_RecordLiteral = Core.Name "openGql.grammar.RecordLiteral"
+type Identifier = String
+_Identifier = Core.Name "openGql.grammar.Identifier"
+type RegularIdentifier = String
+_RegularIdentifier = Core.Name "openGql.grammar.RegularIdentifier"
+type TimeZoneString = CharacterStringLiteral
+_TimeZoneString = Core.Name "openGql.grammar.TimeZoneString"
+type CharacterStringLiteral = String
+_CharacterStringLiteral = Core.Name "openGql.grammar.CharacterStringLiteral"
+data UnsignedNumericLiteral =
+  UnsignedNumericLiteralExact ExactNumericLiteral |
+  UnsignedNumericLiteralApproximate ApproximateNumericLiteral
+  deriving (Eq, Ord, Read, Show)
+_UnsignedNumericLiteral = Core.Name "openGql.grammar.UnsignedNumericLiteral"
+_UnsignedNumericLiteral_exact = Core.Name "exact"
+_UnsignedNumericLiteral_approximate = Core.Name "approximate"
+data ExactNumericLiteral =
+  ExactNumericLiteralScientificWithSuffix String |
+  ExactNumericLiteralCommonWithSuffix String |
+  ExactNumericLiteralCommonWithoutSuffix String |
+  ExactNumericLiteralIntegerWithSuffix String |
+  ExactNumericLiteralUnsignedInteger UnsignedInteger
+  deriving (Eq, Ord, Read, Show)
+_ExactNumericLiteral = Core.Name "openGql.grammar.ExactNumericLiteral"
+_ExactNumericLiteral_scientificWithSuffix = Core.Name "scientificWithSuffix"
+_ExactNumericLiteral_commonWithSuffix = Core.Name "commonWithSuffix"
+_ExactNumericLiteral_commonWithoutSuffix = Core.Name "commonWithoutSuffix"
+_ExactNumericLiteral_integerWithSuffix = Core.Name "integerWithSuffix"
+_ExactNumericLiteral_unsignedInteger = Core.Name "unsignedInteger"
+data ApproximateNumericLiteral =
+  ApproximateNumericLiteralScientificWithSuffix String |
+  ApproximateNumericLiteralScientificWithoutSuffix String |
+  ApproximateNumericLiteralCommonWithSuffix String |
+  ApproximateNumericLiteralIntegerWithSuffix String
+  deriving (Eq, Ord, Read, Show)
+_ApproximateNumericLiteral = Core.Name "openGql.grammar.ApproximateNumericLiteral"
+_ApproximateNumericLiteral_scientificWithSuffix = Core.Name "scientificWithSuffix"
+_ApproximateNumericLiteral_scientificWithoutSuffix = Core.Name "scientificWithoutSuffix"
+_ApproximateNumericLiteral_commonWithSuffix = Core.Name "commonWithSuffix"
+_ApproximateNumericLiteral_integerWithSuffix = Core.Name "integerWithSuffix"
+data UnsignedInteger =
+  UnsignedIntegerDecimal String |
+  UnsignedIntegerHexadecimal String |
+  UnsignedIntegerOctal String |
+  UnsignedIntegerBinary String
+  deriving (Eq, Ord, Read, Show)
+_UnsignedInteger = Core.Name "openGql.grammar.UnsignedInteger"
+_UnsignedInteger_decimal = Core.Name "decimal"
+_UnsignedInteger_hexadecimal = Core.Name "hexadecimal"
+_UnsignedInteger_octal = Core.Name "octal"
+_UnsignedInteger_binary = Core.Name "binary"
+type UnsignedDecimalInteger = String
+_UnsignedDecimalInteger = Core.Name "openGql.grammar.UnsignedDecimalInteger"
+type NullLiteral = ()
+_NullLiteral = Core.Name "openGql.grammar.NullLiteral"
+type DateString = CharacterStringLiteral
+_DateString = Core.Name "openGql.grammar.DateString"
+type TimeString = CharacterStringLiteral
+_TimeString = Core.Name "openGql.grammar.TimeString"
+type DatetimeString = CharacterStringLiteral
+_DatetimeString = Core.Name "openGql.grammar.DatetimeString"
+type DurationLiteral = DurationString
+_DurationLiteral = Core.Name "openGql.grammar.DurationLiteral"
+type DurationString = CharacterStringLiteral
+_DurationString = Core.Name "openGql.grammar.DurationString"
+data NodeSynonym =
+  NodeSynonymNode |
+  NodeSynonymVertex
+  deriving (Eq, Ord, Read, Show)
+_NodeSynonym = Core.Name "openGql.grammar.NodeSynonym"
+_NodeSynonym_node = Core.Name "node"
+_NodeSynonym_vertex = Core.Name "vertex"
+data EdgesSynonym =
+  EdgesSynonymEdges |
+  EdgesSynonymRelationships
+  deriving (Eq, Ord, Read, Show)
+_EdgesSynonym = Core.Name "openGql.grammar.EdgesSynonym"
+_EdgesSynonym_edges = Core.Name "edges"
+_EdgesSynonym_relationships = Core.Name "relationships"
+data EdgeSynonym =
+  EdgeSynonymEdge |
+  EdgeSynonymRelationship
+  deriving (Eq, Ord, Read, Show)
+_EdgeSynonym = Core.Name "openGql.grammar.EdgeSynonym"
+_EdgeSynonym_edge = Core.Name "edge"
+_EdgeSynonym_relationship = Core.Name "relationship"
+data Implies =
+  ImpliesRightDoubleArrow |
+  ImpliesImplies
+  deriving (Eq, Ord, Read, Show)
+_Implies = Core.Name "openGql.grammar.Implies"
+_Implies_rightDoubleArrow = Core.Name "rightDoubleArrow"
+_Implies_implies = Core.Name "implies"
+type ParameterName = String
+_ParameterName = Core.Name "openGql.grammar.ParameterName"
+data BooleanLiteral =
+  BooleanLiteralTrue |
+  BooleanLiteralFalse |
+  BooleanLiteralUnknown
+  deriving (Eq, Ord, Read, Show)
+_BooleanLiteral = Core.Name "openGql.grammar.BooleanLiteral"
+_BooleanLiteral_true = Core.Name "true"
+_BooleanLiteral_false = Core.Name "false"
+_BooleanLiteral_unknown = Core.Name "unknown"
+type ByteStringLiteral = String
+_ByteStringLiteral = Core.Name "openGql.grammar.ByteStringLiteral"
